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

flutter run on device with previously ran app installed crashes #18991

Closed
d-silveira opened this issue Jul 2, 2018 · 3 comments
Closed

flutter run on device with previously ran app installed crashes #18991

d-silveira opened this issue Jul 2, 2018 · 3 comments
Labels
c: crash Stack traces logged to the console c: regression It was better in the past than it is now tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@d-silveira
Copy link

d-silveira commented Jul 2, 2018

Ever since 0.4.4 if you run a flutter app in a device, then disconnect the device, reconnect it (or even just pressing stop and then play in Android-Studio), and run again it crashes with a stacktrace and everything. The only solution, which is terribly unpractical, since this option is not available in Android Studio is to flutter clean and flutter packages get, and them run again, which takes a lot longer.

Crash output-------------------------------------------

Oops; flutter has exited unexpectedly.
Crash report written to /home/meego/code/hypnotic/glimpse/flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.

FAILURE: Build failed with an exception.

  • Where:
    Script '/opt/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 435

  • What went wrong:
    Execution failed for task ':app:flutterBuildDebug'.

Process 'command '/opt/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 14s
Finished with error: Gradle build failed: 1

flutter_01.log ---------------------------------------------------------------

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter build bundle --suppress-analytics --target /~project/lib/main.dart --preview-dart-2 --filesystem-scheme org-dartlang-root --depfile /~project/build/app/intermediates/flutter/debug/snapshot_blob.bin.d --asset-dir /~project/build/app/intermediates/flutter/debug/flutter_assets

exception

FileSystemException: FileSystemException: Cannot open file, path = '/~project/assets/glimpse/build/app/intermediates/flutter/debug/flutter_assets/assets/glimpse/assets/ic_glimpse_colored.png' (OS Error: No such file or directory, errno = 2)

#0      _File.open.<anonymous closure> (dart:io/file_impl.dart:368)
#1      _rootRunUnary (dart:async/zone.dart:1134)
#2      _CustomZone.runUnary (dart:async/zone.dart:1031)
#3      _FutureListener.handleValue (dart:async/future_impl.dart:129)
#4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633)
#5      Future._propagateToListeners (dart:async/future_impl.dart:662)
#6      Future._completeWithValue (dart:async/future_impl.dart:477)
#7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:507)
#8      _rootRun (dart:async/zone.dart:1126)
#9      _CustomZone.run (dart:async/zone.dart:1023)
#10     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)
#11     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#13     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)

flutter doctor

[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_GB.UTF-8)
    • Flutter version 0.5.1 at /opt/flutter
    • Framework revision c7ea3ca377 (5 weeks ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /opt/android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-P, build-tools 27.0.3
    • ANDROID_HOME = /opt/android-sdk
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version openjdk version "1.8.0_152-release"
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version openjdk version "1.8.0_152-release"

[✓] Connected devices (1 available)
    • SM A320FL • 3300a37d998b14cb • android-arm • Android 6.0.1 (API 23)

• No issues found!
@zoechi zoechi added c: regression It was better in the past than it is now c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. labels Jul 2, 2018
@d-silveira
Copy link
Author

Created two new projects, since and didn't have this problem. could it be because of the project having been created with an older flutter? I really don't know why this happens, let me know if there's anything else I can do to help debug

@d-silveira
Copy link
Author

Fixed it, for some obscure reason, the code folder was linked inside the assets, and that is what was causing the issue, once the link was deleted, it started working again.
I don't know what caused the code to be linked in the assets, but since it works without it, I will close this.
Thanks

@github-actions
Copy link

github-actions bot commented Sep 2, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console c: regression It was better in the past than it is now tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

2 participants