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]: PLAYWRIGHT_NODEJS_PATH env variable is ignored in version 1.43.0 #1548

Closed
marrek13 opened this issue Apr 15, 2024 · 5 comments · Fixed by #1552
Closed

[Bug]: PLAYWRIGHT_NODEJS_PATH env variable is ignored in version 1.43.0 #1548

marrek13 opened this issue Apr 15, 2024 · 5 comments · Fixed by #1552

Comments

@marrek13
Copy link

marrek13 commented Apr 15, 2024

Version

1.43.0

Steps to reproduce

Use custom PLAYWRIGHT_NODEJS_PATH env and try to run the application, it is now ignored and playwright java tries to use a node executable from a non-existing /tmp directory

Expected behavior

PLAYWRIGHT_NODEJS_PATH is respected as previously

Actual behavior

PLAYWRIGHT_NODEJS_PATH is ignored

Additional context

Exception:

{
   "@timestamp":"2024-04-15T08:17:46.483296314Z",
   "@version":"1",
   "message":"Application run failed",
   "logger_name":"org.springframework.boot.SpringApplication",
   "thread_name":"main",
   "level":"ERROR",
   "level_value":40000,
   "stack_trace":"<#ba825b6d> java.io.IOException: error=2, No such file or directory\n\tat java.lang.ProcessImpl.forkAndExec(Unknown Source)\n\t... 2 frames excluded\n\t... 72 common frames omitted\nWrapped by: <#8f32ceda> java.io.IOException: Cannot run program \"/tmp/playwright-java-704439393333648951/node\": error=2, No such file or directory\n\tat java.lang.ProcessBuilder.start(Unknown Source)\n\tat java.lang.ProcessBuilder.start(Unknown Source)\n\tat com.microsoft.playwright.impl.PlaywrightImpl.createImpl(PlaywrightImpl.java:51)\n\t... 69 common frames omitted\nWrapped by: <#e61b64ad> com.microsoft.playwright.PlaywrightException: Failed to launch driver\n\tat com.microsoft.playwright.impl.PlaywrightImpl.createImpl(PlaywrightImpl.java:58)\n\tat com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:36)\n\tat com.microsoft.playwright.Playwright.create(Playwright.java:110)\n\tat com.microsoft.playwright.Playwright.create(Playwright.java:114)\n\tat com.sumup.reporting.exports.processor.pdf.BrowserContextPooledObjectFactory.makeObject(BrowserContextPooledObjectFactory.kt:44)\n\tat org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:566)\n\tat org.apache.commons.pool2.impl.GenericObjectPool.addObject(GenericObjectPool.java:222)\n\tat org.apache.commons.pool2.ObjectPool.addObjects(ObjectPool.java:89)\n\tat com.sumup.reporting.exports.processor.pdf.PlaywrightConfig.browserContextPool(PlaywrightConfig.kt:34)\n\t... 2 frames excluded\n\tat org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)\n\tat org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)\n\t... 3 frames excluded\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)\n\t... 53 common frames omitted\nWrapped by: <#19ff69d0> org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sumup.reporting.exports.processor.pdf.PlaywrightConfig$BrowserContextPool]: Factory method 'browserC...\n"
}

Environment

  • Operating System: Alpine Linux
  • Browser: Chromium
  • Java Version: 21
  • CPU: amd64
@marrek13
Copy link
Author

I think it might be related to this PR #1519

@mxschmitt
Copy link
Member

The problem is probably that we don't inherit env from the System and use the empty Collection instead when looking for PLAYWRIGHT_NODEJS_PATH.

@marrek13
Copy link
Author

@mxschmitt
Is there a chance to release a bugfix release with this fix? As we use dependabot, it constantly breaks our stuff.

@mxschmitt
Copy link
Member

@marrek13 we will release it as part of 1.44

@marrek13
Copy link
Author

@mxschmitt ok, thanks for the heads-up. I added 1.43 to ignored versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants