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

Error in restarting subscription after cancellation #249

Closed
Laxmikantwagh opened this issue May 2, 2019 · 3 comments
Closed

Error in restarting subscription after cancellation #249

Laxmikantwagh opened this issue May 2, 2019 · 3 comments
Labels
question A question about how to use an existing feature

Comments

@Laxmikantwagh
Copy link

Laxmikantwagh commented May 2, 2019

Describe the bug
When app goes to background , we cancel the subscription. Next time, when app moves to foreground, we restart subscription. But sometimes, when app comes to foreground/ active state, the request of restarting subscription does not work. At this time, there is no error callbacks.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the app (subscription is activated as app is in active state).
  2. Now, lock the device and then unlock it.
  3. Step 2 should be repeated 3-4 times quickly.
  4. Unlock the device.
  5. Now, the subscription never starts.

Expected behavior
If app is moved to background and foreground multiple times and then if app is in foreground/active state finally, the request to restart subscription should be successful.

Environment

  • AppSync SDK Version: 2.10.3
  • Dependency Manager: Cocoapods
  • Swift Version : 4.2

Device Information:

  • Device: iPhone 6, iPhone X
  • iOS Version: 12.2

More Information
We have just tried one thing.
class -> AWSAppSyncSubscriptionWatcher.swift
method -> init

In this method, self.startSubscription() was not being called sometimes. So, we have updated this method.

PFA screen shot for more details.

Screenshot 2019-05-02 at 3 47 35 PM

Conclusion:
Please suggest on this bug.
Also, please check our approach. Do you have any better way to fix this issue ?

@shannon-hager-skookum
Copy link

@Laxmikantwagh The AppSync SDK version listed above is 2.10.3, I would update to the current version (2.12.1) and see if the problem is still present. There has been some work on this area of functionality that would may solve your issue and if not, might affect your workaround.

@desokroshan desokroshan added AppSync question A question about how to use an existing feature requesting info Further information is needed before this is actionable labels May 6, 2019
@palpatim palpatim added pending-release Work is done, but issue can't be closed since the changes were not released yet and removed requesting info Further information is needed before this is actionable labels May 8, 2019
@palpatim
Copy link
Contributor

palpatim commented May 9, 2019

This is released on https://github.com/awslabs/aws-mobile-appsync-sdk-ios/releases/tag/2.12.2

Please let us know if you have any further issues.

@palpatim palpatim removed the pending-release Work is done, but issue can't be closed since the changes were not released yet label May 9, 2019
@Laxmikantwagh
Copy link
Author

Thank you so much 👍 . I will check it and get back if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about how to use an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants