Skip to content

PubSub Websocket: "AMQJS0008I Socket closed." when trying to subscribe #460

@BenediktMiller

Description

@BenediktMiller

Describe the bug
I followed the tutorial to create Auth for my React App, then I followed the tutorial on using PubSub with AWS IoT. The first Problem I encountered was that using the pubsub endpoint: wss://xxxxxxx-iot.eu-central-1.amazonaws.com/mqtt resultet in a "legancy certificate error" (I am using chrome) so i replaced the endpoint with wss://xxxxxxx-ats.iot.eu-central-1.amazonaws.com/mqtt. Now as soon as I try to subscribe I get the following error: {invocationContext: undefined, errorCode: 8, errorMessage: "AMQJS0008I Socket closed."}

I have attached the Policy using the command from the tutorial, but since attach-principal-policy is deprecated I also tried: aws iot attach-policy --policy-name 'myIOTPolicy' --target 'eu-central-1:xxxxxxxxxxxxxxxxxxx'

To Reproduce

  1. Follow all the steps from the tutorial for setting up a react app, adding auth and using PubSub.
    Expected behavior
    A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: WSL
  • Browser Chrome
  • Version 71.0.3578.98

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions