Open divsbhalala opened 2 years ago
@divsbhalala were you able to find what was causing this issue? We are having a lot of reports in sentry as well
We have the same issue. It can be triggered by network error and then there are errors like this on reconnect / refetch.
@divsbhalala Could you share your package.json?
Same happening here, been happening for months.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'subscriptionFailedCallback')
at AppSyncRealTimeSubscriptionHandshakeLink.<anonymous> (realtime-subscription-handshake-link.js:325:1)
at step (realtime-subscription-handshake-link.js:57:1)
at Object.next (realtime-subscription-handshake-link.js:38:1)
at fulfilled (realtime-subscription-handshake-link.js:29:1)
Same here.
Any updates on this?
Any updates ?
"@apollo/client": "^3.5.10",
"aws-appsync-subscription-link": "^3.1.2",
Anyone have any ideas? I'm hitting this using Next with strict mode turned off. I managed to temporarily work around this by delaying setting up the subscription using a setTimeout(() => {enableSubscriptions(true)}, 0)
on mount, but don't know how stable this is.
@heanfig could you test/verify this PR to fix this? https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/747. To build I had to add types: []
to the tsconfig.json
but then you can run yarn prepare && yarn pack
and then yarn add ../path/to/package.tar.gz
the file that gets created from yarn pack
.
in my case skip: !idToSubscribeOn
solved the problem
@omerson can you elaborate on how this fixed your problem? Do you have a code example? I am facing the same issue today.
@omerson can you elaborate on how this fixed your problem? Do you have a code example? I am facing the same issue today.
I believe this happens specifically during navigation in nextJS so just delaying setting up the subscription until after the page renders seems to work. I have a PR that fixes this that we've been running in prod as a patch (using patch-package) for a couple days without issue and I haven't seen this pop up again. Trying to get someone from AWS to review but it seems like this package is abandoned.
+1
@shawngustaw did u fix it ?
@shamseer-ahammed yes using a patch with this PR:
https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/747
Any updates on this?
facing the same issue in nextjs app
@gong917727564 @ivadenis tried with aws-appsync-subscription-link@3.1.3
?
I implement the subscription in my app and subscription working fine but in sentry and console I am seeing this error