Skip to content
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

URIError: URI malformed #89

Closed
wizehood opened this issue Oct 7, 2020 · 6 comments
Closed

URIError: URI malformed #89

wizehood opened this issue Oct 7, 2020 · 6 comments

Comments

@wizehood
Copy link

wizehood commented Oct 7, 2020

I'm getting following exception when using proxy (http://USERNAME:PASSWORD@HOST:PORT) with special characters inside (containing password with percentage(%) for example etc).

Failed to open Puppeteer browser. URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at Url.parse (url.js:343:19)
    at Object.urlParse [as parse] (url.js:154:13)
    at parseUrl (\node_modules\proxy-chain\build\tools.js:74:32)
    at Object.anonymizeProxy (\node_modules\proxy-chain\build\anonymize_proxy.js:24:46)
    at Crawler.openBrowser (\src\puppeteer.js:42:42)

How can we fix this?
Cheers

@andretunes
Copy link
Contributor

Hello!

I changed a part of code and sended a Pull Request #102, if you wanna fix it in your side until the release, please open the file node_modules\proxy-chain\build\tools.js and do this:

  1. On line 73, please replace _url2.default.parse to new URL.

If you have any questions or need more help, please let me know.

Kind regards,
André

@wizehood
Copy link
Author

Thanks for the info.

Hello!

I changed a part of code and sended a Pull Request #102, if you wanna fix it in your side until the release, please open the file node_modules\proxy-chain\build\tools.js and do this:

  1. On line 73, please replace _url2.default.parse to new URL.

If you have any questions or need more help, please let me know.

Kind regards,
André

@wizehood
Copy link
Author

Leaving the issue open until checked..

@wizehood wizehood reopened this Jan 24, 2021
@valekjo
Copy link
Member

valekjo commented Jan 26, 2021

Hi, this will need some more checking, as the URL object does not correspond 1-1 to the old one (returned by url.parse()). I'll look into it.

@jancurn
Copy link
Member

jancurn commented Jan 26, 2021

Hi, this will need some more checking, as the URL object does not correspond 1-1 to the old one (returned by url.parse()). I'll look into it.

@valekjo I already started on that, but didn't manage to finish it. Perhaps you could take it over? #103

@jancurn
Copy link
Member

jancurn commented Jan 26, 2021

Fixed in #103

@jancurn jancurn closed this as completed Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants