Unity-Technologies / com.unity.mobile.notifications

Mobile Notifications Package
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.1/manual/index.html
Other
132 stars 42 forks source link

android.content.res.Resources$NotFoundException #210

Closed korober closed 2 years ago

korober commented 2 years ago

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

acttogreen commented 2 years ago

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

andnoonesthere commented 2 years ago

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: https://github.com/Unity-Technologies/com.unity.mobile.notifications/commit/80c7231306f967e608fc5d61ffe6bfdf1b83b260

vaidasma commented 2 years ago

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

andnoonesthere commented 2 years ago

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

y0rshl commented 2 years ago

Is there an ETA on a new release?

aurimasc commented 2 years ago

Should no longer happen with latest master.