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

The application crashed when command not found #30

Open
jlia0 opened this issue Nov 26, 2020 · 5 comments
Open

The application crashed when command not found #30

jlia0 opened this issue Nov 26, 2020 · 5 comments

Comments

@jlia0
Copy link

jlia0 commented Nov 26, 2020

Hello, there is an issue that when using a non-existing command (like shell.run('abc123')), the whole application would crash. Is there a way to fix this?

@alextekartik
Copy link
Contributor

Hi and thanks for the report. Do you have more information on how to reproduce (platform mac, linux, win?, debug/release)?. Does it crash if you surround the call with a try/catch?

@mannprerak2
Copy link

@alextekartik

Does it crash if you surround the call with a try/catch?

try/catch is working only when we run the app using flutter run (even in release mode). However, when we build the app and run it directly, it just crashes.

@alextekartik
Copy link
Contributor

@mannprerak2 On which platform are you seeing this? MacOS requires special settings (#36 (comment))

@mannprerak2
Copy link

Yes, I did add this to Release.entitlements

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

This however seems to be an issue with flutter than this package, even Process.run is crashing the app.

@mannprerak2
Copy link

@alextekartik thanks for pointing out that comment, I managed to fix the crash and get an exception by adding this to my AppDelegate.swift file, see #36 (comment) -

  override func applicationDidBecomeActive(_ notification: Notification) {
        signal(SIGPIPE, SIG_IGN) //Ignore signal
  }

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

3 participants