Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Production Build #34

Open
JerakRus opened this issue Sep 6, 2020 · 3 comments
Open

Error in Production Build #34

JerakRus opened this issue Sep 6, 2020 · 3 comments

Comments

@JerakRus
Copy link
Contributor

JerakRus commented Sep 6, 2020

Hello! Made an application release with the latest version of the package (1.0.2) a couple of days ago. I use firebase-analytics in the application. About 1-2 percent of users started receiving errors with the following stack trace:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
       at androidx.appcompat.widget.ResourceManagerInternal.createDrawableIfNeeded(ResourceManagerInternal.java:176)
       at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:141)
       at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)
       at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104)
       at es.dmoral.toasty.ToastyUtils.getDrawable(ToastyUtils.java:55)
       at es.dmoral.toasty.Toasty.error(Toasty.java:242)
       at ui.toasty.RNToastyModule.Show(RNToastyModule.java:103)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:754)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
       at android.os.Looper.loop(Looper.java:165)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
       at java.lang.Thread.run(Thread.java:760)

I am not using any other similar library, so I guess the problem is here. I also seem to have encountered a similar problem in react-native-screens (software-mansion/react-native-screens#463 (comment)), because there are 97% crashes according to analytics occurring in the background. But my knowledge of native code is too small to figure it out. It would be nice if we could do it for everyone.

Снимок экрана 2020-09-06 в 17 18 39

Снимок экрана 2020-09-06 в 17 22 26

P.s. Sorry for my English, I'm using a translator.)

@JerakRus
Copy link
Contributor Author

@prscX Have you ever encountered a similar case?

@Hamawis
Copy link

Hamawis commented Nov 12, 2020

@JerakRus any update on this

@JerakRus
Copy link
Contributor Author

@Hamawis
Hi, unfortunately I haven't received any response here. And I couldn't fix it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants