Comments (27)
Web sdk 2.9.0 version has a known bug that will cause the token generated by string uid Unable to join channel successfully, the error message is NO_AUTHORIZED, we will fix this problem in the next version of sdk, you may need to use int uid temporarily To generate tokens to circumvent this problem, or you can use version 2.8.0 sdk
from tools.
@kush3107 it seems you are using a fixed uid 2882341273 and channel popo123 when calculating token. you need to ensure you are joining the same channel with same uid. The two repository you mentioned by default will use 0 as uid to join channel which means it will use a random uid.
from tools.
Hi @plutoless Thanks for all the help. I figured out the issue. I was using the same token for both users.
from tools.
so it works with int uid but not string uid?
from tools.
yes so basically when im replacing it to be string (uuid) it throws this error, when im chaning it back to number it fine again, what do you think could be the cause ?
from tools.
would be helpful if you can provide a link to 2.8.0 web sdk. I had to guess the link to download that version. All of your sdk download links point to the newest download.
from tools.
cdn link: https://cdn.agora.io/sdk/release/AgoraRTCSDK-2.8.0.js
download link: http://download.agora.io/sdk/release/Agora_Web_SDK_v2_8_0_FULL.zip
from tools.
I am getting this issue with version 3.0.0 also.
from tools.
@kush3107 please provide more details, you may have a real NO_AUTHORIZE issue.
from tools.
@plutoless I am using the same code from node samples to create the Dynamic Key.
app.get('/tt', [], (req: express.Request, res: express.Response) => {
// Rtc Examples
const appID = 'c3208e8e85b5499f89*********';
const appCertificate = 'ce75e73599df48cbb15c*******';
const channelName = 'popo123';
const uid = 2882341273;
const account = "2882341273";
const role = RtcRole.PUBLISHER;
const expirationTimeInSeconds = 3600;
const currentTimestamp = Math.floor(Date.now() / 1000);
const privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds;
// IMPORTANT! Build token with either the uid or with the user account. Comment out the option you do not want to use below.
const tokenA = RtcTokenBuilder.buildTokenWithUid(appID, appCertificate, channelName, uid, role, privilegeExpiredTs);
console.log("Token With Integer Number Uid: " + tokenA);
// Build token with user account
const tokenB = RtcTokenBuilder.buildTokenWithAccount(appID, appCertificate, channelName, account, role, privilegeExpiredTs);
console.log("Token With UserAccount: " + tokenB);
res.json({
token: tokenA
});
});
Broadcasting and joining the channel one are also the same code from the samples and they use the same app id and the token generated from the above the code.
Using this for broadcasting and this for joining the channel and receiving the stream
from tools.
I am getting this issue with version 3.0.0 also.
If I were you, stick with 2.8.0 I also found that after you are able to join with string as uid, there are other problems like subscriber event not triggering. Just stick with interger uid for now until they fix the issue.
from tools.
@specc I tried it with web sdk 2.8.0 also.
from tools.
@specc Also the I am getting the same token with both methods on the node server.
from tools.
@plutoless Ok thanks for the direction. I will double check it on my end
from tools.
Hi @plutoless The stream is now broadcasting for me, thanks for the help but now when I try to connect using this I cannot see the remote stream all I see is the local stream. Please tell me what details you need.
Thanks for the help in advance.
from tools.
Hi @plutoless The stream is now broadcasting for me, thanks for the help but now when I try to connect using this I cannot see the remote stream all I see is the local stream. Please tell me what details you need.
Thanks for the help in advance.
Like i said even if you are able to connect, the subscription event wont be triggered. You should use uid as integer then it should work.
from tools.
@specc I am using uid as integer and moreover I get the same value for tokenA
or tokenB
from the nodejs example. Also I am using "agora-rtc-sdk": "2.8.0"
but still cannot see the remote stream on the one-to-one video example and this works fine when I use the token generated from agora console.
from tools.
just to clarify, you have two clients joining the same channel, and you won't be able to see each other? could you pls share the channel name and corresponding uid, plus your join channel time so that i can check backend?
from tools.
App Name on my account - new
App Id - c3208e8e85b5499f897db9d83f1b6f75
App Certificate - ce75e73599df48cbb15ca02abc1b6c10
Channel Name - popo123
UID - 2882341273
Expired Time - current timestamp + 3600s
from tools.
@plutoless The strange thing is that when I try to do this with the temp token generated from agora console everything works fine.
from tools.
@kush3107 i checked few backend cases and 2882341273 is the only user joined in channel. if you want to see remote stream you will need another client joining same channel.
from tools.
hi guys , please help. i m building a live broadcast with angular , was able to generate a token successfully from the host , but i m finding subscribing to the stream difficult . it is giving same issue NO_AUTHORIZE. My uid is integer
from tools.
I am also getting the same error @tayoraph
from tools.
from tools.
I am using this https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/
to test. But it shows that NO_AUTHORISATION error.
from tools.
In this UI, need to pass UID which are available in the ADVANCED SETTINGS
from tools.
I am facing the same issue..
const uid : number = 1235643434344;
const role = RtcRole.PUBLISHER;
const expirationTimeInSeconds = 3600
const currentTimestamp = Math.floor(Date.now() / 1000)
const privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds
const token = RtcTokenBuilder.buildTokenWithUid(appID, appCertificate, channelName, uid, role, privilegeExpiredTs);
And I am using same chanel name, uid and app id in frontend but getting agora-rtc-client.js?ea71:35 client join failed NO_AUTHORIZED
I am using vue.js sample code and it has package installed "agora-rtc-sdk": "^3.1.1",
Any help?
from tools.
Related Issues (20)
- Is it mandatory to login RTC while fetching Video/Audio in Android App? HOT 1
- Need help for token generation for user registration through rest api HOT 1
- RTC token not valid HOT 3
- issue with RTC token on the web HOT 10
- Which package should I use? when it cames to agora-access-token and agora-token. HOT 3
- [ruby] warning message of dynamic_key5.rb in Ruby 3.2 HOT 3
- feat: Support for ESM HOT 2
- agora-token: Buffer is not defined HOT 1
- java sdk maven**仓库没有更新 HOT 2
- Why c# code is using _uid as _channelName RTM Token generation c# HOT 2
- crypto.createHmac is not a function TypeError: crypto.createHmac is not a function HOT 1
- index.htmlpackage-ecosystem
- 能不能把不同语言的sdk分开,以便使用安装 HOT 3
- Problem in Building AccessToken2 || which library I have to use HOT 1
- Add API for synchronous token validation HOT 1
- python3和python2 下生成的Education Token是否可用? HOT 2
- AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER with PHP 8.2 HOT 1
- go RtcTokenBuilder vs rtctokenbuilder2 HOT 1
- getStats() method is no longer supported HOT 2
- Error: error:0308010C:digital envelope routines::unsupported HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tools.