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

Unstable Ably Connection State Despite Stable Internet Connection #1999

Open
irrabevz opened this issue Nov 22, 2024 · 0 comments
Open

Unstable Ably Connection State Despite Stable Internet Connection #1999

irrabevz opened this issue Nov 22, 2024 · 0 comments
Assignees

Comments

@irrabevz
Copy link

irrabevz commented Nov 22, 2024

Which version of the Ably SDK are you using?

1.2.33

On which platform does the issue happen?

iOS 17, iOS 18

Are you using Carthage?

No

Are you using Cocoapods?

1.15.2

Which version of Xcode are you using?

Xcode 16.1
Build version 16B40

What did you do?

The following code was implemented in the AblyManager class:

 public func connect() {
        self.ablyRealtime = ARTRealtime(options: self.ablyClientOptions)
        let realtime = self.ablyRealtime!
        
        realtime.connection.on { stateChange in
            switch stateChange.current {
            case .connected:
                self.loadHistory()
            case .disconnected:
                // something
            default:
                break
            }
        }
        
        self.ablyChannel = realtime.channels.get("ChannelID")
        self.joinChannel()
    }

What did you expect to happen?

  • The connection state should transition to .connected only once and remain stable when there is an available internet connection.
  • Devices using the app have a stable internet connection, so unexpected disconnections should not occur.

What happened instead?

  • The connection state frequently alternates between .connected and .disconnected.
  • This behavior is observed only in certain regions within the United States.
  • The issue impacts functionality because the loadHistory function is triggered every time the connection transitions to .connected.
  • A workaround was applied to prevent loadHistory from being called repeatedly, but the underlying issue remains concerning as this behavior was not present in the previous days.

See video below for the dev console logs:
https://github.com/user-attachments/assets/e3073c42-5afe-443c-9882-6441e0d59850

┆Issue is synchronized with this Jira Task by Unito

@irrabevz irrabevz changed the title Unstable Ably Connection State Despite Stable Internet Unstable Ably Connection State Despite Stable Internet Connection Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants