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

[firebase_crashlytics]: [Android] App stuck on splash screen because of Crashlytics exception #12692

Closed
1 task done
fbardecio opened this issue Apr 23, 2024 · 4 comments
Closed
1 task done
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: android Issues / PRs which are specifically for Android. plugin: crashlytics resolution: user This was a user issue, e.g. invalid configuration or code. type: bug Something isn't working

Comments

@fbardecio
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Crashlytics

Which platforms are affected?

Android

Description

The app should initialize with no problems, allowing me to log crashes to Crashlytics.

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-UY)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.3)
    ! CocoaPods 1.12.1 out of date (1.13.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.72.1)
[✓] VS Code (version 1.88.1)
[✓] Connected device (5 available)
[✓] Network resources

After migrating from Flutter SDK 3.16.9 to Flutter SDK 3.19.6, the Android release build gets stuck in the splash screen, these are the logs:

D/FlutterGeolocator(15679): Creating service.
D/FlutterGeolocator(15679): Binding to location service.
D/FlutterGeolocator(15679): Flutter engine connected. Connected engine count 1
E/flutter (15679): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'bool'
E/flutter (15679): #0      new FirebaseCrashlyticsPlatform.instanceFor (package:firebase_crashlytics_platform_interface/src/platform_interface/platform_interface_crashlytics.dart:34)
E/flutter (15679): #1      FirebaseCrashlytics._delegate (package:firebase_crashlytics/src/firebase_crashlytics.dart:24)
E/flutter (15679): #2      FirebaseCrashlytics.setCrashlyticsCollectionEnabled (package:firebase_crashlytics/src/firebase_crashlytics.dart:194)
E/flutter (15679): #3      bootstrap (package:app/bootstrap.dart:46)
E/flutter (15679): <asynchronous suspension>
E/flutter (15679): 

Line 46 in bootstrap file is making use of kDebugMode constant for set the Crashlytics collection value, I've also tried removing it and providing true to it but it throws same errors.

await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); // This also fails

If I remove Crashlytics from the project everything works as expected.

Reproducing the issue

Add Crashlytics to a project and run in release mode or make a build and open it in a physical device.

Firebase Core version

2.30.0

Flutter Version

3.19.6

Relevant Log Output

D/FlutterGeolocator(15679): Creating service.
D/FlutterGeolocator(15679): Binding to location service.
D/FlutterGeolocator(15679): Flutter engine connected. Connected engine count 1
E/flutter (15679): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'bool'
E/flutter (15679): #0      new FirebaseCrashlyticsPlatform.instanceFor (package:firebase_crashlytics_platform_interface/src/platform_interface/platform_interface_crashlytics.dart:34)
E/flutter (15679): #1      FirebaseCrashlytics._delegate (package:firebase_crashlytics/src/firebase_crashlytics.dart:24)
E/flutter (15679): #2      FirebaseCrashlytics.setCrashlyticsCollectionEnabled (package:firebase_crashlytics/src/firebase_crashlytics.dart:194)
E/flutter (15679): #3      bootstrap (package:app/bootstrap.dart:46)
E/flutter (15679): <asynchronous suspension>
E/flutter (15679):

Flutter dependencies

Expand Flutter dependencies snippet
  firebase_core: ^2.30.0
  firebase_crashlytics: ^3.5.3
  firebase_messaging: ^14.8.2
  firebase_performance: ^0.9.4+2
  firebase_storage: ^11.7.2

Additional context and comments

No response

@fbardecio fbardecio added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Apr 23, 2024
@fbardecio fbardecio changed the title [firebase_crashlytics]: <App stuck on splash screen because of Crashlytics exception> [firebase_crashlytics]: [Android] App stuck on splash screen because of Crashlytics exception Apr 23, 2024
@russellwheatley
Copy link
Member

Hi @fbardecio - I tested on release mode, flutter v3.19.6 using Crashlytics example app, no crash for me. You'll need to create a small, reproducible code sample/repo to investigate. Thanks.

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. plugin: crashlytics platform: android Issues / PRs which are specifically for Android. and removed Needs Attention This issue needs maintainer attention. labels Apr 25, 2024
@fbardecio
Copy link
Author

fbardecio commented Apr 26, 2024

Hey @russellwheatley thanks for taking a look into this issue, I will try to reproduce this in a small project during this weekend and share access to it/any news with you!

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Apr 26, 2024
@russellwheatley
Copy link
Member

@fbardecio Thanks 🙏

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Apr 29, 2024
@fbardecio
Copy link
Author

I've created a new project with only the specified Firebase dependencies and I was not able to reproduce this issue, it is probably related to some other Android configuration located in my main project repository, I will keep investigating, thanks for taking your time to review it 🙌

@russellwheatley russellwheatley added the resolution: user This was a user issue, e.g. invalid configuration or code. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. platform: android Issues / PRs which are specifically for Android. plugin: crashlytics resolution: user This was a user issue, e.g. invalid configuration or code. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants