Duolith docs

Errors E0400 to E0499

E0400 Push without its Firebase configuration

Message push needs google-services.json to be built for Android

Why

Android receives remote notifications through Firebase Cloud Messaging, which finds the app's Firebase project through the google-services.json file Firebase hands out. Without it the app would build and run, but it could never get a device token, so every subscribe would fail on the phone. A native build of an app that imports push therefore stops at the import. iOS needs no file: APNs works through the app's aps-environment entitlement, which the build writes.

How to fix it

Download google-services.json for this app from the Firebase console (Project settings, Your apps, the Android app) and put it at the project's root, beside duolith.yaml. The build turns it into the Android resources Firebase reads (native/android/res/values/duolith_firebase.xml in the output).

In a terminal

duolith explain E0400

Mentioned in