Open Clon1998 opened 7 months ago
@Clon1998 - It looks like you have not initialised the default Firebase app. Looking at the source code for Dynamic Links, you can only receive a Dynamic Link for the default Firebase app: https://github.com/firebase/flutterfire/blob/master/packages/firebase_dynamic_links/firebase_dynamic_links/android/src/main/java/io/flutter/plugins/firebase/dynamiclinks/FlutterFirebaseDynamicLinksPlugin.java#L112
@Clon1998 - It looks like you have not initialised the default Firebase app. Looking at the source code for Dynamic Links, you can only receive a Dynamic Link for the default Firebase app: https://github.com/firebase/flutterfire/blob/master/packages/firebase_dynamic_links/firebase_dynamic_links/android/src/main/java/io/flutter/plugins/firebase/dynamiclinks/FlutterFirebaseDynamicLinksPlugin.java#L112
As far as I am aware, I initialized it. At least all other firebase services are working fine within my flutter app (Messaging, Remote config, ...). Unless something else is required on the android side.
Hard to tell without seeing any code but the exception is pretty clear on what the bug is.
Any update on that? I am getting user reports that this happens to my app every couple of app starts...
I went ahead and moved the code for initializing Firebase pretty high up in the main() method in my project. However, even with that change, I am still receiving crash reports with the same content stating that firebase is NOT initialized which clearly is not the case.
@Clon1998 - Try adding the service file for android.
@russellwheatley thanks for the hint. Seems like I did not update the service files on my CI server. I'll try that and report back.
@russellwheatley Still seeing the same error even with the updated service file. It seems like the issue mainly occurs when trying to launch the app after a period of inacvity.
For reference, the my service file generated by flutterfire looks like:
{
"project_info": {
"project_number": "<REMOVED>",
"project_id": "<REMOVED>",
"storage_bucket": "<REMOVED>"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "<REMOVED>",
"android_client_info": {
"package_name": "com.mobileraker.android"
}
},
"oauth_client": [
{
"client_id": "<REMOVED>",
"client_type": 1,
"android_info": {
"package_name": "com.mobileraker.android",
"certificate_hash": "<REMOVED>"
}
},
{
"client_id": "<REMOVED>",
"client_type": 3
}
],
"api_key": [
{
"current_key": "<REMOVED>"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "<REMOVED>",
"client_type": 3
},
{
"client_id": "<REMOVED>",
"client_type": 2,
"ios_info": {
"bundle_id": "com.mobileraker.ios"
}
}
]
}
}
}
],
"configuration_version": "1"
}
@Clon1998 - I'd make firebase initialisation the first thing to happen in main()
(after ensuring widgets initialised). I have never seen this issue before so it is odd.
@Clon1998 - I'd make firebase initialisation the first thing to happen in
main()
(after ensuring widgets initialised). I have never seen this issue before so it is odd.
Neither have I seen that. I'll move the init part above my logger setup to see if something changes.
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Auth
What platform(s) does this bug affect?
Android
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
N.A.
Expected Behavior
No crashes.
Actual Behavior
After a recent upgrade my app suddently started to throw the following error for some users reported via the Vitals tab of the playstore.
Additional Information
No response