Working with 1.18 with 2 playwrights when the 2 object gets closed it throws HeapSpace
See original GitHub issueHere is the info
And when we connect to a wsEndPoint the problem arises when we try to close Page and Browser objects but not with Playwright object as you can see here.
20:39:13.279 [Thread-16] WARN c.p.h.HeadlessBrowserConfig$DataPerThread.close(219) - Closing [PageImpl] object:[838546035].
java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at com.microsoft.playwright.impl.WriterThread.run(PipeTransport.java:167)
java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
at com.microsoft.playwright.impl.PipeTransport.close(PipeTransport.java:93)
at com.microsoft.playwright.impl.PipeTransport.poll(PipeTransport.java:71)
at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:159)
at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:101)
at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:107)
at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:94)
at com.microsoft.playwright.impl.JsonPipe.send(JsonPipe.java:46)
at com.microsoft.playwright.impl.Connection.internalSendMessage(Connection.java:135)
at com.microsoft.playwright.impl.Connection.sendMessageAsync(Connection.java:111)
at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:107)
at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:94)
at com.microsoft.playwright.impl.PageImpl.close(PageImpl.java:547)
at com.microsoft.playwright.Page.close(Page.java:3237)
20:39:13.321 [Thread-16] WARN c.p.h.HeadlessBrowserConfig$DataPerThread.close(223) - Exception [Failed to read message from driver, pipe closed.]Closing [PageImpl] object:[838546035].
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (6 by maintainers)
Top Results From Across the Web
How to deal with "java.lang.OutOfMemoryError: Java heap ...
The detail message Java heap space indicates object could not be allocated in the Java heap. This error does not necessarily imply a...
Read more >How to Handle the OutOfMemoryError in Java - Rollbar
A java.lang.OutOfMemoryError is a runtime error in Java which occurs when the JVM is unable to allocate an object due to insufficient space ......
Read more >Fix: "Invalid heap size" or "Could not reserve enough space"
"Invalid maximum heap size "? "Could not reserve enough space"?There's a really simple fix ... 71K views 2 years ago Minecraft Server Hosting....
Read more >Java OutOfMemoryError Exceptions: Causes & Fixes [Tutorial]
This error means that you tried to keep too much data on the heap of the JVM process and there is not enough...
Read more >Java Heap Space vs Stack - Memory Allocation in Java
Java Heap space is used by java runtime to allocate memory to Objects and JRE classes. Whenever we create an object, it's always...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey mate with the latest Playwright version it works. 1.25 😃
We fixed a related bug in 1.22, could you try to reproduce it there? I’m closing it in the mean time, since its most likely fixed.
Please file a new issue if you still encounter such issues with a new repro, thanks, appreciate the effort!