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

[Bug]: ERR_NO_SUPPORTED_PROXIES when use proxyRules with auth #29797

Closed
3 tasks done
Buminta opened this issue Jun 20, 2021 · 5 comments
Closed
3 tasks done

[Bug]: ERR_NO_SUPPORTED_PROXIES when use proxyRules with auth #29797

Buminta opened this issue Jun 20, 2021 · 5 comments
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲

Comments

@Buminta
Copy link

Buminta commented Jun 20, 2021

Preflight Checklist

Electron Version

13.1.2

What operating system are you using?

macOS

Operating System Version

BigSur

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

I hope It's working

Actual Behavior

I'm use

var my_proxy = "http://account:pass@ip:port";
      var ses = session
        .fromPartition("persist:session02");

      ses.setProxy({
        proxyRules: my_proxy,
        proxyBypassRules: "<-loopback>"
      });

However I had an error here!

(node:71555) electron: Failed to load URL: https://google.com with error: ERR_NO_SUPPORTED_PROXIES
(Use `Electron --trace-warnings ...` to show where the warning was created)

Please help me!

Testcase Gist URL

No response

Additional Information

No response

@codebytere
Copy link
Member

Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@codebytere codebytere added the blocked/need-repro Needs a test case to reproduce the bug label Jun 21, 2021
@Buminta
Copy link
Author

Buminta commented Jun 23, 2021

I'm share my proxy in here for that. U can use it for check!
https://gist.github.com/b742038d533508746458741dfea49c3b

@nornagon
Copy link
Member

proxyRules doesn't support authentication. See https://www.electronjs.org/docs/api/session#sessetproxyconfig for allowable options.

@Buminta
Copy link
Author

Buminta commented Jun 24, 2021

@nornagon You're joker?

I'm finding auth Handle in here, And It's working >p:

app.on('web-contents-created', (e, wC) => {
  wC.on('login', (event, webContents, authInfo, callback) => {
    if(authInfo.isProxy) {
      callback('user', 'pass');
    }
  }) 
});

@nornagon
Copy link
Member

Yep, handling the login event works fine, but the proxy config doesn't accept user/pass as part of the URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲
Projects
None yet
Development

No branches or pull requests

3 participants