Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Video call not working in live mode production mode (Version 0.3.0) #33

Closed
luvishq opened this issue Jul 31, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@luvishq
Copy link

luvishq commented Jul 31, 2021

Describe the bug
I am trying to Agora for my production app, so I changed the stage from testing to live and follow the below steps :
Whenever the user clicks on the video icon in my app, I first call the cloud function to generate a user token for my userid (let's say user_id1ffdf) .
For getting the token i use this :

var currentUserID = data.user_id;
        var channelName = data.channel_name;
        var expiredTS = 18000;
        const tokenA = RtcTokenBuilder.buildTokenWithUid(APP_ID, APP_CERTIFICATE, "agora_test_poc", currentUserID, RtcRole.PUBLISHER, expiredTS);
        console.log("Token With Integer Number Uid: " + tokenA);
        return ({ 'token': tokenA });
        }
  1. Once I get the token I call this
agoraClient = AgoraClient(
  agoraConnectionData: AgoraConnectionData(
      appId: appID,
      channelName: "test_poc",
  ),
  enabledPermission: [
    Permission.camera,
    Permission.microphone,
  ],
);

I tried setting that token which i got for my for authenticated user, but i am getting this error.
Can someone point out if something is wrong in my implementation ?
To Reproduce
Steps to reproduce the behavior:

  1. Follow the above steps
  2. You should be able to connect to the channel and see the other user
  3. I am getting ErrorCode.InvalidToken without passing the token , and if i do pass the token I get Error.TokenExpired

Expected behavior
You should be able to connect to the channel and see the other user

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Samsung
  • OS: Android 10
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Flutter doctor -v :

[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

Additional context
Is there any tutorial for production app setup ?

@luvishq luvishq added the bug Something isn't working label Jul 31, 2021
@luvishq
Copy link
Author

luvishq commented Aug 1, 2021

Fixed by the suggestion in the slack channel , closing it now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants