Unity-Technologies/com.unity.mobile.notifications

android.content.res.Resources$NotFoundException

korober opened this issue ยท 6 comments

I still have a lot of crashes in Google Console:
Unity: 2021.3.5f1
Mobile Notifications: 2.0.2 (May 19, 2022) - latest release version in upm
Additional plugins: Firebase Unity Sdk: 9.20
Here is a lot of messages about the issue

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3107)
  at android.app.ActivityThread.-wrap18 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1611)
  at android.os.Handler.dispatchMessage (Handler.java:110)
  at android.os.Looper.loop (Looper.java:203)
  at android.app.ActivityThread.main (ActivityThread.java:6251)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1063)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:924)
Caused by: android.content.res.Resources$NotFoundException: 
  at android.app.ResourcesManager.createAssetManager (ResourcesManager.java:253)
  at android.app.ResourcesManager.createResourcesImpl (ResourcesManager.java:310)
  at android.app.ResourcesManager.getOrCreateResources (ResourcesManager.java:571)
  at android.app.ResourcesManager.getResources (ResourcesManager.java:645)
  at android.app.ActivityThread.getTopLevelResources (ActivityThread.java:1920)
  at android.app.LoadedApk.getResources (LoadedApk.java:771)
  at android.app.ContextImpl.<init> (ContextImpl.java:2055)
  at android.app.ContextImpl.createApplicationContext (ContextImpl.java:1824)
  at android.content.ContextWrapper.createApplicationContext (ContextWrapper.java:792)
  at android.content.ContextWrapper.createApplicationContext (ContextWrapper.java:792)
  at android.app.Notification$Builder.recoverBuilder (Notification.java:3803)
  at com.unity.androidnotifications.UnityNotificationUtilities.recoverBuilder
  at com.unity.androidnotifications.UnityNotificationManager.loadSavedNotifications (UnityNotificationManager.java)
  at com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver.rescheduleSavedNotifications
  at com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver.onReceive
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3100)
  at android.app.ActivityThread.-wrap18 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1611)
  at android.os.Handler.dispatchMessage (Handler.java:110)
  at android.os.Looper.loop (Looper.java:203)
  at android.app.ActivityThread.main (ActivityThread.java:6251)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1063)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:924)

image
image
image

same issues, any help ? this cause spike ANR in our production and affecting our sales so much.

Next version will fix this. You can see a commit with a fix in the repository. We had this problem since March. Your best option for now is to add the package directly to the project (copy it to Packages folder) and apply the fix from repository.

Here's the link: 80c7231

May I have the confirmation that the issue's you guys were having were fixed in the newer releases?

No, it wasn't, because the latest release was 2.0.2 and it doesn't contain the fix.

Is there an ETA on a new release?

Should no longer happen with latest master.