ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

Cannot read property 'sigBytes' of undefined #137

Closed georgessaroufim closed 3 years ago

georgessaroufim commented 3 years ago

when ConnectyCube.createSession() is triggered, a warning appear:

Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'sigBytes' of undefined TypeError: Cannot read property 'sigBytes' of undefined at new init (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:135124:19) at http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:134992:20 at Function.signParams (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:134632:30) at AuthService.createSession (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:143092:41) at ConnectyCube.createSession (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:134147:26) at initConnectyCube$ (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:133956:80) at tryCatch (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:24976:19) at Generator.invoke [as _invoke] (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:25149:24) at Generator.next (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:25019:23) at tryCatch (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:24976:19)

this warning appear only on ANDROID devices.

react-native 0.63.3 react-native-connectycube 3.7.2 react-native-webrtc 1.84.0

ccvlad commented 3 years ago

Hi, @georgessaroufim

Make sure that you are doing correct:

  1. Init ConnectyCube - https://developers.connectycube.com/js/?id=initialize
  2. Create a session - https://developers.connectycube.com/js/authentication-and-users?id=create-session-token

Seams you forgot to init the SDK or passed wrong params in ConnectyCube.createSession.

georgessaroufim commented 3 years ago

i was saving credentials in .env file, but it's seems it's not reading values in correct way. i fix it by hardcoding values. thanks