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

Fatal Exception On Android #11

Open
SundaramSrivastava opened this issue Aug 9, 2023 · 1 comment
Open

Fatal Exception On Android #11

SundaramSrivastava opened this issue Aug 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@SundaramSrivastava
Copy link

Description

Whenever I am trying to show a toast react native is throwing an exception

Fatal Exception: com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get for prop 'Ting': java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference, js engine: hermes, stack:
anonymous@1:3844578
loadModuleImplementation@1:101879
guardedLoadModule@1:101433
metroRequire@1:101061
anonymous@1:3842863
loadModuleImplementation@1:101879
guardedLoadModule@1:101433
metroRequire@1:101061
anonymous@1:759163
loadModuleImplementation@1:101879
guardedLoadModule@1:101433
metroRequire@1:101061
anonymous@1:642845
loadModuleImplementation@1:101879
guardedLoadModule@1:101433
metroRequire@1:101061
anonymous@1:108317
loadModuleImplementation@1:101879
guardedLoadModule@1:101390
metroRequire@1:101061
global@1:100617

       at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(:75)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:148)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(:147)
       at com.facebook.jni.NativeRunnable.run(SourceFile)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage()
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(:37)
       at java.lang.Thread.run(Thread.java:1012)

It's happening in Production build that too this issue is only visible on android devices.

Code

toast({ title: "Edit 📝", message: "Successful!!", position: "bottom", haptic: "success", backgroundColor: "#ffffff", messageColor: "#000000", preset: "done", })

React Native Version

0.72.3

@baronha baronha added the bug Something isn't working label Aug 9, 2023
@pekq
Copy link

pekq commented Mar 8, 2024

We are seeing this too. One of the most severe causes of crashes on our app, unfortunately.

@SundaramSrivastava did you find any workaround or cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants