Error when trying to use Open Tok React Native library, otk_anvil.cpp:467

时光怂恿深爱的人放手 提交于 2021-01-28 07:50:54

问题


I'm trying to use the Open Tok React Native library, https://github.com/opentok/opentok-react-native/, but I keep getting an error:

[ERROR] otk_anvil.cpp:467 - otk_anvil_on_session_info failed. nCode=1
[ERROR] rumor_client_v1.c:312 - otk_rumor_v1_client_send (pClient == NULL) rumor client is not initialized and cannot send message

Can't figure it out what is causing it.

I tried to test their sample but I'm getting the same error. Even a clean/new project is resulting in the same.

Current setup:

➜  BasicVideoChat git:(master) ✗ react-native -v
react-native-cli: 2.0.1
react-native: 0.59.5

Xcode: 10.3 on macOS Mojave (10.14.6)

<OTSession
              apiKey={this.apiKey}
              sessionId={this.sessionId}
              token={this.token}>
              <OTPublisher style={{width: 100, height: 100}} />
              <OTSubscriber style={{width: 100, height: 100}} />
            </OTSession>

It should render the user and subscribers videos, but I'm only getting a blank/white screen with those logs on console.


回答1:


Indeed that error was caused by an expired token. Even when I was able to use it via browser it was expiring before I test it on the device.



来源:https://stackoverflow.com/questions/57620658/error-when-trying-to-use-open-tok-react-native-library-otk-anvil-cpp467

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!