pusher / pusher-channels-flutter

Pusher Channels client library for Flutter targeting IOS, Android, and WEB
MIT License
74 stars 133 forks source link

iOS Swift-side error #153

Open juskuc opened 8 months ago

juskuc commented 8 months ago

Hi, we're seeing these errors being logged out in our application when working on features which involve different application lifecycle states (resumed/paused/terminated/inactive). I believe in this instance the flow went like this:

  1. App opened, pusher connected and subscribed to channel successfully,
  2. Screen locked with app in the foreground,
  3. Pusher disconnected - everything is as expected.
  4. We receive a call from some other user through call kit -> app is woken up in background,
  5. Pusher reconnects, but we do not resubscribe to channel (only want to do that when screen is unlocked and app is resumed by user),
  6. Caller ends call, call kit closes for receiver, app goes back to sleep/inactive state.
  7. Unlock screen, app is in foreground and attempts to reconnect (disconnect, unsubscribe, subscribe, connect in this order),
  8. Errors are seen in console.

After a while, it managed to connect successfully. Is there something implemented incorrectly on the app's side, or on the library's end? Thanks!

image