# Connect failed: AMQJS0007E Socket error:undefined

**URL:** <https://community.hivemq.com/t/connect-failed-amqjs0007e-socket-error-undefined/1465>\
**Category:** HiveMQ Client Library\
**Created:** [September 24, 2022, 12:00am UTC](https://community.hivemq.com/t/connect-failed-amqjs0007e-socket-error-undefined/1465 "2022-09-24T00:00:58Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [October 7, 2022, 8:01am UTC](https://community.hivemq.com/t/connect-failed-amqjs0007e-socket-error-undefined/1465/8 "2022-10-07T08:01:17Z")

</div>

Hey @dennisnguy ,

Sure, you can do it the following way:

1. Clone the repo [GitHub - hivemq/hivemq-mqtt-web-client: A websockets based MQTT Client for your browser.](https://github.com/hivemq/hivemq-mqtt-web-client)
2. Find the file that contains the string ( js/mqttws31.js )
3. Replace the string with what you like and save the file
4. Start webserver in the project root directory ( the directory where the index.html file is located). For example, I start web server with Python: `python3 -m http.server` that runs the web app on [http://localhost:8000](http://localhost:8000) for me.

If you are interested in my test results: with ‘mqttv3.1’, ‘mqtt’ and ‘mqttv5’ the app works as expected.

Looking forward for you sharing your own test results

Dasha

---

_[View the full topic](https://community.hivemq.com/t/connect-failed-amqjs0007e-socket-error-undefined/1465)._
