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

Disconnected without doing anything #2610

Closed
frozenproof opened this issue Mar 31, 2024 · 3 comments
Closed

Disconnected without doing anything #2610

frozenproof opened this issue Mar 31, 2024 · 3 comments

Comments

@frozenproof
Copy link

Describe the bug
LiveKitRoom/VideoConference simply stuck at Disconnected without throwing errors in either server orclient side in NextJs 14

Server

  • Version: [^2.1.2]
  • Environment: localhost
  • NextJs 14 App Router

Client

  • SDK: livekit-client
  • Version: [^2.0.10]

To Reproduce
Steps to reproduce the behavior:

  1. Create LIVEKIT_API_KEY, LIVEKIT_API_SECRET,NEXT_PUBLIC_LIVEKIT_URL as instructed by https://docs.livekit.io
  2. Create TokenEndPoint Api Routes ,
  3. Create a page which used fetch from api to get token and useeffect to save tokens
  4. The API call works and send a readable token
  5. The client side doesn't throw any error
  6. The default video conference component simply show disconnected .
  7. The example video conference component demo doesn't even show it's disconnected ?

Expected behavior
The room call should be running with proper token .
If token is incorrect / server refused the authorization then there would be a respond of unauthorized .

Screenshots
The token from server API
image
The client side render
image
The front end console log to see if token is indeed received
image

Additional context
The guide is made for nextjs 13 , so I guess issue can come from here . But in such cases , an error would have been detected by the client sdk or server sdk and showed up .

@frozenproof
Copy link
Author

image
I have checked and added await but still doesn't work .

@Mohammedyaseen29
Copy link

Make sure Your Api-keys are correct!!
it will work or re-create new keys

@frozenproof
Copy link
Author

@Mohammedyaseen29 I checked if my keys were correct using the example app so I knew it's running . But it just suddenly run again so I don't know what happened . Probably an API choke happened for several days due to outdated packages .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants