-
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
TypeError [ERR_INVALID_URL] after updating to 4.2.3 #1193
Comments
@youngcholo thanks for filing the issue. What is the connection string you are providing? |
is there a minimal repro you can provide? |
Same is happening here with a pre-signed URL string. |
Before 4.2.3 and as specified in the docs, " The URL can also be an object as returned by URL.parse()" |
@youngcholo yeah looks like a bug again with the url parsing. Can you incorporate the changes from the PR linked manually and see if they fix things? |
@youngcholo can you check that this is fixed in 4.2.4? |
Apologies for the late response. The issue still persists in 4.2.4. |
I see now. Thanks for the repl. This is an issue with the legacy support of url.parse. Will have to see if the changes should be reversed because I did not anticipate them affecting the API in this way. I do not believe though there is explicit support for url.parse() in the documentation, but since that does provide a change of support unsure if that means it should be a major version bump... |
Thanks for the information @YoDaMa. If we want to connect via tcp instead of passing the urlObj, we can just pass the host and port in the options, right? mqtt.connect({ host: urlObj.host, port: urlObj.port, clientId: this._clientId, clean:false }) |
usually when I'm working with a URL for TCP, I will pass the port in during the connection string: mqtt.connect('mqtt://test.mosquitto.org:1883') |
This is an automated message to let you know that this issue has If this issue is still important, you can simply comment with a Thank you for your contribution. |
This issue was automatically closed due to inactivity. |
I'm getting this error after updating to 4.2.3
const connectionString = url.parse(conf.get("mqtt").connection.host);
connectionString.port = conf.get("mqtt").connection.port;
mqtt.connect(connectionString, { clientId: this._clientId, clean:false })
this was working yesterday with 4.2.1
AB#8679346
The text was updated successfully, but these errors were encountered: