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

TypeError: undefined is not an object (evaluating 'e._children.forEach') #26763

Closed
mykhailo-melnyk opened this issue Oct 8, 2019 · 9 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@mykhailo-melnyk
Copy link

Application is working as expected in debug mode but in release, app is crashed. Why can it happen? Any idea?

React Native version:

Steps To Reproduce

  1. I updated react native version from 0.59.9 to 0.61.2
  2. Application is working on debug mode but crash in release mode

Error from bugsnag:
Screenshot at Oct 08 12-14-04

Error from Xcode
<--
2019-10-08 12:08:01.529 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in y
in c
in RCTView
in n
in RCTView
in RCTView
in u
in TouchableOpacity
in h
in RCTView
in withTouchableScale(n)
in h
in RCTView
in RCTView
in RCTSafeAreaView
in SafeAreaView
in c
in n
in _
in t
in withNavigationFocus(t)
in withNavigation(withNavigationFocus(t))
in p
in RCTView
in u
in RCTView
in u
in n
in n
in E
in RCTView
in n
in RCTView
in u
in PanGestureHandler
in n
in L
in RCTView
in n
in t
in P
in v
in p
in RCTView
in RCTView
in l
in RCTView
in n
in RCTView
in u
in RCTView
in u
in PanGestureHandler
in n
in S
in P
in A
in RCTView
in h
in RCTView
in n
in _
in p
in withDeviceRegistration(p)
in _
in RCTView
in n
in f
in b
in n
in RCTView
in RCTView
in h
2019-10-08 12:08:01.548 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in A
in RCTView
in h
in RCTView
in n
in _
in p
in withDeviceRegistration(p)
in _
in RCTView
in n
in f
in b
in n
in RCTView
in RCTView
in h
2019-10-08 12:08:01.556 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
INFO : BSG_KSCrashReport.c (1557): void bsg_kscrashreport_writeStandardReport(BSG_KSCrash_Context const, const char const): Writing crash report to /Users/michael/Library/Developer/CoreSimulator/Devices/D03AA692-4863-4625-BD1D-6DEEA07C3242/data/Containers/Data/Application/B42CF986-7D0E-439D-8B49-7EA817DE7028/Library/Caches/KSCrashReports/LINK Hotel/LINK Hotel-CrashReport-7E00B6D1-74B3-4B5D-97CD-88E896696691-e-u-TypeError.json
INFO : BSG_KSCrashReport.c (1557): void bsg_kscrashreport_writeStandardReport(BSG_KSCrash_Context const, const char const): Writing crash report to /Users/michael/Library/Developer/CoreSimulator/Devices/D03AA692-4863-4625-BD1D-6DEEA07C3242/data/Containers/Data/Application/B42CF986-7D0E-439D-8B49-7EA817DE7028/Library/Caches/KSCrashReports/LINK Hotel/LINK Hotel-CrashReport-A27194C1-044B-4664-91AD-CF8296BE26D6-e-u-TypeError.json
2019-10-08 12:08:01.772 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in A
in RCTView
in h
in RCTView
in n
in _
in p
in withDeviceRegistration(p)
in _
in RCTView
in n
in f
in b
in n
in RCTView
in RCTView
in h
2019-10-08 12:08:01.775 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in A
in RCTView
in h
in RCTView
in n
in _
in p
in withDeviceRegistration(p)
in _
in RCTView
in n
in f
in b
in n
in RCTView
in RCTView
in h
2019-10-08 12:08:01.778621+0300 LINK Hotel*[39086:5423184] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in A
in RCTView
in h
in RCTView
in n
in _
in p
in withDeviceRegistration(p)
in _
in RCTView
in n
in f
in b
in n
in RCTView
in RCTView
in h', reason: 'Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in A
in RCTView
in h
in RCTView
..., stack:
gt@96:22301
forEach@:
gt@96:22309
Di@96:60682
Fl@96:76271
Fl@:
unstable_runWithPriority@171:3915
Dl@96:74539
Dl@:
Pl@96:65839
Pl@:
@96:25495
unstable_runWithPriority@171:3915
sn@96:25442
cn@96:25377
_e@96:88610
Ne@96:13582
Ue@96:13755
receiveTouches@96:14547
value@38:3685
@38:841
value@38:2939
value@38:813
value@:
'
*** First throw call stack:
(
0 CoreFoundation 0x00000001142766fb _exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011246dac5 objc_exception_throw + 48
2 LINK Hotel* 0x000000010ddb6076 RCTFormatError + 0
3 LINK Hotel* 0x000000010de2b961 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 508
4 CoreFoundation 0x000000011427d4cc invoking
+ 140
5 CoreFoundation 0x000000011427aa45 -[NSInvocation invoke] + 325
6 CoreFoundation 0x000000011427ae96 -[NSInvocation invokeWithTarget:] + 54
7 LINK Hotel* 0x000000010dde9e80 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 578
8 LINK Hotel* 0x000000010ddec12e _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 246
9 LINK Hotel* 0x000000010ddebeb6 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
10 libdispatch.dylib 0x0000000116c6dd7f _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x0000000116c6edb5 _dispatch_client_callout + 8
12 libdispatch.dylib 0x0000000116c76225 _dispatch_lane_serial_drain + 778
13 libdispatch.dylib 0x0000000116c76e9c _dispatch_lane_invoke + 425
14 libdispatch.dylib 0x0000000116c80ea3 _dispatch_workloop_worker_thread + 733
15 libsystem_pthread.dylib 0x000000011704f611 _pthread_wqthread + 421
16 libsystem_pthread.dylib 0x000000011704f3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
-->

@mykhailo-melnyk
Copy link
Author

also what I see for example project in release mode (for debug mode - all good)

Screenshot at Oct 08 15-22-20

@Taylor123
Copy link
Contributor

Taylor123 commented Oct 18, 2019

I'm seeing a similar crash in release when upgrading from 59.4 -> 60.5

Based on the stack trace, it looks like it has to do with react-navigation. What navigation version are you using?

Edit: Still working through this, but doesn't seem to be an issue with react-navigation. Having just a basic view renders fine in release mode, but when i have my view that's more complex and includes a FlatList, it crashes immediately and doesn't render any text

@cybersgk
Copy link

Seeing the same crash. Just after launching the splash screen in only release mode. Debug seems to do fine. Reproduced in simulator to find this same error.
Here is my log:
`2019-10-22 12:43:40.360 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e._children.forEach')

This error is located at:
in Connect(n)
in p
in p
in C
in P
in n
in Connect(n)
in RCTView
in l
in l
in RCTView
in RCTView
in h

This error is located at:
in P
in n
in Connect(n)
in RCTView
..., stack:
gt@94:22301
forEach@:
gt@94:22309
forEach@:
gt@94:22309
forEach@:
gt@94:22309
forEach@:
gt@94:22309
Di@94:60682
Fl@94:76271
Fl@:
unstable_runWithPriority@169:3915
Dl@94:74539
Dl@:
Pl@94:65839
Pl@:
@94:25495
unstable_runWithPriority@169:3915
sn@94:25442
cn@94:25377
kl@94:64831
enqueueSetState@94:31251
setState@61:2074
dispatch@452:1477
@416:741
syncData@1223:654
@1223:1035
y@112:661
callTimers@112:2718
value@24:3685
@24:841
value@24:2939
value@24:813
value@:
'
*** First throw call stack:
(
0 CoreFoundation 0x000000010b7db6fb _exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010bf3dac5 objc_exception_throw + 48
2 ProjectName 0x0000000104011132 RCTFormatError + 0
3 ProjectName 0x0000000104086e61 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 508
4 CoreFoundation 0x000000010b7e24cc invoking
+ 140
5 CoreFoundation 0x000000010b7dfa45 -[NSInvocation invoke] + 325
6 CoreFoundation 0x000000010b7dfe96 -[NSInvocation invokeWithTarget:] + 54
7 ProjectName 0x0000000104045350 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 578
8 ProjectName 0x00000001040475fe _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 246
9 ProjectName 0x0000000104047386 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
10 libdispatch.dylib 0x000000010e67dd7f _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x000000010e67edb5 _dispatch_client_callout + 8
12 libdispatch.dylib 0x000000010e686225 _dispatch_lane_serial_drain + 778
13 libdispatch.dylib 0x000000010e686e9c _dispatch_lane_invoke + 425
14 libdispatch.dylib 0x000000010e690ea3 _dispatch_workloop_worker_thread + 733
15 libsystem_pthread.dylib 0x000000010ea66611 _pthread_wqthread + 421
16 libsystem_pthread.dylib 0x000000010ea663fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
`

@cybersgk
Copy link

Found that the Text component is making the problem. After removing it app works but no text components present. Can anyone help to solve this problem. Thank you. I will try on my end as well.

@cybersgk
Copy link

Found the problem.
Its react-native-text-gradient patch which meddled with the code.
After fixing it myself the above problem vanished. And it's now good to go.

@Taylor123
Copy link
Contributor

@cybersgk great catch! Totally forgot this project was patching the renderer for react-native-gradient-text

updated patch snippet

@mykhailo-melnyk
Copy link
Author

@cybersgk thanks a lot!

@stale
Copy link

stale bot commented Jan 22, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 22, 2020
@stale
Copy link

stale bot commented Jan 30, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 30, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants