Flutter Android app crashing on launch saying “waiting on observatory port…”

0

I am using Flutter to create an app and I didn't test it on android before implementing many features (I have been using iOS simulator as my primary testing software). Now that I have started using the android simulator because I wanted to configure firebase for the android app as well but, It crashes for some reason. Still works well on iOS but not on android. Flutter doctor has no issues and the console shows "waiting on observatory port...".

here's my project link if you guys want to test it for yourself.

https://github.com/Enigma04/vibing_app

Flutter Doctor

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-IN)
    • Flutter version 1.17.5 at /Users/apple/Documents/flutter
    • Framework revision 8af6b2f038 (3 weeks ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/apple/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.1

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

Console

[  +26 ms] <- compile package:vibing/main.dart
[  +25 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb version
[ +189 ms] Android Debug Bridge version 1.0.41
           Version 30.0.3-6597393
           Installed as /Users/apple/Library/Android/sdk/platform-tools/adb
[   +8 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb start-server
[  +51 ms] Building APK
Running Gradle task 'assembleDebug'...
[{"event":"app.progress","params":{"appId":"5a96b676-0917-4a3d-a48a-3fb40e28fb13","id":"0","progressId":null,"message":"Running Gradle task 'assembleDebug'..."}}]
[ +101 ms] gradle.properties already sets `android.enableR8`
[  +32 ms] Using gradle from /Users/apple/AndroidStudioProjects/vibing/android/gradlew.
[   +3 ms] /Users/apple/AndroidStudioProjects/vibing/android/gradlew mode: 33261 rwxr-xr-x.
[+1056 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[  +18 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[        ] {"CFBundleName":"Android Studio","JVMOptions":{"ClassPath":"$APP_PACKAGE\/Contents\/lib\/bootstrap.jar:$APP_PACKAGE\/Contents\/lib\/extensions.jar:$APP_PACKAGE\/Contents\/lib\/util.jar:$APP_PACKAGE\/Contents\/lib\/jdom.jar:$APP_PACKAGE\/Contents\/lib\/log4j.jar:$APP_PACKAGE\/Contents\/lib\/trove4j.jar:$APP_PACKAGE\/Contents\/lib\/jna.jar","JVMVersion":"1.8*,1.8+","WorkingDirectory":"$APP_PACKAGE\/Contents\/bin","MainClass":"com.intellij.idea.Main","Properties":{"idea.paths.selector":"AndroidStudio4.0","idea.executable":"studio","idea.platform.prefix":"AndroidStudio","idea.home.path":"$APP_PACKAGE\/Contents"}},"NSDesktopFolderUsageDescription":"An application in Android Studio requests access to the user's Desktop folder.","LSArchitecturePriority":["x86_64"],"CFBundleVersion":"AI-193.6911.18.40.6626763","CFBundleDevelopmentRegion":"English","NSCameraUsageDescription":"An application in Android Studio requests access to the device's camera.","CFBundleDocumentTypes":[{"CFBundleTypeName":"Android Studio Project File","CFBundleTypeExtensions":["ipr"],"CFBundleTypeRole":"Editor","CFBundleTypeIconFile":"studio.icns"},{"CFBundleTypeName":"All documents","CFBundleTypeExtensions":["*"],"CFBundleTypeOSTypes":["****"],"CFBundleTypeRole":"Editor","LSTypeIsPackage":false}],"NSSupportsAutomaticGraphicsSwitching":true,"CFBundlePackageType":"APPL","CFBundleIconFile":"studio.icns","NSHighResolutionCapable":true,"CFBundleShortVersionString":"4.0","NSMicrophoneUsageDescription":"An application in Android Studio requests access to the device's microphone.","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"studio","NSLocationUsageDescription":"An application in Android Studio requests access to the user's location information.","LSRequiresNativeExecution":"YES","CFBundleURLTypes":[{"CFBundleTypeRole":"Editor","CFBundleURLName":"Stacktrace","CFBundleURLSchemes":["idea"]}],"CFBundleIdentifier":"com.google.android.studio","LSApplicationCategoryType":"public.app-category.developer-tools","CFBundleSignature":"????","LSMinimumSystemVersion":"10.8","NSDocumentsFolderUsageDescription":"An application in Android Studio requests access to the user's Documents folder.","NSDownloadsFolderUsageDescription":"An application in Android Studio requests access to the user's Downloads folder.","NSNetworkVolumesUsageDescription":"An application in Android Studio requests access to files on a network volume.","CFBundleGetInfoString":"Android Studio 4.0, build AI-193.6911.18.40.6626763. Copyright JetBrains s.r.o., (c) 2000-2020","NSRemovableVolumesUsageDescription":"An application in Android Studio requests access to files on a removable volume."}
[  +12 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[ +159 ms] Exit code 0 from: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[   +1 ms] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
           OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
[   +5 ms] executing: [/Users/apple/AndroidStudioProjects/vibing/android/] /Users/apple/AndroidStudioProjects/vibing/android/gradlew -q -Ptarget-platform=android-x86 -Ptarget=/Users/apple/AndroidStudioProjects/vibing/lib/main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root -Pdart-defines=flutter.inspector.structuredErrors=true assembleDebug
[+19612 ms] Note: /Users/apple/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.11.0+2/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
[   +3 ms] Note: Recompile with -Xlint:deprecation for details.
[        ] Note: /Users/apple/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.11.0+2/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
[        ] Note: Recompile with -Xlint:unchecked for details.
[{"event":"app.progress","params":{"appId":"5a96b676-0917-4a3d-a48a-3fb40e28fb13","id":"0","progressId":null,"finished":true}}]
[+99175 ms] calculateSha: LocalDirectory: '/Users/apple/AndroidStudioProjects/vibing/build/app/outputs/apk'/app.apk
[  +85 ms] calculateSha: reading file took 83us
[ +601 ms] calculateSha: computing sha took 600us
[  +13 ms] ✓ Built build/app/outputs/apk/debug/app-debug.apk.
[  +15 ms] executing: /Users/apple/Library/Android/sdk/build-tools/29.0.2/aapt dump xmltree /Users/apple/AndroidStudioProjects/vibing/build/app/outputs/apk/app.apk AndroidManifest.xml
[  +32 ms] Exit code 0 from: /Users/apple/Library/Android/sdk/build-tools/29.0.2/aapt dump xmltree /Users/apple/AndroidStudioProjects/vibing/build/app/outputs/apk/app.apk AndroidManifest.xml
[        ] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="com.enigma.vibing" (Raw: "com.enigma.vibing")
               A: platformBuildVersionCode=(type 0x10)0x1d
               A: platformBuildVersionName=(type 0x10)0xa
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1d
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: uses-permission (line=15)
                 A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
               E: uses-permission (line=16)
                 A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
               E: uses-permission (line=17)
                 A: android:name(0x01010003)="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" (Raw: "com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE")
               E: application (line=25)
                 A: android:label(0x01010001)="vibing" (Raw: "vibing")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=31)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.enigma.vibing.MainActivity" (Raw: "com.enigma.vibing.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=38)
                     E: action (line=39)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=41)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=48)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: service (line=52)
                   A: android:name(0x01010003)="com.google.firebase.components.ComponentDiscoveryService" (Raw: "com.google.firebase.components.ComponentDiscoveryService")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
                   E: meta-data (line=56)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebaseanalytics.FlutterFirebaseAppRegistrar" (Raw: "com.google.firebase.components:io.flutter.plugins.firebaseanalytics.FlutterFirebaseAppRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=59)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebaseauth.FlutterFirebaseAppRegistrar" (Raw: "com.google.firebase.components:io.flutter.plugins.firebaseauth.FlutterFirebaseAppRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=62)
                     A: android:name(0x01010003)="com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseAppRegistrar" (Raw: "com.google.firebase.components:io.flutter.plugins.firebase.core.FlutterFirebaseAppRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=65)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar" (Raw: "com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=68)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" (Raw: "com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=71)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar" (Raw: "com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                   E: meta-data (line=74)
                     A: android:name(0x01010003)="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" (Raw: "com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar")
                     A: android:value(0x01010024)="com.google.firebase.components.ComponentRegistrar" (Raw: "com.google.firebase.components.ComponentRegistrar")
                 E: activity (line=79)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.firebase.auth.internal.FederatedSignInActivity" (Raw: "com.google.firebase.auth.internal.FederatedSignInActivity")
                   A: android:permission(0x01010006)="com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN" (Raw: "com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN")
                   A: android:exported(0x01010010)=(type 0x12)0xffffffff
                   A: android:excludeFromRecents(0x01010017)=(type 0x12)0xffffffff
                   A: android:launchMode(0x0101001d)=(type 0x10)0x2
                 E: receiver (line=87)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementReceiver" (Raw: "com.google.android.gms.measurement.AppMeasurementReceiver")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=93)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementService" (Raw: "com.google.android.gms.measurement.AppMeasurementService")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: service (line=97)
                   A: android:name(0x01010003)="com.google.android.gms.measurement.AppMeasurementJobService" (Raw: "com.google.android.gms.measurement.AppMeasurementJobService")
                   A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                   A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: provider (line=103)
                   A: android:name(0x01010003)="com.google.firebase.provider.FirebaseInitProvider" (Raw: "com.google.firebase.provider.FirebaseInitProvider")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                   A: android:authorities(0x01010018)="com.enigma.vibing.firebaseinitprovider" (Raw: "com.enigma.vibing.firebaseinitprovider")
                   A: android:initOrder(0x0101001a)=(type 0x10)0x64
                 E: activity (line=109)
                   A: android:theme(0x01010000)=@0x01030010
                   A: android:name(0x01010003)="com.google.android.gms.common.api.GoogleApiActivity" (Raw: "com.google.android.gms.common.api.GoogleApiActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
                 E: meta-data (line=114)
                   A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                   A: android:value(0x01010024)=@0x7f060000
[   +7 ms] Stopping app 'app.apk' on AOSP on IA Emulator.
[   +1 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.enigma.vibing
[  +95 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm list packages com.enigma.vibing
[  +68 ms] package:com.enigma.vibing_app
[   +5 ms] Installing APK.
[   +2 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb version
[  +26 ms] Android Debug Bridge version 1.0.41
           Version 30.0.3-6597393
           Installed as /Users/apple/Library/Android/sdk/platform-tools/adb
[   +1 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb start-server
Installing build/app/outputs/apk/app.apk...
[{"event":"app.progress","params":{"appId":"5a96b676-0917-4a3d-a48a-3fb40e28fb13","id":"1","progressId":null,"message":"Installing build/app/outputs/apk/app.apk..."}}]
[  +31 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -t -r /Users/apple/AndroidStudioProjects/vibing/build/app/outputs/apk/app.apk
[+3550 ms] Performing Streamed Install
           Success
[{"event":"app.progress","params":{"appId":"5a96b676-0917-4a3d-a48a-3fb40e28fb13","id":"1","progressId":null,"finished":true}}]
[   +3 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell echo -n 5a1c70fb31846e8f1b4bd79c563d75c58e5972e3 > /data/local/tmp/sky.com.enigma.vibing.sha1
[ +194 ms] AOSP on IA Emulator startApp
[   +5 ms] executing: /Users/apple/Library/Android/sdk/platform-tools/adb -s emulator-5554 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 --ez verify-entry-points true com.enigma.vibing/com.enigma.vibing.MainActivity
[ +469 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.enigma.vibing/.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
android
firebase
android-studio
flutter
asked on Stack Overflow Jul 24, 2020 by Rohit Varma

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0