-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
crash due to "Message from debugger: Terminated due to signal 13" #36
Comments
If you catch and log the exception that would be great. I assume you have so disabled sandbox mode on release: In <dict>
<key>com.apple.security.app-sandbox</key>
<false/>
</dict> You can also try the app here on macos, when you press the floating button you can try a command such as https://github.com/alextekartik/flutter_app_example/tree/master/process_run_example#mac-support |
After googling a bit, I got an explanation from a Chinese blog, seem like it cause by the socket which flutter use to communicate to native code, he only found it in iOS 13 I fixed it by ignoring the error signal, add
After adding it, i can run the executable file commands without crash, but the shell can't find it and always return I have tested to run it in Android Studio, both debugging and release mode (using flutter run --release) and it works just fine with executable file This is done on your example project, i only modified the AppDelegate, disable the sandbox mode and add the change directory button |
What version of Xcode did you build the release in the picture which you show me ? |
@alextekartik I have the same problem which has been very tough to debug. However, the error is Important: The issue only happens when you BUILD the app. Running in release mode does not crash. How to replicate the problem:
|
@leoafarias seem like this bug is cause by the Process class in 'dart:io' which is warped by this library, not library itself, i reported to flutter team a month ago but it seem like my information i provided is not clear enough so far i still not get any response Counld you open the issue in flutter github ? |
@LeXuanKhanh thanks for the info but I think there might be a secondary issue. The commands which I am try do work when I do |
Just one more insight it seems that |
If the process can't find the executable, the command is not found or invalid then its will crash When you run Therefore, for example you try to call I recommend using absolute path for third parties executable, so like if u want to call And there 1 more problem tho, if you create Process when the app is built, the directory which the Process is spawn is in root directory which you can't execute any command due to Mac Os permission, you must manually change the directory of the Process |
|
@LeXuanKhanh Yes I am on flutter 2.0, I am trying to get better info but it's being a bit tough due to some null-safety migration, but I believe that has worked on a previous version of process_run. Will try to get more info... |
hi @leoafarias , i have checked again in flutter 2.2 and its still happen (have migrated my project) , but i figure out something. In the "Build the app" case, if you have the command is execute immediately after the app is launched then its crash, but if you delay the that command (ex: 1 second) then it will not cause any crash |
@LeXuanKhanh interesting... thanks for letting me know, haven't had time to dig in much more on it since we last spoke |
in debug move , the PATH is injected to the Application but on the release mode flutter build macos it seems the which command is not finding any of the commands we supposed to have or installed if we have a file ie. (profile) with app the path define can we just source it? ie.:
im kinda stock with this issue, since what i needed was to have some of the cli be invoked in my flutter app. Hope someone can bring better solutiont to this... im still bit confuse on how to make the command available if it exist in the system already |
@goldcoders try using command in interactive shell with You can an the extension like this ( I haven't tested this on Linux yet ):
How to use:
|
Providing full path to the packages did the trick both on debug and in release, built app via Xcode. |
open -a /Applications/MyApp.app |
Hello, I try to run executable file on Mac, when run on android studio it work fine but when I run the project on xcode to debug or build a release app (using flutter build macos) and open, it crash. The only thing it say is Message from debugger: Terminated due to signal 13
I try to create a new project and run a simple command with executable file like
brew --version
to reproduce the error, it crash and log the same thingI have already disabled sandbox mode
Environment:
Mac OS: 10.15.7
Xcode: 12.0.1 (12A7300)
Flutter: Channel dev, 1.26.0-8.0.pre
The text was updated successfully, but these errors were encountered: