-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MQTT.js not working on IOS 15.2 in all iPhone browsers. #1588
Comments
The code: I am using MQTT.js version 4.0.1. KEY and NAME are different in the code. I just hid them here. This code works on my computer browser. |
There are lots of legacy dependencies in this lib now, and due to that we had lots of issues into bundling it into web apps. Finally, we moved to https://github.com/shanewholloway/js-u8-mqtt, and it works both on IOS Safari and Desktop Safari. We do pretty extensive testing, and actually we were not able to get MQTT.JS to work in browser correctly within any bundler (vite, rollup, webpack). Only using prebuild version seems to be working in browser. Check: https://github.com/mqttjs/MQTT.js#via-cdn It was actually working, and we have one project where we lazy load mqtt.js from CDN upon request. But it's actually wasn't pretty, and for newer projects we just moved to u8-mqtt. |
@nosovk I recently started helping maintaining this library. If someone of you would like to help fixing this issue I will be more then happy to review a PR |
We currently moved to library above and not using mqtt.js, but I'll check current issues on a weekend. |
MQTT 5.0.0 BETA is now available! Try it out and give us feedback: |
I have fixed Browser docs by adding webpack and vite setup. Check them out |
I have tried to enable and disable multiple potentially influental experimental js features on the iPhone. But nothing has proven to be succesful. (One of them that i disabled was NSURLSession WebSocket.
The text was updated successfully, but these errors were encountered: