问题
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