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

Subscriptions are closed when wifi is disabled even if there is a cellular connection. #45

Closed
timowilson-fluke opened this issue Sep 25, 2018 · 6 comments
Assignees
Labels
bug Something isn't working closing-soon pending-response Issue is pending response from the issue requestor

Comments

@timowilson-fluke
Copy link

Describe the bug
Mutation subscriptions are closed when wifi is disabled even if there is a cellular connection available. The "onCompleted" method of the subscription callback is called when wifi is disabled. And "re-subscribing" during the "onCompleted" method will result in a exception being thrown.

To Reproduce
Steps to reproduce the behavior:

  1. Start a subscription for a mutation.
  2. Turn WIFI off on the Android device.
  3. Note that the subscription callback "onCompleted" method is triggered. Indicating that the subscription has been canceled.

Expected behavior
Since there is still a connection available (cellular) I would expect that the subscription would stay active and continue. In general, I'm not sure why the subscription is canceled even if all connectivity is lost. Couldn't it hang around and wait till a connection is reestablished?

Environment(please complete the following information):

  • AppSync SDK Version: 2.6.26

Device Information (please complete the following information):

  • Device: Samsung S9
  • Android Version: Oreo 8.0
@scb01 scb01 self-assigned this Sep 27, 2018
@frankmuellr frankmuellr added the bug Something isn't working label Oct 15, 2018
@scb01
Copy link
Contributor

scb01 commented Oct 25, 2018

@timowilson-fluke

We are working on including reconnect capability in the SDK for subscriptions to handle unexpected disconnects. I am hoping to get this included in the next rev of the SDK. I will post back on this thread once I have confirmation.

@Rissmon
Copy link

Rissmon commented Oct 30, 2018

@cbommas
Hi,
We are facing the same issue with AWS AppSync SDK. Any update regarding the planned date for the next release version of SDK.

@scb01
Copy link
Contributor

scb01 commented Nov 9, 2018

@Rissmon

I don't have a final date yet. I will let you know once I have more information - unfortunately, this fix did not make it into v2.6.27

@scb01
Copy link
Contributor

scb01 commented Nov 21, 2018

@Rissmon @timowilson-fluke
The latest version of the SDK 2.7.0 has the reconnect capability built into it. With this functionality, the subscription will be automatically retried and setup if it were to go down due to temporary network outages or transitioned from one network to the other.

@scb01 scb01 added the pending-response Issue is pending response from the issue requestor label Nov 21, 2018
@timowilson-fluke
Copy link
Author

Thanks, I'll try it out.

@frankmuellr
Copy link

This issue has been closed because of inactivity. Please open a new issue if are still encountering problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing-soon pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

5 participants