AgoraIO-Usecase / Video-Calling

Calling Interface + Connection Service on top of Agora RTM + RTC for Video Calling Example
MIT License
60 stars 43 forks source link

OpenDuo-Web - (Login Failure) #37

Open ruggierom opened 3 years ago

ruggierom commented 3 years ago

Hi, I followed the instructions for OpenDuo-Web but after setting the env vars for appid and token. I get 'user is not logged in'. If I set this.status = 'onLine' in agora-rtm-client.js then I get 'query failed" but still seems user is not logged in. I also tried setting the token and leaving it undefined.

What do I need to do to get this demo working?

Thanks!

plutoless commented 3 years ago

could you pls share the console log of your browser while opening this page?

ruggierom commented 3 years ago

Sure, here it is. Thanks

Screen Shot 2021-03-20 at 5 33 05 AM
ruggierom commented 3 years ago

Any thoughts on how I can get this going? Thanks

plutoless commented 3 years ago

@ruggierom according to the logs you just failed to login with RTM. could you pls check how you login?

3shuiSww commented 3 years ago

image 我也是按照项目的md文件,修改了appId,token是临时的token(有频道号的token)启动就报这个错,不知道是哪里的问题?谢谢

3shuiSww commented 3 years ago

@plutoless

songlin51 commented 1 year ago

I also encountered this issue, and I solved it in the following way:

Run npm install & npm run dev. Access the URL and remember your code. Visit https://webdemo.agora.io/token-builder/ to generate a temporary token, and fill in the UID with the code allocated by npm run dev. Rename .env.example to .env, and paste the appid & token into it. Modify src/agora-rtm-client.js

Add

const appTOKEN = process.env. REACT_APP_AGORA_APP_TOKEN on line 6

Add the following lines on line 12:

this. _client = AgoraRTM.createInstance(appID)
this. _uid = ''
this. _token = appTOKEN // add this line
this. _invitation = null
this. _remoteInvitation = null
this. eventBus = new EventEmitter()

//This status is used to control whether the phone can be accessed
//The 'onLine' is ok.
this. status = 'offLine' //onLine, offLine, calling, meeting

this.peerInvitation()

Note that after modifying the token, please re-run

npm run dev

Otherwise, the token will still be a historical one and will not take effect, because the token is saved in client-side storage like local storage & cookie.

plutoless commented 1 year ago

@songlin51 thank you for the suggestions! would you mind raising a PR to fix this?

songlin51 commented 1 year ago

谢谢你的建议!您介意提出 PR 来解决这个问题吗?

我当时使用这个项目是因为测试信令通话,我在自己平台播号,然后OpenDuo-Web这边能收到我的呼叫. 但是我在调试的过程中发现这个项目也有其他一些问题,比如接通后视频界面也不太正常.因为我不是专业的前端开发人员,所以对react不是很熟悉.就没有深入研究了,至于pr就更不敢提啦