LogmeinRescue / iOS-SDK

Rescue In-App Support iOS SDK
http://secure.logmeinrescue.com/welcome/webhelp/EN/SDKi/MobileSDK/c_riossdk_overview.html
Other
6 stars 7 forks source link

RescueSession.endSession and RescueBroadcastSession.disconnectSession do not end broadcasting session #55

Closed jamesdownsjr2913 closed 3 years ago

jamesdownsjr2913 commented 3 years ago

Tested in versions 5.6 and 5.8.1

RescueSession.sharedInstance.endSession() and RescueBroadcastSession(...).disconnectSession() return the “disconnecting” and “disconnected” states through the delegate but the session is not ended. In the Technician Console, the session remains in an “Active” or “Reconnecting” state. If the user is broadcasting, the broadcast is still active. If the user stopped broadcasting and starts again, the session becomes active and the broadcast begins again. No errors appear in the console.

This only happens with broadcasting. Camera sharing closes the session as expected. This was verified in two internal apps and the example app in this repo.

Our broadcast session are set up according to the documentation in the Wiki: https://github.com/LogmeinRescue/iOS-SDK/wiki/Broadcasting

jamesdownsjr2913 commented 3 years ago

Any follow up on if this behavior can be reproduced internally? If this is an issue in the SDK, being unable to appropriately end the session from the user-side leaves the user open to having their screen continuously exposed to the agent unknowingly unless they happen to noticed the broadcast is still active in iOS. We haven't found a work around or different way to initiate the session that would mitigate this issue.

exceptioncatcher91 commented 3 years ago

We investigate the issue. Our next release on this week will contain this fix.

exceptioncatcher91 commented 3 years ago

@jamesdownsjr2913 Our new version (5.9) is available. This version contains the fix for this issue. If you call BroadcastSession's disconnectSession method, it closes the session.

jamesdownsjr2913 commented 3 years ago

@exceptioncatcher91 thanks for the fix on that. I see that disconnectSession is now putting the session into a "Closed" state. RescueSession.sharedInstance.endSession() is still not ending the session correctly though. The RescueSessionDelegate receives the "disconnecting" event, but the session is not disconnected for either the agent or the user.

Is the shared instance of the RescueSession not linked to the RescueBroadcastSession that we use in the extension? I see in the example app in this repo ending the session with "Disconnect" doesn't actually end the session at all even though RescueSessionDelegate receives the state.

exceptioncatcher91 commented 3 years ago

@jamesdownsjr2913 Thanks your response and remark. Investigate in progress.

jamesdownsjr2913 commented 3 years ago

In version 5.10-beta.1, RescueSession.sharedInstance.endBroadcastSession() looks like it is correctly passing the session status changes through to the delegate and the session is ending correctly on the agent side. We can use this instead of endSession now for screen sharing. Should we continue to use endSession for camera sharing?

exceptioncatcher91 commented 3 years ago

@jamesdownsjr2913 I am glad to hear that it works correctly. RescueSession.sharedInstance.endBroadcastSession() is only for end screenshare session. Yes, you should continue to use endSession for camera sharing.

jamesdownsjr2913 commented 3 years ago

I am seeing behavior where I have to call both endBroadcastSession and endSession to appropriately end the LMI session. endBroadcastSession does call through to the "disconnecting/disconnected" cases in the delegate and ends the session for the agent, but if I do not also call endSession, I cannot start a new session until it is called. It seems like the session is staying active somewhere on the client code until that is called?

This is different than the code I am seeing in the example app so I am curious if this is something you're seeing as well or if it is intentional that I should have to call both of those functions for a screen share?

exceptioncatcher91 commented 3 years ago

@jamesdownsjr2913 What kind of session would you like to start for the second time? Another broadcast session? When you start the second session, what kind of session status do you stay in? You have to call only endBroadcastSession. I tried to reproduce this problem with start two broadcast session after another with the example app, but i have not experienced any kind of problem.

jamesdownsjr2913 commented 3 years ago

We are trying to start another broadcast session. We end up stuck in the "Connecting" status after we end without calling endSession.

If you can't reproduce it, I'm going to assume it is just an issue with how we're routing sessions and will have to continue looking into it and see what the issue is. I'd say since the example app looks like it is fine without it and you aren't able to reproduce it, it's probably on our end if I see otherwise in the future I can open a different story.

exceptioncatcher91 commented 3 years ago

@jamesdownsjr2913 This bug might be on your side. If you still have this problem after doing investigations, please open another ticket for us.