-
Notifications
You must be signed in to change notification settings - Fork 209
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] Cannot find module package/lib/cli/cli.js #1294
Comments
This is stderr output which is indeed maybe printed to a different place.
We can probably also include a few last stderr lines into the exception. Currently stderr output from the driver process is simply piped to stderr of the parent process (where the test runs), so you should already be able to see all those errors as part of stderr.
Yes, this is how playwright works today. We first extract the driver in a temp directory and then run it from there. We may replace that with a step where we download the driver once during installation / first run.
Playwright doesn't expect anyone else to touch the node modules / run any node commands in that directory. Even though merely running some node.js commands in that directory may be hamless, others may well modify the driver in an unexpected way. |
That would seem nice!
Thanks for considering it.
Sorry for the confusion, I had only run |
Yes, this should not matter. |
having some similar scenario error, please any one. HELP.... "C:\Program Files\Java\openjdk-21\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\lib\idea_rt.jar=52140:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\bin" -javaagent:C:\Users\CTram\AppData\Local\JetBrains\IntelliJIdea2024.3\captureAgent\debugger-agent.jar -Dkotlinx.coroutines.debug.enable.creation.stack.trace=false -Ddebugger.agent.enable.coroutines=true -Dkotlinx.coroutines.debug.enable.flows.stack.trace=true -Dkotlinx.coroutines.debug.enable.mutable.state.flows.stack.trace=true -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\plugins\testng\lib\testng-rt.jar;C:\Users\CTram\Desktop\playwright-automation-framework\target\test-classes;C:\Users\CTram\Desktop\playwright-automation-framework\target\classes;C:\Users\CTram.m2\repository\com\microsoft\playwright\playwright\1.45.1\playwright-1.45.1.jar;C:\Users\CTram.m2\repository\com\google\code\gson\gson\2.11.0\gson-2.11.0.jar;C:\Users\CTram.m2\repository\com\google\errorprone\error_prone_annotations\2.27.0\error_prone_annotations-2.27.0.jar;C:\Users\CTram.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C:\Users\CTram.m2\repository\com\microsoft\playwright\driver\1.45.1\driver-1.45.1.jar;C:\Users\CTram.m2\repository\com\microsoft\playwright\driver-bundle\1.45.1\driver-bundle-1.45.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-java\7.20.1\cucumber-java-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-core\7.20.1\cucumber-core-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-gherkin\7.20.1\cucumber-gherkin-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-gherkin-messages\7.20.1\cucumber-gherkin-messages-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\gherkin\28.0.0\gherkin-28.0.0.jar;C:\Users\CTram.m2\repository\io\cucumber\messages\24.1.0\messages-24.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\testng-xml-formatter\0.2.0\testng-xml-formatter-0.2.0.jar;C:\Users\CTram.m2\repository\io\cucumber\query\12.2.0\query-12.2.0.jar;C:\Users\CTram.m2\repository\io\cucumber\tag-expressions\6.1.0\tag-expressions-6.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-expressions\17.1.0\cucumber-expressions-17.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\datatable\7.20.1\datatable-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-plugin\7.20.1\cucumber-plugin-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\docstring\7.20.1\docstring-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\html-formatter\21.7.0\html-formatter-21.7.0.jar;C:\Users\CTram.m2\repository\io\cucumber\junit-xml-formatter\0.5.0\junit-xml-formatter-0.5.0.jar;C:\Users\CTram.m2\repository\io\cucumber\ci-environment\10.0.1\ci-environment-10.0.1.jar;C:\Users\CTram.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-testng\7.20.1\cucumber-testng-7.20.1.jar;C:\Users\CTram.m2\repository\org\testng\testng\7.10.2\testng-7.10.2.jar;C:\Users\CTram.m2\repository\com\beust\jcommander\1.82\jcommander-1.82.jar;C:\Users\CTram.m2\repository\org\webjars\jquery\3.7.1\jquery-3.7.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-picocontainer\7.20.0\cucumber-picocontainer-7.20.0.jar;C:\Users\CTram.m2\repository\org\picocontainer\picocontainer\2.15\picocontainer-2.15.jar;C:\Users\CTram.m2\repository\net\datafaker\datafaker\2.4.0\datafaker-2.4.0.jar;C:\Users\CTram.m2\repository\org\yaml\snakeyaml\2.3\snakeyaml-2.3.jar;C:\Users\CTram.m2\repository\com\github\curious-odd-man\rgxgen\2.0\rgxgen-2.0.jar;C:\Users\CTram.m2\repository\com\googlecode\libphonenumber\libphonenumber\8.13.46\libphonenumber-8.13.46.jar;C:\Users\CTram.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar" com.intellij.rt.testng.RemoteTestNGStarter -usedefaultlisteners false -socket52139 @w@C:\Users\CTram\AppData\Local\Temp\idea_working_dirs_testng.tmp -temp C:\Users\CTram\AppData\Local\Temp\idea_testng.tmp Executing test suite... Finished executing test suite! ===============================================
|
System info
After a long-running session, a simple, unadorned
Playwright.create()
can start failing with:It took me a long while to realise what was going on.
On stdout, which can be logged to a separate place relative to that of Java exceptions, I noticed:
So the issues that I would pinpoint/suggest are:
node
commands in this directory during this timenode
invocation spoil playwright's node?After restating the JVM session, the issue was gone. Therefore it's hard to reproduce, sorry.
Thanks - V
The text was updated successfully, but these errors were encountered: