opentok-react-native
opentok-react-native copied to clipboard
IOS Hard Crash when bumping to 0.21.0. `Thread 30: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)`
Bug Report
Current behavior
We copy-pasted the BasicVideoChat
code from the samples into our own codebase. The BasicVideoChat sample currently uses "^0.20.3"
and works in our code! However, bumping the version to the latest release on npm, 0.21.0
causes an immediate crash using the same code when passing in a apiKey
, sessionId
and token
.
We have tested using the opentok-react-native-samples. Again, it works with the default "^0.20.3"
. However bumping to 0.21.0
there's a hard crash in the BasicVideoChat
.
Steps to reproduce
-
Open the
package.json
file of theBasicVideoChat
module and bump the version to0.21.0
-
Replace the empty strings for
apiKey
,sessionId
andtoken
with valid values in the App.js file (we used a tokbox playground to generate these values) -
Using terminal, navigate to the
BasicVideoChat
directory and runnpm i
to install this latest version -
cd into the
ios
folder and runpod update
to update the native dependencies required for0.21.0
-
Build the project using Xcode --> project will crash immediately once built
NOTE: The app did not crash if theapiKey
,sessionId
, andtoken
were still the default empty strings.
XCode Error: Thread 30: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
Example Project
- Can be reproduced using the opentok-react-native-samples project.
What is the current bug behavior?
- The app hard crashes when provided a
apiKey
,sessionId
andtoken
on IOS.
What is the expected correct behavior?
- The app should connect to the Playground the same way it does on previous versions
Relevant logs and/or screenshots
React Native Version: 0.68.2
Xcode Version: 13.4 (13F17a)
Error: Thread 29: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
2022-07-22 11:14:56.852865-0400 BasicVideoChat[64258:760014] [connection] nw_socket_handle_socket_event [C1.1:1] Socket SO_ERROR [61: Connection refused]
2022-07-22 11:14:56.858820-0400 BasicVideoChat[64258:760014] [connection] nw_socket_handle_socket_event [C1.2:1] Socket SO_ERROR [61: Connection refused]
2022-07-22 11:14:56.862991-0400 BasicVideoChat[64258:760016] [connection] nw_connection_get_connected_socket [C1] Client called nw_connection_get_connected_socket on unconnected nw_connection
2022-07-22 11:14:56.863176-0400 BasicVideoChat[64258:760016] TCP Conn 0x6000032544d0 Failed : error 0:61 [61]
2022-07-22 11:14:56.881970-0400 BasicVideoChat[64258:759806] [native] Running application BasicVideoChat ({
initialProps = {
};
rootTag = 1;
})
2022-07-22 11:14:57.275021-0400 BasicVideoChat[64258:760033] [javascript] Running "BasicVideoChat" with {"rootTag":1,"initialProps":{}}
2022-07-22 11:14:57.278716-0400 BasicVideoChat[64258:760017] [connection] nw_socket_handle_socket_event [C6.1:1] Socket SO_ERROR [61: Connection refused]
2022-07-22 11:14:57.281808-0400 BasicVideoChat[64258:760017] [connection] nw_socket_handle_socket_event [C6.2:1] Socket SO_ERROR [61: Connection refused]
2022-07-22 11:14:57.282899-0400 BasicVideoChat[64258:760016] [connection] nw_connection_get_connected_socket [C6] Client called nw_connection_get_connected_socket on unconnected nw_connection
2022-07-22 11:14:57.283221-0400 BasicVideoChat[64258:760016] TCP Conn 0x600003254160 Failed : error 0:61 [61]
2022-07-22 11:14:57.308887-0400 BasicVideoChat[64258:760033] [javascript] 'ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from \'deprecated-react-native-prop-types\'.', '\nApp@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.BasicVideoChat:111871:36\nRCTView\nView\nRCTView\nView\nAppContainer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.BasicVideoChat:78602:36\nBasicVideoChat(RootComponent)@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.BasicVideoChat:85286:28'
*********************** OpenTok iOS SDK ****************************
**** Version/Revision: ios-2.22.3/86d684fa2c49c335cc63ce5c52f57fd8610db130
**** Library built on: May 17 2022
**** Copyright 2022 Vonage
**** Licensed under the Apache License, Version 2.0
****
(lldb)

Thanks for the report! We are taking a look
@NicholasBoccuzzi do you have any updates? I am trying to debug the issue but still no good news
I published a new version 0.21.1
that fixes the iOS bug. Let me know!