Closed morcena09 closed 1 year ago
Hi I have updated the RtmTokenBuilder2sample.js from our Tools repository. and corrected the too much expiration date on my Analysis result.
Token used: 007eJxTYDj9xKLXz4bxxpwTp+efKJjJWKO9Weyz6AKl3BjZpEsnOiYoMFgmmScZmhgkpqZYmpqkmhonGZibmJqmpqaZm5oZJaealc5YnNIQyMhQvfYMCyMDIwMLEIMAE5hkBpMsUNI3sSibmcHQyBgA0ukfzQ==
Tested this new token with the Sample code from our Web UIKit documentation and still yielded an error mentioned above.
There is one way to make the existing Web UIKit sample work. This is by setting the uid to 0 which is not advisable since developers must always include the uID value higher than 0 when generating a token for different users.
Hi @morcena09 , I'm unable to reproduce the issue. Without the uid 0 line, the app seems to be working fine. I have added some more specification in certain steps in the doc to improve it, perhaps you can give it another try after https://github.com/AgoraIO/Doc-Source-Private/pull/321 is live. cc @saudsami
Hi,
There is a customer that had reported that the UIKit instructions[1] was not working on their end. To confirm this, I had to recreate what the customer had gone through using the UIKit documentation.
I had confirmed that we had a missing line on the document:
Code instructions:
const [videoCall, setVideoCall] = useState(true);
const rtcProps = { appId: "",
channel: "",
token: "",
};
The customer had taken this literally and was not able determine what other variables needed to make the UIKit work. Word instructions only have stated 3 variables the appId, channel and token so it adds further confusion.
What I have tested next is to add one line of code to the code sample:
const [videoCall, setVideoCall] = useState(true);
const rtcProps = { appId: "",
channel: "",
uid: 0, //added line of code int uid
token: "",
};
This code works. Please see image1:
The significance of this is both the error when using sample code from the documentation and the error when generating a wrong token is the same: AgoraRTCException: AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER. This may confuse future CSE into suggesting wrong information when handling the same case.
The token I have used is this: 007eJxTYEhlXbfos0p+YegCGXM912+SZyb5hzkfzCo+mu2qUmS/g0uBwTLJPMnQxCAxNcXS1CTV1DjJwNzE1DQ1Nc3c1MwoOdVsUs2ilEVdi1Ki35azMjIwMrAAMQgwgUlmMMkCJX0Ti7JZGQyNjE1MAV3gHyQ=
This is a valid token as I have checked from our internal tools. please see image 2
[1] https://docs.agora.io/en/video-calling/get-started/get-started-uikit?platform=web#create-the-app-component-and-declare-the-variables