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

Navigation Timeout on generating pdf #255

Open
atif opened this issue Aug 26, 2024 · 3 comments
Open

Navigation Timeout on generating pdf #255

atif opened this issue Aug 26, 2024 · 3 comments

Comments

@atif
Copy link

atif commented Aug 26, 2024

I'm getting a navigation timeout randomly (majorly if I refresh the page). I have a rails end point that returns a pdf generated by Grover (to_pdf). It works fine on first page load but if I refresh the page (it kinda gets unresponsive and results in a navigation timeout).

Also, if change some contents of the html.erb and refresh the page, i get navigation timeout.

Any idea about how to fix this?

@abrom
Copy link
Contributor

abrom commented Sep 1, 2024

You're going to have to provide a little context around how you're actually using Grover. What have you tried in the way of debugging ??

@itsmegrave
Copy link

itsmegrave commented Sep 12, 2024

I think I have a similiar issue here.
Using the debugging variables, I found this error:

(irb):1:in `<main>': Failed to launch the browser process! undefined (Grover::JavaScript::Error)
[31:49:0912/143900.690452:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[31:31:0912/143900.710846:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[31:31:0912/143900.710930:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

But I think this error is caused by turn off the headless mode 🤔
Using Ruby 3.1.6, Puppeteer 22.13.1 and Grover 1.1.9, inside a docker container.

The error in rails console is (irb):2:in

': Network.enable timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed. (Grover::JavaScript::ProtocolError). Increased the protocolTimeoutto300_000` still have the problem (Before I was using Ruby 3.1.2, Puppeteer 18.2.1)

@abrom
Copy link
Contributor

abrom commented Sep 17, 2024

No, this does not appear to be a similar issue. The error message is telling you what your problem is.

Missing X server or $DISPLAY

LMGTFY: puppeteer/puppeteer#8148

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

No branches or pull requests

3 participants