question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWSAppSyncRealTimeProvider error: Connection closed

See original GitHub issue

I have a React project created in a year ago using the aws-amplify library’s version 1.1.32, so I decided to update all the dependencies after noticing errors in AppSync subscriptions.

One of the errors is that the multiple subscriptions in Connect component stopped working. After some research, I’ve found this issue and then I decided to use the API library.

But using the API library, after a few three minutes, I get this error in my console (to each of my subscriptions): Which is pretty similar to this closed issue.

Captura de Tela 2020-10-20 às 17 51 41

And here’s how I’m defining the subscription:

 const onCreateSubscription = API.graphql(
    graphqlOperation(onCreateWorkControl)
  ).subscribe({
    next: (data) => // do something,
  });

Dependencies:

    "@aws-amplify/ui-react": "^0.2.24",
    "aws-amplify": "^3.3.4",
    "aws-amplify-react": "^4.2.8",
    "react": "16.13.1",

Am I doing something wrong? I appreciate any help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
watanabethaiscommented, Oct 21, 2020

After consulting @amhinson on Discord, we found out that the problem was in my VPN connection.

Sorry for causing trouble! I’m really thankful for the help 😃

0reactions
github-actions[bot]commented, Oct 22, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DataStore - subscriptionError, Connection failed
I'm working on a React Native, AWS, DynamoDB, Amplify project, and I'm struggleing to add extra tables (models) to the database. The original ......
Read more >
React Native AWSAppSyncRealTimeProvider Connection ...
Describe the bug. When attempting to subscribe to a graphql subscription I get an error about the connection handshake. BUG OCCURS:
Read more >
Building a real-time WebSocket client - AWS AppSync
The client establishes a WebSocket connection with the AWS AppSync real-time endpoint. If there is a network error, the client should do a...
Read more >
How to Fix Err Connection Closed Chrome Error Issue (2022)
How to Fix Error Connection Closed Error in Google Chrome? #Chrome #Google #HowTo #Mac #BigSur #Catalina ...
Read more >
@aws-amplify/pubsub@5.0.5 - jsDocs.io
Deprecated. Unused, all usecases have migrated to AWSAppSyncRealtimeProvider ... CONNECTION_CLOSED = 'Connection closed',.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found