opentok-react-native icon indicating copy to clipboard operation
opentok-react-native copied to clipboard

IOS Hard Crash when bumping to 0.21.0. `Thread 30: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)`

Open NicholasBoccuzzi opened this issue 2 years ago • 1 comments

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

  1. Clone opentok-react-native-samples

  2. Open the package.json file of the BasicVideoChat module and bump the version to 0.21.0

  3. Replace the empty strings for apiKey, sessionId and token with valid values in the App.js file (we used a tokbox playground to generate these values)

  4. Using terminal, navigate to the BasicVideoChat directory and run npm i to install this latest version

  5. cd into the ios folder and run pod update to update the native dependencies required for 0.21.0

  6. Build the project using Xcode --> project will crash immediately once built
    NOTE: The app did not crash if the apiKey, sessionId, and token were still the default empty strings.

XCode Error: Thread 30: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

Example Project

What is the current bug behavior?

  • The app hard crashes when provided a apiKey, sessionId and token 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) 
Screen Shot 2022-07-22 at 11 16 23 AM

NicholasBoccuzzi avatar Jul 22 '22 15:07 NicholasBoccuzzi

Thanks for the report! We are taking a look

abdulajet avatar Jul 25 '22 10:07 abdulajet

@NicholasBoccuzzi do you have any updates? I am trying to debug the issue but still no good news

enricop89 avatar Sep 13 '22 13:09 enricop89

I published a new version 0.21.1 that fixes the iOS bug. Let me know!

enricop89 avatar Oct 14 '22 10:10 enricop89