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
throwing ws error after upgrading ws version #372
Comments
Doing what exactly...? |
during creating new tab, i think it throws for any samples |
I cannot reproduce this. Please try to come up with a minimal standalone example that cases this issue. |
for example, const CDP = require('chrome-remote-interface');
async function navigateInANewTab(url) {
const options = { host: 'host', port: 443, secure: true, useHostName: true, local: false };
const tab = await CDP.New(options);
const client = await CDP(Object.assign(options, {tab}));
await CDP.Close(Object.assign(options, {id: tab.id}));
}
navigateInANewTab('https://github.com'); |
Is it reproducible even without |
i can't reproduce it locally without these options |
OK so I tried with an nginx reverse proxy in a Docker container where 172.17.0.1 is the host running Chrome:
DevTools methods (new tab, protocol, list, etc.) work as expected, WebSocket inspection only works if the right hostname is used manually, meaning that the WebSocket addresses returned by Chrome are like:
While the request is performed with (
I wonder what's your use case if you're not affected with the above... Maybe I should replace the In any case I'm unable to reproduce your issue... |
sent message to your email |
Hi sorry for the late reply (and thanks for the email) so apparently this is either a bug in
But as you say, the fact is that old versions of |
OK so the difference is in the port of the host header of the request:
Also note the HTTP version. I suspect this is a bug in your backend, double check you configuration and let me know. |
As a heads up, most HTTP clients (curl, Chrome, Firefox, ruby, AsyncHttpClient for Scala, and recently request for Node) have started dropping the port suffix from the header. This is still RFC compliant. This thread includes a few relevant links - request/request#2894 |
@paambaati thanks but in this case the scenario is the opposite: |
Well, that's the reason; I'm closing this... |
i use upstream master, and getting error after this commit 4b8dcee
The text was updated successfully, but these errors were encountered: