client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

Network switch & Chat not working when user joined using canSubscribe=false

Open royatanu94 opened this issue 1 year ago • 2 comments

Describe the bug Network switch not working when joined using canSubscribe=false "canPublish": true,"canPublishData": true in ios app.
Chat msg not received at IOS app.

SDK Version 2.0.10/11

iOS/macOS Version IOS17

Xcode Version 15.4

Steps to Reproduce Issue1:

  1. Join user1 ( "canPublish": true,"canPublishData": true,"canSubscribe": true ) from web app.
  2. Join user2 ( "canPublish": true,"canPublishData": true,"canSubscribe": false ) from ios app.
  3. Publish video from both of the user
  4. Switch internet of IOS device from mobile data to wifi or vice versa OR turn on/off internet
  5. In IOS app its seen that user1 joined from web will leave room
  6. IOS user will be disconnected with (Timed out)
  7. Even tried with increasing reconnect retry from 3 to more. Still same error
  8. Some unexpected behaviour is also seen after disconnecting room, participant view reopens

Issue2:

  1. Join user1 ( "canPublish": true,"canPublishData": true,"canSubscribe": true ) from web app.
  2. Join user2 ( "canPublish": true,"canPublishData": true,"canSubscribe": false ) from ios app.
  3. Send msg from web to ios
  4. IOS app will not receive any data msg. Tried with sdk 2.0.11 still not worked.

Expected behavior Network switch & chat msg should work fine for user joined using canSubscribe=false

Screenshots

File (1)

Logs Issue1: issue1.txt

Issue2: issue2.txt

royatanu94 avatar Jun 27 '24 10:06 royatanu94

Looks like there is a bug here with publisher-only mode. we'll take a look.

davidzhao avatar Jul 18 '24 17:07 davidzhao

@davidzhao @hiroshihorie any update on this? In this case it is also seen https://github.com/livekit/client-sdk-swift/issues/434

royatanu94 avatar Aug 09 '24 06:08 royatanu94

@davidzhao I have a problem while setting up livekit in my app. I am using the latest version of livekit-client and sdk "livekit-client": "^2.13.0", "livekit-server-sdk": "^2.12.0".

I have set up my token api and it is working and generating tokens for participants.

Also, I have set up publishing and subscribing for the participants and the log on the console for the participant shows that publishing of tracks or video and audio are successful from one participant, likewise the receiving participant logs successful subscribing.

Now the problem is that, no video or audio is received from the subscribing end, even when it showed successfully subscribed in the console log. What is the problem please. I need you assistance here.

Thanks for your anticipated response.

akindeledby avatar May 22 '25 05:05 akindeledby

@davidzhao I used this sdk for my setup: https://github.com/livekit/client-sdk-js

akindeledby avatar May 22 '25 05:05 akindeledby