question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash reports from production

See original GitHub issue

First of all, thanks for making and supporting this library 😃

We’re using it in our app (V 3.2.1), and we’re seeing quite a lot of errors from production (from the Google play console). Here’s a typical stack trace:

com.facebook.react.common.JavascriptException: TypeError: undefined is not a function
This error is located at:
in ToastContainer
in _default
in _default
in Root
in RootSiblingParent
in Root
in UserProvider
in ThemeProvider
in _default
in RCTView
in Unknown
in ChildrenWrapper
in _default
in Root
in RCTView
in Unknown
in AppContainer, js engine: hermes, stack:
anonymous@1:644553
commitUnmount@1:93662
unmountHostComponents@1:95576
commitMutationEffects@1:96794
commitRootImpl@1:103897
commitRoot@1:103518
performSyncWorkOnRoot@1:100589
flushSyncCallbacks@1:68909
scheduleUpdateOnFiber@1:98451
updateContainer@1:108227
unmountComponentAtNode@1:108455
anonymous@1:117847
unmountApplicationComponentAtRootTag@1:439181
__callFunction@1:128697
anonymous@1:127320
__guard@1:128264
callFunctionReturnFlushedQueue@1:127278
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
  at android.os.Looper.loop (Looper.java:246)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:226)
  at java.lang.Thread.run (Thread.java:923)

We’re totally unable to recreate this internally. I think it’s happening from our app when we have code that responds to a notification being received in the foreground - in that case it uses this lib to show a message to the user. The toast is wrapped in this helper:

const ToastInfo = (message, options) => {
  try {
    Toast.show(message, {
      ...baseOptions,
      position: Platform.OS === 'android' ? 70 : 80,
      backgroundColor: AppColors.blue80,
      ...options,
    });
  } catch {
    // Something went wrong with Toast..
    // Logging code here.
  }
};

So the addition of the try/catch doesn’t catch anything, I’m a bit stumped about where to look next…

Any ideas?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:14

github_iconTop GitHub Comments

2reactions
sunnylqmcommented, Oct 17, 2021

Is it the same as https://github.com/magicismight/react-native-root-toast/issues/146 ?

Can you guys try install the master version which includes a fix to the problem above

npm install https://github.com/magicismight/react-native-root-toast
2reactions
snashugcommented, Oct 15, 2021

I have the error too

com.facebook.react.common.JavascriptException: TypeError: undefined is not a function
This error is located at:
in ToastContainer
in _default
in _default
in Root
in RootSiblingParent
in App
in RCTView
in Unknown
in ChildrenWrapper
in _default
in Root
in RCTView
in Unknown
in AppContainer, js engine: hermes, stack:
anonymous@1:702238
commitUnmount@1:104651
unmountHostComponents@1:106661
commitMutationEffects@1:107973
commitRootImpl@1:115621
commitRoot@1:115206
performSyncWorkOnRoot@1:112167
flushSyncCallbacks@1:79676
scheduleUpdateOnFiber@1:109696
updateContainer@1:120009
unmountComponentAtNode@1:120232
anonymous@1:129857
unmountApplicationComponentAtRootTag@1:446505
__callFunction@1:56173
anonymous@1:54662
__guard@1:55619
callFunctionReturnFlushedQueue@1:54620
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
  at android.os.Looper.loop (Looper.java:246)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:226)
  at java.lang.Thread.run (Thread.java:923)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing issues using crash reports and device logs
Configure Xcode to produce the symbol information for debugging and crash reports. Diagnosing memory, thread, and crash issues early. Identify runtime crashes ...
Read more >
Crash Reports - The Chromium Projects
Production Debugging. If a crash is not reproducible, the only tools at one's disposal for investigation are what can be gleaned from a...
Read more >
Production: Capture & Analyze Native Crash Reports - YouTube
How to capture crashes with Instabug and utilize the reports. ... Production : Capture & Analyze Native Crash Reports | How to Debug...
Read more >
Traffic Crash Reports - Missouri State Highway Patrol
Online Traffic Crash Reports: A search tool to identify persons involved in crashes that occurs in the past 29 days. Disclaimer. The statistical...
Read more >
Crash reporting software, by DataDriven | Law enforcement ...
Watson crash reporting software for law enforcement is state compliant, ... levels can produce quality, state validated reports in a matter of minutes....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found