This error message typically indicates a configuration issue within your Unity project, even if your Firebase and Pushwoosh dashboards seem correct. The most common cause is the misplacement of the google-services.json file.
Follow these steps to resolve the issue:
Check the
google-services.jsonFile LocationFirebase requires this file to be in a specific location to initialize correctly. Ensure you have placed the
google-services.jsonfile (downloaded from your Firebase project) directly into the root of yourAssetsfolder within your Unity project.- Incorrect Path Example:
YourProject/Assets/Plugins/google-services.json - Correct Path:
YourProject/Assets/google-services.json
- Incorrect Path Example:
Verify
AndroidManifest.xmlConfigurationAn improperly configured
AndroidManifest.xmlcan also lead to registration failures, sometimes showing a401 Unauthorizederror in the device logs. Verify that your Pushwoosh API token is correctly added to your mainAndroidManifest.xmlfile.<application> <!-- other tags --> <meta-data android:name="com.pushwoosh.apitoken" android:value="YOUR_PUSHWOOSH_API_TOKEN" /> <!-- other tags --> </application>If you have multiple
AndroidManifest.xmlfiles in your project (e.g., from different plugins), ensure this meta-data tag is present in the final, merged manifest used for the build.
Correcting the location of the google-services.json file resolves the vast majority of these token retrieval errors.
Comments
0 comments
Please sign in to leave a comment.