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

Stuck on "Waiting for observatory port to be available..." #9178

Closed
dyu opened this issue Apr 4, 2017 · 4 comments
Closed

Stuck on "Waiting for observatory port to be available..." #9178

dyu opened this issue Apr 4, 2017 · 4 comments

Comments

@dyu
Copy link

dyu commented Apr 4, 2017

I just upgraded today. I did not have any problems before with the same environment and phone.

Steps to Reproduce

flutter run -v

Logs

[   +1 ms] /home/dyu/.android-sdk/platform-tools/adb -s 88HFBMM26BGK shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true com.dyuproject.todo/com.dyuproject.todo.MainActivity
[ +581 ms
] Exit code 0 from: /home/dyu/.android-sdk/platform-tools/adb -s 88HFBMM26BGK shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true com.dyuproject.todo/com.dyuproject.todo.MainActivity
[        ] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.dyuproject.todo/.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
[+60009 ms
] Error waiting for a debug connection: Exception: Timeout while attempting to retrieve Uri for Observatory

[   +5 ms] Error launching application on m2.

[   +2 ms] 'flutter run' took 68617ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:29)
#1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:286)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:151)
<asynchronous suspension>
#3      RunCommand.verifyThenRunCommand (package:flutter_tools/src/commands/run.dart:196)
<asynchronous suspension>
#4      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:121)
#5      CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#6      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:261)
<asynchronous suspension>
#7      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#8      Future.Future.sync (dart:async/future.dart:208)
#9      CommandRunner.run (package:args/command_runner.dart:109)
#10     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:157)
#11     run.<anonymous closure> (package:flutter_tools/executable.dart:140)
<asynchronous suspension>
#12     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#13     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#14     _rootRun (dart:async/zone.dart:1120)
#15     _CustomZone.run (dart:async/zone.dart:1001)
#16     runZoned (dart:async/zone.dart:1465)
#17     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#18     run (package:flutter_tools/executable.dart:113)
<asynchronous suspension>
#19     main (package:flutter_tools/executable.dart:66)
<asynchronous suspension>
#20     main (file:///data/dyu/dev/github-flutter/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#21     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#22     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)


[ +259 ms
] ensureAnalyticsSent: 251ms
[   +2 ms] exiting with code 2

Flutter Doctor

[✓] Flutter (on Linux, channel master)
    • Flutter at /data/dyu/dev/github-flutter/flutter
    • Framework revision 4245bce545 (2 hours ago), 
    • Engine revision 878f0ff09d
    • Tools Dart version 1.23.0-dev.10.0

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at /home/dyu/.android-sdk
    • Platform android-25, build-tools 25.0.2
    • ANDROID_HOME = /home/dyu/.android-sdk
    • Java binary at: /usr/lib/jvm/java-8-oracle/bin/java
    • Java version: Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[✗] Android Studio (not installed)
    • Android Studio not found. Download from https://developer.android.com/studio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[-] IntelliJ IDEA Community Edition (version 13)
    • Dart plugin not installed; this adds Dart specific functionality.
    • Flutter plugin not installed; this adds Flutter specific functionality.
    • For information about managing plugins, see
      https://www.jetbrains.com/help/idea/managing-plugins.html

[✓] IntelliJ IDEA Community Edition (version 2017.1)
    • Dart plugin version 171.4006
    • Flutter plugin version 0.1.10

[✓] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 12.1

[✓] Connected devices
    • m2 • 88HFBMM26BGK • android-arm • Android 5.1 (API 22)
@dyu
Copy link
Author

dyu commented Apr 4, 2017

False alarm. The structure of the project changed and I copy pasted the android files from flutter create without updating the MainActivity package name.

@dyu dyu closed this as completed Apr 4, 2017
@fiatjaf
Copy link

fiatjaf commented Oct 29, 2017

Thank you. I've got this after changing my package name from com.yourcompany.appname to something better on android/app/src/main/AndroidManifest.xml, but I didn't know there were a lot of other places I should have updated to match the new name, including the directory tree (because there is some android/app/src/main/java/com/yourcompany/ directory that must be changed).

Running a find . -name "yourcompany" and an ag "yourcompany" should help.

@leoula
Copy link

leoula commented Oct 20, 2019

You need to check your app level build file under ndk. It should contain all types supported platforms incase the device you are trying to run on isn't on the list. Update your ndk under app level like this:
image

@github-actions
Copy link

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 Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants