Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessException: Operation not permitted on macOS #3

Closed
putraxor opened this issue Oct 2, 2019 · 9 comments
Closed

ProcessException: Operation not permitted on macOS #3

putraxor opened this issue Oct 2, 2019 · 9 comments

Comments

@putraxor
Copy link

putraxor commented Oct 2, 2019

Trace logs

Launching lib/main.dart on macOS in debug mode...
Building macOS application...                                           
$ dart --version
ProcessException: Operation not permitted                               
  Command: /usr/local/bin/dart --version                                
$ dart --version                                                        
workingDirectory: null                                                  
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: ProcessException: Operation not permitted
  Command: /usr/local/bin/dart --version                                
#0      run (package:process_run/process_run.dart:166:15)               
<asynchronous suspension>                                               
#1      TrainBloc.startTraining (package:binomo_robot/ai/blocs/train_bloc.dart:27:5)
<asynchronous suspension>                                               
#2      new TrainBloc (package:binomo_robot/ai/blocs/train_bloc.dart:21:5)
#3      main (package:binomo_robot/main.dart:12:54)                     
#4      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:231:25)
#5      _rootRun (dart:async/zone.dart:1124:13)                         
#6      _CustomZone.run (dart:async/zone.dart:1021:19)                  
#7      _runZoned (dart:async/zone.dart:1516:10)                        
#8      runZoned (dart:async/zone.dart:1500:12)                         
#9      _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:223:5)    
#10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
#11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
@alextekartik
Copy link
Contributor

Weird indeed. I'm puzzled to see some flutter reference here (process_run is for the dart vm - not tested on flutter - and I'm not sure how Process behaves on Flutter (I guess desktop here)). Since process_run relied on https://api.dart.dev/stable/2.5.1/dart-io/Process/run.html can you try the raw implementation first?

@putraxor putraxor closed this as completed Oct 3, 2019
@Danopie
Copy link

Danopie commented Oct 11, 2019

@putraxor Have you figured it out? The raw implementation yields the same result.

@putraxor
Copy link
Author

@Danopie I use the default Process.start on Flutter Desktop (macOS) and disable sandbox mode on xcode

@Danopie
Copy link

Danopie commented Oct 13, 2019

Thank you @putraxor, in my case only turning off the sandbox mode does the trick

@Timmmm
Copy link

Timmmm commented Dec 25, 2019

For future googlers, to disable sandbox mode comment this out in macos/Runner/*.entitlements:

<key>com.apple.security.app-sandbox</key>
<true/>

@janoschp
Copy link

janoschp commented May 5, 2021

Well this is not a solution because I don't want to disable sandbox mode. How can I run a process without disabling sandbox mode?

@hongfeiyang
Copy link

I don't want to disable the sandbox mode either. It messes up with user's documents folder.

@LittleHans8
Copy link

LittleHans8 commented Sep 19, 2024

Well this is not a solution because I don't want to disable sandbox mode. How can I run a process without disabling sandbox mode?

It’s been three years, brother. Have you found a solution yet?​ @janoschp

@janoschp
Copy link

@LittleHans8 bruh, what do you think? I don't even work with Flutter anymore, I don't even remember why I asked this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants