Open Rashber opened 1 month ago
Thanks for reporting! Your manifest looks to still have old v3 OneSignal code which was changed in v5.
(For context, v5 does not have com.onesignal.UpgradeReceiver or com.onesignal.BootUpReceiver and was changed to com.onesignal.notifications.receivers.UpgradeReceiver and com.onesignal.notifications.receivers.BootUpReceiver)
Could you make sure to run all the steps in Window > OneSignal SDK Setup and to resolve your Android dependencies with Assets > External Dependency Manager > Android Resolver > Force Resolve
Let me know if you are still experiencing the issue
Thanks for the reply! I ran all the steps a few times, and ran the installation process again and again. And deleting all references in between to start fresh. I tried deleting this block of code, and after reinstalling, resolving and running the setup, this block kept re-appearing with the same class namespace. Can I assume that by changing the class path to the path you've wrote, it might solve it?
Any chance I can have the right manifest block for all oneSignal related receivers / activities, so I can compare and see what's missing?
Thanks for the detailed update! I think you might still have some old files that are inserting the old dependencies. Have you followed the Migration v3 to v5 Guide? If you haven't already, I recommend doing:
Assets/OneSignal
I think "Deleting the directory at Assets/OneSignal
" is the step you may have missed. I tested upgrading from 3.0.6 to 5.1.4 on a blank project with the following steps and my Android manifest is updated. If this was the issue, I apologize for the confusion and will update our docs to make this clear.
Can I assume that by changing the class path to the path you've wrote, it might solve it?
I think this could solve it but you would need to export your Unity project and manually edit your APK's manifest every time. Ideally I think it would be better if the project exported the APK correctly.
Any chance I can have the right manifest block for all oneSignal related receivers / activities, so I can compare and see what's missing?
If the above doesn't work, I can provide the manifest of our example project's APK for you! You can also produce one with a new blank project with 5.1.4
Thanks for the reply! I opened a fresh new project, downloaded and installed OneSignal 5.1.4 through the package manager, following all the stages, and yet it did not add the references to the manifest. I see the OnesSignal folder, and all of it's dependencies in my project, the "OneSignal SDK setup" worked fine without errors, and so did the "Force Resolve". At this point i'm at lost, and reverted to 3.0.12.
Are you able to reproduce the crash yourself or are you only seeing crash reports?
It sounds like the 3.x.x SDK is not fully being removed due to some unknown reason, as the reference to some of the classes are not being cleaned up such as com.onesignal.UpgradeReceiver. Could you fully remove OneSignal again ensuring that the manifest entries are completely removed from all AndroidManifest.xml files? Making sure all pieces of OneSignal are removed is critical here, search your full Unity project for any OneSignal references. Restart Unity and then install OneSignal 5.x.x SDK again.
When you tested a fresh new project, how did you check the manifest references? Did you run into any crashes on the new project? In 5.x.x, the manifest entires for OneSignal are not visible within Unity. The only way you would see them is if you extract it from the resulting APK.
Did you see any runtime crashes after building the new project with OneSignal?
How can we help?
I've lately updated the onesignal sdk from 3.0.6 to 5.1.4 (installed from the asset store), running unity 2022.3.21. in a large portion of android devices i keep seeing this runtime error
this error appears for both
UpgradeReceiver
andBootUpReceiver
. this is the onesignal block from my manifesttried removing one signal package, and installing it both from the asset store again, and through the scoped registry, and got the same errors. followed the instructions here: https://documentation.onesignal.com/docs/unity-sdk-setup In some devices I still manage to get notifications, despite the errors. any advice on what might have gone wrong?
Code of Conduct