Skip to content

[🐛 Bug]: Network intercepters for authentication not working with Firefox and Chrome #1593

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

Closed
martingrossmann opened this issue Feb 29, 2024 · 7 comments
Labels
bug Something isn't working code-java Fix code example in Java

Comments

@martingrossmann
Copy link

martingrossmann commented Feb 29, 2024

What happened?

Tried to execute the Network intercepter test canContinueWithAuthCredentials in dev.selenium.bidirectional.webdriver_bidi.NetworkCommandsTest with latest Chrome and Firefox, but got a timeout or an exception:

Firefox

org.openqa.selenium.bidi.BiDiException: {"type":"error","id":1,"error":"unknown command","message":"network.addIntercept","stacktrace":"RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8\nWebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:191:5\nUnknownCommandError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:784:5\nassertExperimentalCommandsEnabled@chrome://remote/content/shared/messagehandler/Module.sys.mjs:87:13\naddIntercept@chrome://remote/content/webdriver-bidi/modules/root/network.sys.mjs:326:10\nhandleCommand@chrome://remote/content/shared/messagehandler/MessageHandler.sys.mjs:255:33\nexecute@chrome://remote/content/shared/webdriver/Session.sys.mjs:274:32\nonPacket@chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.sys.mjs:211:37\nonMessage@chrome://remote/content/server/WebSocketTransport.sys.mjs:127:18\nhandleEvent@chrome://remote/content/server/WebSocketTransport.sys.mjs:109:14\n"}
Build info: version: '4.18.1', revision: 'b1d3319b48'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12'

Chrome
... cannot load https://the-internet.herokuapp.com/basic_auth and tests runs into a timeout.

org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Build info: version: '4.18.1', revision: 'b1d3319b48'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [5298925cfc394709803d0376fea2414b, get {url=https://the-internet.herokuapp.com/basic_auth}]

The documentation tells it's supported since Selenium 4.18, but the example tests are disabled and do not work. What is here the latest implementation state?

What browsers and operating systems are you seeing the problem on?

  • Chrome 122 with latest chromedriver,
  • Firefox 123 with geckodriver 0.34.0
  • Windows 10
@martingrossmann martingrossmann added bug Something isn't working needs-triaging labels Feb 29, 2024
Copy link
Contributor

@martingrossmann, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol diemol added code-java Fix code example in Java and removed needs-triaging labels Feb 29, 2024
@Fabianoollei
Copy link

Traceback (most recent call last):
File "/cache/c-000000xy92mk07ip1rxumfaay60lzuep.py", line 25, in
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

@martingrossmann
Copy link
Author

I have an update: With Selenium 4.19.1 the Network examples are working with Firefox 124, but not with Chrome.

Unfortunately, with Chrome 124 I still get a timeout. Does anybody know whats wrong with Chrome?

@diemol
Copy link
Member

diemol commented Apr 17, 2024

I remember I wanted to check this but got distracted by something else.

If you check https://github.com/SeleniumHQ/selenium/blob/aaa7e791a4b6be6314250966a4538cd594576254/java/test/org/openqa/selenium/bidi/network/NetworkCommandsTest.java#L45, they are only executed with Firefox. Chrome still needs to implement this.

We have the code examples disabled for that reason.

Is that right, @pujagani?

@pujagani
Copy link
Contributor

Yes! That's correct. Chrome's stable release does not support it. Looks like the latest Canary has the support https://wpt.fyi/results/webdriver/tests/bidi/network?label=master&label=experimental&aligned&view=subtest.

@martingrossmann
Copy link
Author

Thanks for your input, makes something clearer. :-)

@diemol
Copy link
Member

diemol commented May 2, 2024

I will close this as the question has been answered.

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working code-java Fix code example in Java
Projects
None yet
Development

No branches or pull requests

4 participants