Flutter app stuck on Waiting for VM Service port to be available... Device : HONOR 200 OS : Magic OS 9 Android 15

1 week ago 5
ARTICLE AD BOX

So basically i was developing on my physical device for a long time. Honor 200, which was until this time on Magic OS 8. Since I updated it to magic OS 9, I am facing this issue where the app gets stuck at

Waiting for VM Service port to be available...

flutter run -v OUTPUT :

[ +69 ms] --------- beginning of main 08-11 10:34:38.245 I/APM_AudioPolicyManager( 1741): sendAudioCloseOrOpen changed isAudioOpen=0 [ +6 ms] executing: C:\Users\\AppData\Local\Android\Sdk\platform-tools\adb.exe -s A7UHVB4718000587 shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true --ez start-paused true com.example.myformdemo/com.example.myformdemo.MainActivity [ +90 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.example.myformdemo/.MainActivity (has extras) } [ ] Waiting for VM Service port to be available...

This is happening for all my apps.

It will install but wont run and everything is on waiting state. i checked online for similar issues and earlier an issue was reported but it didn't help much.

Here are similar issues reported before :

Issue 1 Stackoverflow. Tried all the steps mentioned in the comments but no luck.

Issue 2 Reddit These steps were to subtle which i did already.

I believe this a new issue and this is very specific to Honor devices.

Also my App runs when i use flutter run -v but i wont get hot reload or debugging options this way.

When I run my app from the run button in android studio, it runs only on emulator and other physical device (Samsung galaxy s24 ultra in my case) but not in my device Honor 200.

AI Suggestion : It suggested to attach the debugger after running the flutter run -v which didnt help much either.

My standard way of development is to run via run button and in terminal run this command to get only relevant logs which I have mentioned in the code. flutter logs

In my Edit Configurations, i have also added --verbose --no-dds --disable-service-auth-codes --device-user 0 as additional run args.

With and without these args, the issue remains the same.

HERE IS MY flutter doctor output :

[√] Flutter (Channel stable, 3.24.0, on Microsoft Windows [Version 10.0.22531.5624], locale en-AE)

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[√] Chrome - develop for the web

[!] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.10.5) X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components: MSVC v142 - VS 2019 C++ x64/x86 build tools - If there are multiple build tool versions available, install the latest C++ CMake tools for Windows Windows 10 SDK

[√] Android Studio (version 2023.3)

[!] Android Studio (version 2024.2)

X Unable to determine bundled Java version.

[√] VS Code (version 1.102.3)

[√] Connected device (4 available)

[√] Network resources

I have tried all the steps mentioned in the above two issues plus these additional run args

Issue 1 Stackoverflow

Issue 2 Reddit

--verbose --no-dds --disable-service-auth-codes --device-user 0

Read Entire Article