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 tool hangs waiting on observatory port when AndroidManifest.xml and MainActivity.kt package name get out of sync #33214
Comments
This happened to me as well. I was on 1.6.0 (I've since reverted to stable). The above linked issues seem to have been about admin permissions. This only happens against Android (iOS simulator still works), and I've reproduced against both API 27 and API 28, running both in debug and release mode, on an emulator and on a device (in release mode, it doesn't hang on the observatory line, but just closes). There is no error message, even when running with the
|
@jason-simmons and I just did some troubleshooting, and it seems that in my case, the package name in |
@timsneath , our issue was an orphaned We're good now though, I think this can safely be closed. |
Are there things we could do to detect these sorts of things and report them? If there are multiple causes and they're not obvious, it seems like this may come up again. If the errors are clearly identifiable from the logs, maybe we can could scan for them while waiting for the observatory port and write them out as warnings or something? |
I also encountered the same problem, it seems that the device is in the problem, and the project is running without problems on other devices. |
This happens to me both on my device and the emulator (but both are Pixel 2 and 3). See my comment also here Also when I check I don't have any name conflict in any of those files either. I did everything I mentioned in the comment linked above. This is really frustrating. |
It is recommended to add some log information in this section. |
This is what seems to go wrong:
But sometimes it doesn't go past @DanTup maybe you have some idea? |
This problem went away when I removed this plugin: flutter_webview_plugin After sometime I tried to install it again just to see if this was really the cause of this problem and it happened again. I'm not saying that this is caused specifically only with this plugin, but definitely it helps to remove plugins one by one to see if that solves the problem. |
Hi @timsneath im also experiencing the same problem, for mine the package name for both kt and xml files are in sync but the app still hung on observatory port. what is the best solution to fixing this problem!!! please help. |
Hi There, I developed the app on windows and shared the code on github. [✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G103, locale en-AE) Any Help or workaround? |
I don't know what is causing the problem but if your are writing on iOS you could possibly
|
I found so many Github issues regarding this topic that I don't know where to comment.. #51797 being one of them After experimenting, what fixes it for me is switching to the master channel ( flutter channel master ) which corresponds to the master branch. |
I think this issue has become a mash up of many "Waiting for observatory port to be available..." issues, which may have different causes (like any crash on launch). If you are seeing this issue on iOS, this should be greatly improved on the dev channel. Please check #49735 and #46705. Let's use this issue to track the tool detecting the mismatch between AndroidManifest.xml and MainActivity.kt and giving a better error message. If your package identifiers match, please file another issue. |
When I update the AndroidManifest.xml package to from
because build.gradle has |
Is it possible that you also changed the android:name in the file android/app/src/main/AndroidManifest.xml I found changing
to something else caused this exact behaviour. |
any solution to the problem? I just installed flutter and follow the tutorial but it fails, I have a LG cell phone with Android 7.0 (API 24), Thanks for any help. LOG: Sun Mar 22 2020 [18:23:25 GMT-0500 (hora estándar de Colombia)] Log file started |
Definitely a weird problem. Changing the package name in MainActivity.kt worked for me though. |
yes, so weird, I have the same situation |
I have tried all the suggestions posted, mine still says 'Waiting for observatory port to be available...', any other ideas on how to fix it?? |
I'm getting Only happens on device. Does not happen on emulator. |
Hi all |
I have the same issue on every project. In Android emulator or iOS simulator works well. When I try to run on my device, i have "Waiting for observatory port to be available...". Device: LG G6 For that, I can't debug on my real device. Any solution? I tried all the possible solution, but no results |
I'm also facing the same issue. |
With my LG G6 I have the same issue. Downgrading to platform-tools version 28.0.0 solved the problem. References: https://superuser.com/questions/1357708/android-adb-logcat-works-only-on-shell/1357929#1357929 |
Thanks...Thanks and just Thanks |
@christianarduino upgrade to v 1.20.0 and run your project |
Here what worked in my case adb -s <your emulator/device id> uninstall com.yourpackage.name |
@tokenflow Thank you that fixed it for me. While my device did not seem to have the application installed when i searched for it. This command fully removed the application from my phone. This is what seems to be blocking the observatory port from attaching. |
Edit: issue was related to Custom Rom i have installed i changed Rom and there is no issue now. here is my previous flutter run --verbose
|
I solve the problem!
|
看一下android——》app——》src——》main——》AndroidManifest.xml文件中,没有没有android:name=".MainApplication"属性,有这个也会导致flutter run -v时,出现Waiting for observatory port to be available...的情况 |
A solution was found: |
There might be multiple issues being combined into this thread. |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. |
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 |
Running
flutter run -v -d pixel
, my machine is blocked on waiting for an observatory port:I can see some other examples of this (#26623, #23778), but they may be triggered by other scenarios, so opening a new bug.
flutter doctor -v
reports:The text was updated successfully, but these errors were encountered: