marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 545 forks source link

html-pdf: Evaluation - ReferenceError: Can't find variable: Set #626

Closed MazzMazz closed 3 years ago

MazzMazz commented 3 years ago

After running for months without problem we suddenly receive the following error message. Locally and on the live servers.

Server running on http://0.0.0.0:8080
Error: html-pdf: Unknown Error
html-pdf: Evaluation - ReferenceError: Can't find variable: Set
Stack:
  at https://static.cloudflareinsights.com/beacon.min.js
  at https://static.cloudflareinsights.com/beacon.min.js
  at https://static.cloudflareinsights.com/beacon.min.js
  at https://static.cloudflareinsights.com/beacon.min.js
  at https://static.cloudflareinsights.com/beacon.min.js

    at ChildProcess.respond (/pdf-printer/node_modules/html-pdf/lib/pdf.js:134:17)
    at ChildProcess.emit (events.js:223:5)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

Is something known about this?

We had Version 2.2.0 running - tried to update to Version 3.0.1 but the same problem occurs.

MazzMazz commented 3 years ago

I just found out that the Cloudflare Browser Insights is the Problem. Disabling this option will make the pdf generator work again. I guess they have an issue in their js file.

image

42510SR commented 1 month ago

@MazzMazz html-pdf: Received the exit code '1'\nhtml-pdf: Evaluation - ReferenceError: Can't find variable: $\nStack:\n at undefined I am facing this issue while i am trying to create a pdf using pdf.create method from html-pdf library