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

App doesn't try to reconnect to its Internet gateway #717

Closed
gnarea opened this issue Oct 26, 2023 · 2 comments · Fixed by #720
Closed

App doesn't try to reconnect to its Internet gateway #717

gnarea opened this issue Oct 26, 2023 · 2 comments · Fixed by #720
Labels

Comments

@gnarea
Copy link
Member

gnarea commented Oct 26, 2023

(Sorry about the vague title, but I don't really know how to summarise it, or even if it's one or more issues.)

I was using Letro this afternoon until 18:00 via WiFi, and everything worked fine. Then I left that place and switched to 5G.

At 20:56, connected to another WiFi network, I open Letro and send a message, but nothing happens. So I open Awala and see the usual "You're disconnected from Awala" screen, so I checked logcat and here's what I found:

I triggered a network change event by switching from WiFi to 5G, and then the app reported that it was connected to the Internet. When I checked the awala-logs.txt, I found that it'd just delivered the parcel from Letro.

So, two questions:

  • Why didn't that OutgoingMessage.send() call from the SDK didn't cause the app to send the parcel to the Internet gateway?
  • Why wasn't this app running the public sync with keepAlive=true whilst I was using Letro?

I wonder if the problem is that the last time we called GatewayClient.bind() was a few hours ago. If so, is there anything we can do in the SDK automatically?

@sdsantos
Copy link
Collaborator

It does look like the main issue is that Awala stopped running the PublicSync. The most likely reasons for that are:

  1. It couldn't reach the public gateway, and it didn't recover from that state by itself
  2. No app is bound to the Awala app

I think it's more likely the issue is 1) because you saw You're disconnected from Awala, which is unrelated to the Public Sync running, only to the connection state. So I'll investigate why the Awala app is losing connection and not recovering by itself from it.

@kodiakhq kodiakhq bot closed this as completed in #720 Nov 16, 2023
kodiakhq bot pushed a commit that referenced this issue Nov 16, 2023
Fixes #717

We're repeating the connection state check every 5 seconds. But the 3 checks themselves did not have timeouts, so that meant it could take several minutes just to complete one check. I've now capped each check to 5 seconds as well, so worse case scenario it could take 20 seconds between connection state checks.
Copy link

🎉 This issue has been resolved in version 1.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants