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

AppSync Events - Closed channels receiving subscription events #531

Open
stocaaro opened this issue Feb 24, 2025 · 0 comments
Open

AppSync Events - Closed channels receiving subscription events #531

stocaaro opened this issue Feb 24, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stocaaro
Copy link
Member

stocaaro commented Feb 24, 2025

Describe the bug
Following the Connect to AWS AppSyncEvents docs example in a vite react app causes duplicate events to arrive for every sent event when running under npm run dev.

This is because the useEffect is run twice in dev mode and the channel.close is running (maybe before the subscription is fully formed).

To Reproduce

  1. Pull down this sample app, run sandbox and launch npm run dev.
  2. Setup a user
  3. Click "Publish Event" to see the events experience with duplicates
  4. Click "Publish Todo" to see the data create subscription without duplicates
  5. See the browser console for id specific events noting the opening/closing of different subscriptions

Expected behavior
I would expect channel subscriptions for events to not present duplicates in the same way that the data subscriptions doesn't duplicate events.

Screenshots

Image

Desktop (please complete the following information):

  • OS: OS X 15.3.1 (24D70)
  • Browser Chrome
  • Version 133.0.6943.127
@chrisbonifacio chrisbonifacio self-assigned this Feb 25, 2025
@chrisbonifacio chrisbonifacio added the bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants