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

Grover::JavaScript::Error (Navigation failed because browser has disconnected!) #80

Closed
ckhall opened this issue Sep 17, 2020 · 9 comments

Comments

@ckhall
Copy link

ckhall commented Sep 17, 2020

on Heroku, receiving this error when calling .to_pdf.

Followed all the instructions on setting up puppeteer on heroku. Any ideas here?

@abrom
Copy link
Contributor

abrom commented Sep 17, 2020

Going to need a lot more information.

  1. have you followed all of the Heroku setup instructions? https://github.com/Studiosity/grover#running-on-heroku
  2. what is your code setup before the call to .to_pdf?
  3. what versions of things have you got installed? Grover? Puppeteer? Chromium?
  4. what have you tried to figure this out?
  5. have you tried searching the web for the error? I found many results. It may be that someone else has had this issue!

@ckhall
Copy link
Author

ckhall commented Sep 18, 2020

@abrom

  1. yes, to the letter.
  2.     html = render_to_string('report.html.erb', layout: false)
        pdf = Grover.new(
          html,
          height: '11in',
          width: '8.5in',
          landscape: true,
          margin: {
            top: '0px',
            bottom: '0px',
            left: '0px',
            right: '0px'
          }
        ).to_pdf
    
    
  3. grover v0.13.1, puppeteer v5.2.1, chromium ? (as i understand, puppeteer downloads latest?)
  4. google "Navigation failed because browser has disconnected!" - nothing i have come across pertains to ruby or heroku.
  5. see Add support for configuring a front and back cover page for PDFs #4.

@ckhall
Copy link
Author

ckhall commented Sep 18, 2020

chromium version is Chromium 85.0.4182.0 (r782078) according to puppeteer changelog

@ckhall
Copy link
Author

ckhall commented Sep 18, 2020

ok, figured it out. had to remove jemalloc buildpack. https://github.com/gaffneyc/heroku-buildpack-jemalloc.git specifically and not start processes using jemalloc.sh. may want to add a note to the readme for Heroku section.

@ckhall ckhall closed this as completed Sep 18, 2020
@abrom
Copy link
Contributor

abrom commented Sep 19, 2020

I'll happily accept a PR ;)

@kladaFOX
Copy link

ok, figured it out. had to remove jemalloc buildpack. https://github.com/gaffneyc/heroku-buildpack-jemalloc.git specifically and not start processes using jemalloc.sh. may want to add a note to the readme for Heroku section.

Thanks MAN

@mikkelwf
Copy link

It's an issue that this doesn't work with jemalloc enabled

@bradherman
Copy link

It's an issue that this doesn't work with jemalloc enabled

Yeah it's a bummer that turning off jemalloc is the only option right now.

@Fire-Dragon-DoL
Copy link

Oh wow, I think it might be worth mentioning in the README. I just lost 2 days on this and I would have not have considered grover at all if I knew I couldn't use jemalloc (yes, it saves so much memory).

Thank you for opening this issue, I would have kept searching forever.

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

6 participants