Hello ,
I think I made all setup inside the this document correctly (Like Firebase, Unity Editor, Unity Dashboard). No error during the build process. But when I open my Android device, I got this error message when run the
RegisterForPushNotificationsAsync method**:**
Failed to initialize Push Notification plugin instance and register the device for remote notifications
- The build was made on Unity Cloud Build (2022.2.13f1)
- Iām using the same script sample to test
- Iām testing an apk (not a published build)
[EDIT]
- I made a local build (2022.2.12f1) and got the same error
[OBS]
- I geeting this message before the exception message:
FirebaseApp: Device unlocked: initializing all Firebase APIs for app UNITY_PUSH_NOTIFICATIONS
Hi rdossantos,
thanks for posting on the forums.
Is this a sample project? If so would it be possible to send me the project in a DM?
I would love to explore the code and see what may be going wrong. What version of the Push Notifications Beta are you currently using?
[IOS UPDATE]
Iām getting the error below while Iām building on Unity Cloud Build.
Error Detail:
- INFO: āø error: Provisioning profile ā----ā has app ID ā----ā, which does not match the bundle ID ā----.notificationserviceā. (in target ānotificationserviceā from project āUnity-iPhoneā)
I search on the project about the notificationservice key and saw that Push Notification Process appends this information to my identifier.
Question:
- What do I have to make to work?
Extra Info:
- Unity Version: Unity 2022.2.11f1
- Xcode Version: Xcode 13.4.1
- Ruby version: 2.7.4
I will move the last question to a new topic. To be more specific:
Topic Link
Hey,
i cant register my app, too. Only get the exception while running my mobile app āFailed to register the device for remote notificationā. (only trying it for Android)
I think i followed all steps written in the documentary
- imported the push-notification sdk 3.01 Preview
- Create a Firebase account for my game and import the google-services.json
- generate an service account key
- add generated key to Liveops->Push Notifications ā Settings
- add all information about firebase to Unity->projectsetting ->Push notifications
- enable Cloud Messaging API (Legacy) in firebase
I am using Unity 2021.3.8 and my mobile phone using version 12.
I Copied the code above and resolve with the android resolver, but the exception is still triggered.
Does anyone have an idea how i to solve this?
Hey @rdossantos_unity ,
Yes i added the key and using my development environment in my current build. (Like in Remote Config, Analytics, Leaderboard etc.)
@rdossantos_unity
I had the same symptoms as you. In my case, There was an additional space character at the end of the āFirebase App Keyā because I had copied the id by just doubleclicking in the web browser.
After removing the space , I could get the push registration token.
Hope this helpsā¦