Running scheduled reports - chromium not working
Hey team, I'm trying to run scheduled reports of the app - but for some reason, chromium is not working.
On the default puppeteer code - the browser is setup, but it gets stuck on the .newPage() command, and eventually errors out with the following
I then tried rewriting the script in playwright, and selenium, but neither of those work.On selenium, exits with
This is already running on the default reports worker - which is why the code is able to discover the chromium executable - but for some reason, no page is able to open
What could I be doing wrong?
11 Replies
Not sure, can you check that your worker can access your base_url
Yeah - that seems to be the issue
This fails with
and from my laptop CLI work though
Why guidance on what the issue could be?
Okay this worked
But the page creation still does not work
Hey @rubenf tried on a different machine, but it's still not working. Is it not recommended to have the base URL as just localhost?
Why could I be facing this?
the report script will use the base url to create the report. If that base url is not reachable from the workers then it won't work
Yes, but the base URL is accessible within the worker now
Page creation is not working
to debug it, write a script that access the app url with the right permission passed as bearer token and see if it can indeed fetch the page using the base url
Yes
Did so - that works
Using basic requests package in python - I am able to get the page HTML
On puppeteer - creating a new page fails, before it goes page.goTo
it's just a normal script
which you have access to
so you need to find the diff between your script that works and the report script
we can do more of that work but only for enterprise customers
Was not an issue with the script - just FYI so you could use it to improve it for others
Fails when I specify executablePath='/usr/bin/chromium',
In the puppeteer launcher
If I don't specify it, puppetter downloads chromium iself
And it works
It's meant to be ran by the reports worker group
Which install chromium at that path as an init script
Yes
It was running on reports worker group
With chromium installed
Still didn't work
Maybe some version issue
Tried on 3 different self hosted instances on dev, staging, and production
Didn't work
@saraf0509 I finally investigated and could reproduce it wasn't working with the standard docker-compose, it's fixed on latest, thanks for the investigation
We're still using /usr/bin/chromium, but the args are now:
we are also now using BASE_URL instead of WM_BASE_URL which will always work since it's the worker using its embedded api