Skip to content

[🐛 Bug]: CDP NetworkInterceptor warning when reading request body/contents #15013

@MichailiK

Description

@MichailiK

What happened?

Whenever the request contents of a request gets read, a warning message gets logged, which can be pretty huge, as it dumps the entire request, including headers & contents. For my usage, this doesn't seem to be causing any actual issues though.

How can we reproduce the issue?

See repository for a simple'ish example: https://github.com/MichailiK/NetworkInterceptorBug

(Build the project using mvn package, then run using java -jar target/NetworkInterceptorBug-1.0-SNAPSHOT-All.jar)

The repro is inconsistent & may require several runs. I believe this is a race condition.

If I had a semi-educated guess on what is going on: Because I am closing the network interceptor right after I receive the needed request body, Selenium may disable the Fetch domain before its entirely done processing (?) the last intercepted request.

Relevant log output

Log output
Jan 26, 2025 1:57:36 PM org.openqa.selenium.devtools.Connection$Listener lambda$onText$0
WARNING: Unable to process: {"method":"Fetch.requestPaused","params":{"requestId":"interception-job-4.0","request":{"url":"http://localhost:8080/favicon.ico","method":"GET","headers":{"Accept":"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8","Referer":"http://localhost:8080/api/register","User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36","sec-ch-ua":"\"Not A(Brand\";v=\"8\", \"Chromium\";v=\"132\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\""},"initialPriority":"High","referrerPolicy":"strict-origin-when-cross-origin"},"frameId":"8428DA1E9F7D2E8145B16B07CD404D69","resourceType":"Other"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
org.openqa.selenium.devtools.DevToolsException: {"id":16,"error":{"code":-32000,"message":"Fetch domain is not enabled"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
Build info: version: '4.28.0', revision: 'ac342546e9'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.52', java.version: '17.0.13'
Driver info: driver.version: unknown
        at org.openqa.selenium.devtools.Connection.sendAndWait(Connection.java:195)
        at org.openqa.selenium.devtools.DevTools.send(DevTools.java:94)
        at org.openqa.selenium.devtools.DevTools.send(DevTools.java:89)
        at org.openqa.selenium.devtools.idealized.Network.lambda$prepareToInterceptTraffic$4(Network.java:236)
        at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
        at org.openqa.selenium.devtools.idealized.Network.lambda$prepareToInterceptTraffic$5(Network.java:264)
        at org.openqa.selenium.devtools.DevTools.lambda$addListener$0(DevTools.java:108)
        at org.openqa.selenium.devtools.Connection.lambda$handle$5(Connection.java:348)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:541)
        at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1850)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at org.openqa.selenium.devtools.Connection.handle(Connection.java:311)
        at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:239)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.openqa.selenium.WebDriverException: {"id":16,"error":{"code":-32000,"message":"Fetch domain is not enabled"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
Build info: version: '4.28.0', revision: 'ac342546e9'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.52', java.version: '17.0.13'
Driver info: driver.version: unknown
        at org.openqa.selenium.devtools.Connection.handle(Connection.java:275)
        ... 4 more

Exception in thread "CDP Connection" org.openqa.selenium.devtools.DevToolsException: {"id":16,"error":{"code":-32000,"message":"Fetch domain is not enabled"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
Build info: version: '4.28.0', revision: 'ac342546e9'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.52', java.version: '17.0.13'
Driver info: driver.version: unknown
        at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:242)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.openqa.selenium.devtools.DevToolsException: {"id":16,"error":{"code":-32000,"message":"Fetch domain is not enabled"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
Build info: version: '4.28.0', revision: 'ac342546e9'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.52', java.version: '17.0.13'
Driver info: driver.version: unknown
        at org.openqa.selenium.devtools.Connection.sendAndWait(Connection.java:195)
        at org.openqa.selenium.devtools.DevTools.send(DevTools.java:94)
        at org.openqa.selenium.devtools.DevTools.send(DevTools.java:89)
        at org.openqa.selenium.devtools.idealized.Network.lambda$prepareToInterceptTraffic$4(Network.java:236)
        at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
        at org.openqa.selenium.devtools.idealized.Network.lambda$prepareToInterceptTraffic$5(Network.java:264)
        at org.openqa.selenium.devtools.DevTools.lambda$addListener$0(DevTools.java:108)
        at org.openqa.selenium.devtools.Connection.lambda$handle$5(Connection.java:348)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:541)
        at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1850)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at org.openqa.selenium.devtools.Connection.handle(Connection.java:311)
        at org.openqa.selenium.devtools.Connection$Listener.lambda$onText$0(Connection.java:239)
        ... 3 more
Caused by: org.openqa.selenium.WebDriverException: {"id":16,"error":{"code":-32000,"message":"Fetch domain is not enabled"},"sessionId":"38CE9D37707C4427FA42B5B89B0CC98F"}
Build info: version: '4.28.0', revision: 'ac342546e9'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.52', java.version: '17.0.13'
Driver info: driver.version: unknown
        at org.openqa.selenium.devtools.Connection.handle(Connection.java:275)
        ... 4 more

Operating System

NixOS 24.11

Selenium version

Java 4.28.0

What are the browser(s) and version(s) where you see this issue?

Chromium 132.0.6834.110

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 132.0.6834.110

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intendedJ-staleApplied to issues that become stale, and eventually closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions