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 report when calling closeAllModals() and openModal(), undefined is not an object

See original GitHub issue

Thanks for your great library!

I am currently on v3.0.1, and getting a lot of crash reports dealing with “undefined is not an object”.

Can this fail more gracefully (just early return) when undefined is not an object?

closeAllModals()

Fatal Exception: com.facebook.react.common.c
TypeError: undefined is not an object (evaluating '(0,v.default)(n.stack.openedItems).slice(-1)[0].hash') This error is located at: in l in p in RCTView in Unknown in R in Unknown in RCTView in Unknown in R in Unknown in p in y in P in RCTView in Unknown in l in RCTView in Unknown in R in Unknown in PanGestureHandler in S in w in RCTView in Unknown in v in l in C in x in p in RCTView in Unknown in M in b in C in l in v in Unknown in Unknown in Unknown in Unknown in B in Unknown in RCTView in Unknown in RCTView in Unknown in b, stack: <unknown>@1410:3955 o@1410:503 f@1410:3724 closeAllModals@1410:4352 <unknown>@1627:3754 Ul@63:66789 Ha@63:84456 Ea@63:78229 Ea@-1 ft@63:26099 _a@63:75396 jr@63:48144 jr@-1 <unknown>@1634:5683 _@1337:2386 <unknown>@1337:2603 value@28:1292 <unknown>@1335:1355 value@28:1292 <unknown>@530:1635 value@28:1292 value@44:3556 <unknown>@44:673 value@44:2503 value@44:645 value@-1

openModal()

Fatal Exception: com.facebook.react.common.c
TypeError: undefined is not an object (evaluating 'f.default.getState().currentModal') This error is located at: in l in p in RCTView in Unknown in R in Unknown in RCTView in Unknown in R in Unknown in p in y in P in RCTView in Unknown in l in RCTView in Unknown in R in Unknown in PanGestureHandler in S in w in RCTView in Unknown in v in l in C in x in p in RCTView in Unknown in M in b in C in l in v in Unknown in Unknown in Unknown in Unknown in B in Unknown in RCTView in Unknown in RCTView in Unknown in b, stack: openModal@1423:1013 <unknown>@1635:1086 Ul@63:66789 Ha@63:84456 <unknown>@63:82784 Y@179:2883 e@179:400 <unknown>@91:1256 k@91:499 callTimers@91:2652 value@44:3556 <unknown>@44:673 value@44:2503 value@44:645 value@-1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
okcompewtercommented, May 4, 2022

Created new Issue 78.

1reaction
CharlesMangwacommented, Apr 24, 2022

🚀 v3.2.0 is out with the fix (and a few of other nice things 😁)!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bottom sheet crashes app due to racing conditions ... - GitHub
I believe the issue is that the animated values are not fully set while the modal is opening or closing, and sometimes it...
Read more >
Modal doesn't open in react native. Gives "undefined is not an ...
I am trying to use Modal from https://github.com/maxs15/react-native-modalbox to open item from FlatList. However, I receive an error 'undefined ...
Read more >
Crash in background on iOS 15 EXC_CRASH (SIGKILL)
We have deployed a fix to the backend services that provide crashes for your app into the Xcode Organizer, so if you receive...
Read more >
ion-modal: Ionic Mobile App Custom Modal API Component
ion-modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about custom...
Read more >
Modal | Components - BootstrapVue
preventDefault() , when used, must be called synchronously, as async is not supported. Open Modal. Submitted Names: --. <template> <div> ...
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