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

Expo client app crashes after opening template app and idling for >30 minutes #1994

Closed
kelvinlawson opened this issue Jul 16, 2018 · 6 comments

Comments

@kelvinlawson
Copy link

kelvinlawson commented Jul 16, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.5
Node: 7.6.0
Yarn: 1.3.2
npm: 4.6.1
Watchman: 4.7.0
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
expo: ^28.0.0 => 28.0.0
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz => 0.55.4

Diagnostics report:
https://exp-xde-diagnostics.s3.amazonaws.com/texecom-6ac237eb-ef46-49ec-a84a-c515830874ad.tar.gz

Simulator device for this test was iOS 10.2 iPhone SE.

Steps to Reproduce

(Write your steps here:)

  1. Create template "Tab Navigation" Expo project.
  2. Run unmodified in the iOS Simulator (expo start, click Simulator button)
  3. Do a little bit of interaction, click some menu buttons, CMD-R to restart the app. (Not sure if any of this is required).
  4. Do something else for a while - sometimes when you come back to look at the simulator 30 minutes later the Expo app has disappeared and the iOS home screen is showing.

Expected Behavior

(Write what you thought would happen.)

Expo app would still be running in the simulator.

Actual Behavior

App had disappeared.

Jul 16 22:41:39 --- last message repeated 17 times ---
Jul 16 22:41:39 Kelvins-MBP SpringBoard[34710]: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
Jul 16 22:41:39 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (UIKitApplication:host.exp.Exponent[0x4b59][34771]): Service exited due to Segmentation fault: 11
Jul 16 22:41:39 Kelvins-MBP SpringBoard[34710]: UNSUserNotificationServerConnectionListener connection invalidated
Jul 16 22:41:39 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (com.apple.WebKit.Networking.AFDAA8F2-A55C-4BE1-AC58-FAC35A416A0E[34773]): Service exited with abnormal code: 1
Jul 16 22:41:39 Kelvins-MBP backboardd[34712]: [Common] Unable to get short BSD proc info for 34771: No such file or directory
Jul 16 22:41:39 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (com.apple.WebKit.WebContent.7DDCDDF6-4114-423B-B534-0CC3EDFB092A[34774]): Service exited with abnormal code: 1
Jul 16 22:41:39 Kelvins-MBP backboardd[34712]: [Common] Unable to get proc info for 34771: No such file or directory
Jul 16 22:41:39 Kelvins-MBP assertiond[34715]: notify_suspend_pid() failed with error 7
Jul 16 22:41:39 Kelvins-MBP itunesstored[34772]: Getting container class internal daemon!
Jul 16 22:41:39 Kelvins-MBP logd[34705]: metadata shared cached uuid is null (using logd's shared cache info) containermanage (35245)
Jul 16 22:41:39 Kelvins-MBP logd[34705]: Failed to harvest strings for pathless uuid '00000000-0000-0000-0000-000000000000'
Jul 16 22:41:39 Kelvins-MBP containermanagerd[35245]: 0x10abd2380 main: containermanagerd performing first boot initialization
Jul 16 22:41:39 Kelvins-MBP containermanagerd[35245]: 0x10abd2380 -[MCMMigrationStatus isBuildUpgrade]: Current build version (14C89 / (null)) equal to last version recorded (14C89 / (null)); skipping upgrade
Jul 16 22:41:39 Kelvins-MBP containermanagerd[35245]: 0x10abd2380 main: containermanagerd first boot cleanup complete

I also note that when Expo is running normally I see these messages streaming out repeatedly:

Jul 16 22:40:59 Kelvins-MBP Exponent[34771]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 22:40:59 Kelvins-MBP Exponent[34771]: [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.30.16
0 libsystem_network.dylib 0x0000000114c88666 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x0000000114c9f2f6 nw_get_host_stats + 1083
2 libnetwork.dylib 0x0000000115f5fe9f nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000114a10808 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000114a3212e _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000114a174cf _dispatch_queue_serial_drain + 1018
6 libdispatch.dylib 0x0000000114a17c9f _dispatch_queue_invoke + 1118
7 libdispatch.dylib 0x0000000114a199dc _dispatch_root_queue_drain + 506
8 libdispatch.dylib 0x0000000114a19782 _dispatch_worker_thread3 + 113
9 libsystem_pthr
Jul 16 22:40:59 Kelvins-MBP Exponent[34771]: *** LOG MESSAGE QUOTA EXCEEDED - SOME MESSAGES FROM THIS PROCESS HAVE BEEN DISCARDED ***
Jul 16 22:41:01 Kelvins-MBP Exponent[34771]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 22:41:01 Kelvins-MBP Exponent[34771]: [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.30.16
0 libsystem_network.dylib 0x0000000114c88666 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x0000000114c9f2f6 nw_get_host_stats + 1083
2 libnetwork.dylib 0x0000000115f5fe9f nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000114a10808 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000114a3212e _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000114a174cf _dispatch_queue_serial_drain + 1018
6 libdispatch.dylib 0x0000000114a17c9f _dispatch_queue_invoke + 1118
7 libdispatch.dylib 0x0000000114a199dc _dispatch_root_queue_drain + 506
8 libdispatch.dylib 0x0000000114a19782 _dispatch_worker_thread3 + 113
9 libsystem_pthr
Jul 16 22:41:03 Kelvins-MBP Exponent[34771]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 22:41:03 Kelvins-MBP Exponent[34771]: [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.30.16
0 libsystem_network.dylib 0x0000000114c88666 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x0000000114c9f2f6 nw_get_host_stats + 1083
2 libnetwork.dylib 0x0000000115f5fe9f nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000114a10808 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000114a3212e _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000114a174cf _dispatch_queue_serial_drain + 1018
6 libdispatch.dylib 0x0000000114a17c9f _dispatch_queue_invoke + 1118
7 libdispatch.dylib 0x0000000114a199dc _dispatch_root_queue_drain + 506
8 libdispatch.dylib 0x0000000114a19782 _dispatch_worker_thread3 + 113
9 libsystem_pthr

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@kelvinlawson
Copy link
Author

Another Expo client crash, this time with no interaction with the template app at all. Again it is running the Exp Tab Navigation template app.

I pressed the simulator button to start the app and left it running. Did some web browsing for a while and about half an hour later it had crashed. Debug below, including at the beginning some of the network errors I see repeated every few seconds (which may not be related).

Jul 16 23:27:00 Kelvins-MBP Exponent[35394]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 23:27:00 Kelvins-MBP Exponent[35394]: [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.30.16
0 libsystem_network.dylib 0x0000000115180666 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x00000001151972f6 nw_get_host_stats + 1083
2 libnetwork.dylib 0x0000000116457e9f nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000114f08808 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000114f2a12e _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000114f0f4cf _dispatch_queue_serial_drain + 1018
6 libdispatch.dylib 0x0000000114f0fc9f _dispatch_queue_invoke + 1118
7 libdispatch.dylib 0x0000000114f119dc _dispatch_root_queue_drain + 506
8 libdispatch.dylib 0x0000000114f11782 _dispatch_worker_thread3 + 113
9 libsystem_pthr
Jul 16 23:27:02 Kelvins-MBP Exponent[35394]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 23:27:02 Kelvins-MBP Exponent[35394]: [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.30.16
0 libsystem_network.dylib 0x0000000115180666 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x00000001151972f6 nw_get_host_stats + 1083
2 libnetwork.dylib 0x0000000116457e9f nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000114f08808 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000114f2a12e _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000114f0f4cf _dispatch_queue_serial_drain + 1018
6 libdispatch.dylib 0x0000000114f0fc9f _dispatch_queue_invoke + 1118
7 libdispatch.dylib 0x0000000114f119dc _dispatch_root_queue_drain + 506
8 libdispatch.dylib 0x0000000114f11782 _dispatch_worker_thread3 + 113
9 libsystem_pthr
Jul 16 23:27:04 Kelvins-MBP Exponent[35394]: [] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
Jul 16 23:27:06 --- last message repeated 1 time ---
Jul 16 23:27:06 Kelvins-MBP SpringBoard[34710]: UNSUserNotificationServerConnectionListener connection invalidated
Jul 16 23:27:06 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (UIKitApplication:host.exp.Exponent[0x5366][35394]): Service exited due to Segmentation fault: 11
Jul 16 23:27:06 Kelvins-MBP SpringBoard[34710]: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
Jul 16 23:27:06 Kelvins-MBP backboardd[34712]: [Common] Unable to get short BSD proc info for 35394: No such process
Jul 16 23:27:06 Kelvins-MBP backboardd[34712]: [Common] Unable to get proc info for 35394: No such process
Jul 16 23:27:06 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (com.apple.WebKit.Networking.80937085-C59B-4EF5-8BC1-DF3D7FBA8819[35397]): Service exited with abnormal code: 1
Jul 16 23:27:06 Kelvins-MBP com.apple.CoreSimulator.SimDevice.5E991EB7-2C2C-4087-AD7A-852B4380692B[34691] (com.apple.WebKit.WebContent.CAFDC399-45BE-4B9C-B4F4-7EADB852C6F5[35398]): Service exited with abnormal code: 1

@ccheever ccheever added the iOS label Jul 17, 2018
@ccheever
Copy link
Contributor

thanks for the report. we'll take a look.

@raideltorres
Copy link

there is more info here https://forums.expo.io/t/expo-client-app-crashes/11022/8

@terribleben terribleben changed the title Expo client app crashes in iOS Simulator Expo client app crashes after opening template app and idling for >30 minutes Jul 17, 2018
@brentvatne
Copy link
Member

I believe this is related to an upstream bug in the websocket library in react-native, it only happens in development mode (when connecting to websocket for live reload I believe) and doesn't have a large impact on development so we haven't prioritized it but it would certainly but nice to get to it. If you'd like to help out, you could investigate updating SRWebSocket in react-native

@kelvinlawson
Copy link
Author

Yes, it only seems to happen during development in the simulator, not in the field. So I agree not that high a priority.

I do occasionally see simulator Expo crashes while interacting with it as well, not just idling by the way, but that might be something different.

@tsapeta
Copy link
Member

tsapeta commented Jul 11, 2020

This issue seems to be already outdated and SDK28 is no longer supported, so I'm closing this but feel free to open a new issue if you're still facing it 🙂

@tsapeta tsapeta closed this as completed Jul 11, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants