Repository navigation
Crash launching on android #3825
Copy link
Copy link
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Description
command
flutter run --checked --debug-port=16164 --start-paused --device-id HT49CJT00009
exception
Exit code 1 from: /android-sdk/platform-tools/adb -s HT49CJT00009 shell pm path com.yourcompany.youngShadow1391
package:flutter_tools/src/base/process.dart 142 _runWithLoggingSync
package:flutter_tools/src/base/process.dart 84 runCheckedSync
package:flutter_tools/src/android/android_device.dart 169 AndroidDevice.isAppInstalled
package:flutter_tools/src/commands/install.dart 37 installApp
package:flutter_tools/src/commands/run.dart 206 startApp.<async>
===== asynchronous gap ===========================
dart:async _Completer.completeError
package:flutter_tools/src/commands/run.dart 241 startApp.<async>
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/commands/run.dart startApp
package:flutter_tools/src/commands/run.dart 124 RunCommand.runInProject.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:flutter_tools/src/commands/run.dart RunCommand.runInProject
package:flutter_tools/src/runner/flutter_command.dart 176 FlutterCommand._run.<async>
dart:async _SyncCompleter.complete
package:flutter_tools/src/cache.dart 108 Cache.updateAll.<async>
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:flutter_tools/src/runner/flutter_command.dart FlutterCommand._run
package:flutter_tools/src/runner/flutter_command.dart 106 FlutterCommand.run
package:args/command_runner.dart 176 CommandRunner.runCommand.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 129 CommandRunner.runCommand
package:flutter_tools/src/runner/flutter_command_runner.dart 242 FlutterCommandRunner.runCommand
package:args/command_runner.dart 103 CommandRunner.run.<fn>
dart:async Future.Future.sync
package:args/command_runner.dart 103 CommandRunner.run
package:flutter_tools/src/runner/flutter_command_runner.dart 189 FlutterCommandRunner.run
package:flutter_tools/executable.dart 86 main.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:stack_trace Chain.capture
package:flutter_tools/executable.dart 80 main.<async>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Activity
sethladd commentedon May 9, 2016
We think is when we run on Android N. This happens on a Nexus 6 and Nexus 9.
devoncarew commentedon May 10, 2016
Can you run
flutter -v run, find the adb command (w/ args) that it's failing on, and run that command manually? It might print out better text that would help us narrow down the failure.sethladd commentedon May 10, 2016
I just tried on Android N, build NPC91K, on a 5X, and I was able to "flutter run" the gallery.
sethladd commentedon May 10, 2016
This line (
flutter/packages/flutter_tools/lib/src/android/android_device.dart
Line 193 in 4d0e698
If we run
flutter build apkand then manually install the APK onto the device, the app works.The adb on the test machine is "Android debug bridge version 1.0.35", fwiw.
devoncarew commentedon May 10, 2016
I have
1.0.32locally. We should probably change to wrapping the call with a try-catch; we don't need to fail the build if the app isn't installed, just return false. Perhaps the exit code convention changed for that adb call.sethladd commentedon May 10, 2016
After debugging, we deduced that 1.0.35 changed behavior, and prints a
1if the path isn't found. On 1.0.32, nothing is printed.Meanwhile,
pm list packagesseems to have consistent behavior on 1.0.32 and 1.0.35 and could be used to answer the question "does the apk exist on the device".Fix flutter#3825 crash installing onto certain Android devices
github-actions commentedon Sep 6, 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 -vand a minimal reproduction of the issue.