urbanairship / airship-flutter

Flutter integration
Other
17 stars 18 forks source link

Push registration failed - Android #204

Closed rlee1990 closed 3 months ago

rlee1990 commented 3 months ago

Preliminary Info

What Airship dependencies are you using?

airship_flutter: ^7.4.0

What are the versions of any relevant development tools you are using?

I am using VSCode with Flutter Channel stable, 3.19.2

Report

What unexpected behavior are you seeing?

I am receiving the below error when the app is loaded. It shows the device in the dashboard but that it is opted out even though I added all the code to enable it and push notifications have been enabled.

UALib(23602): PushManager - Push registration failed with error: FCM error Default FirebaseApp is not initialized in this process com.socialjawn.supabase.test.supabase_social_jawn_test. Make sure to call FirebaseApp.initializeApp(Context) first.. Will retry.

What is the expected behavior?

For the android device to be opted in and receive push notifications that are sent.

rlepinski commented 3 months ago

That error happens if firebase fails to initialize. Could you verify you have a google-services.json file located in the app directory for android and that your package name matches what is expected for the FCM project?

rlee1990 commented 3 months ago

@rlepinski yes the google-services.json file is located in the app directory under Android. The package name is an exact match. I even did a test push from firebase and it came through.

rlepinski commented 3 months ago

could you provide your merged manifest? Its in app/build/intermediates/merged+_manifests directory

rlee1990 commented 3 months ago

@rlepinski here they are output-metadata.json

rlee1990 commented 3 months ago

@rlepinski I just emailed it to you