Open rahul-huma opened 1 week ago
Hi @rahul-huma 👋 thanks for raising this issue.
I see that you are using v5 of amplify. is there any reason you have not upgraded to v6 yet?
in any case, I believe in v5 you should still have access to the subscription connection states through the Hub listener utility.
Here's the documentation for that:
there is an info accordion below that that shows how you can troubleshoot connection issues and automated reconnection.
Please give that a look, try it out, and let us know if it helps!
another thing that might be worth confirming is whether this error occurs in other browsers or in incognito mode for chrome?
the exact error message seems to be related to a chrome.addListener()
method.
some other developers have mentioned chrome extensions that were causing the same errors in apps they were building. can you check this thread and see if it helps unblock you?
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
GraphQL API
Amplify Version
v5
Amplify Categories
api
Backend
None
Environment information
Describe the bug
Hello,
I'm facing an issue with AWS AppSync subscriptions where the connection intermittently breaks, and I've been troubleshooting it for a couple of days now. I am using aws amplify Gen 1(v5). Here’s what happens:
Error Message: I frequently encounter the following error:
Reproducibility: This issue typically occurs in the following scenarios:
Current Setup: I have implemented a retry logic to reconnect when the connection drops. However, I'm struggling to accurately detect whether the subscription is active after reconnection attempts, as the error above can still appear unexpectedly.
I suspect this error is contributing to the connection breaking, and I'd like to confirm if there are any known solutions for handling AWS AppSync subscription stability in long-running or idle scenarios. Additionally, if you have advice on reliably determining the connection status, it would be greatly appreciated.
Thank you in advance for your help!
Expected behavior
I should always retry to connect to the subscription
Reproduction steps
I am just using Gen 1 v5 of this library.
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response