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

Export to PDF option not working #1862

Closed
1 task done
CARahulDarji opened this issue Apr 14, 2024 · 12 comments
Closed
1 task done

Export to PDF option not working #1862

CARahulDarji opened this issue Apr 14, 2024 · 12 comments
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@CARahulDarji
Copy link

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Cloud (http://rxresu.me)

Current Behavior

The export to pdf option is not working. It is opening a new tab with blank page

Expected Behavior

PDF should get generated

Steps To Reproduce

No response

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

What template are you using?

None

Anything else?

No

@CARahulDarji CARahulDarji added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels Apr 14, 2024
@singhvaibhav98
Copy link

singhvaibhav98 commented Apr 18, 2024

Even I am facing this issue, link copied is undefined and if I click on download it is opening blank page

image

Thanks, I love your work and following this application since v3,

message: 'InvalidBrowserConnection',
error: 'Unexpected server response: 429',
statusCode: 500

},
status: 500,
options: {}
}
at PrinterService.generateResume (/app/dist/apps/server/main.js:13261:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21)
at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21)
at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25)
Trace: InternalServerErrorException: InvalidBrowserConnection
at PrinterService.getBrowser (/app/dist/apps/server/main.js:13147:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PrinterService.generateResume (/app/dist/apps/server/main.js:13185:29)
at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21)
at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21)
at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25) {
response: {
message: 'InvalidBrowserConnection',
error: 'Unexpected server response: 429',
statusCode: 500
},
status: 500,
options: {}
}

@faisalbasra
Copy link

For me, PDF download works successfuly.

@X-Dean
Copy link

X-Dean commented Apr 21, 2024

Mee too not working. opens a blank page and then nothing.

Error:

chrome-1 | browserless.io:browsers:chromium:cdp Starting new browser instance +0ms chrome-1 | browserless.io:browsers:chromium:cdp Got open port 35191 +0ms chrome-1 | browserless.io:browsers:chromium:cdp { chrome-1 | browserless.io:browsers:chromium:cdp args: [ chrome-1 | browserless.io:browsers:chromium:cdp '--remote-debugging-port=35191', chrome-1 | browserless.io:browsers:chromium:cdp '--no-sandbox', chrome-1 | browserless.io:browsers:chromium:cdp '--user-data-dir=/tmp/browserless-data-dirs/browserless-data-dir-a6beb202-11be-446d-8712-5dd1a4732438' chrome-1 | browserless.io:browsers:chromium:cdp ], chrome-1 | browserless.io:browsers:chromium:cdp executablePath: '/usr/local/bin/playwright-browsers/chromium-1112/chrome-linux/chrome' chrome-1 | browserless.io:browsers:chromium:cdp } Launching CDP Handler +1ms chrome-1 | browserless.io:browsers:chromium:cdp Browser is running on ws://127.0.0.1:35191/devtools/browser/dca0d522-cae6-466f-87f5-edbc7915f3dc +280ms chrome-1 | browserless.io:browsers:chromium:cdp Proxying http://0.0.0.0:3000/?token=chrome_token&launch=%7B%7D to browser ws://127.0.0.1:35191/devtools/browser/dca0d522-cae6-466f-87f5-edbc7915f3dc +0ms chrome-1 | browserless.io:browsers:chromium:cdp Setting up file:// protocol request rejection +29ms app-1 | Trace: Error: net::ERR_NAME_NOT_RESOLVED at http://host.docker.internal:3000/artboard/preview app-1 | at navigate (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:171:27) app-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) app-1 | at async Deferred.race (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:36:20) app-1 | at async CdpFrame.goto (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:137:25) app-1 | at async CdpPage.goto (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:590:20) app-1 | at async PrinterService.generateResume (/app/dist/apps/server/main.js:13211:13) app-1 | at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21) app-1 | at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21) app-1 | at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25) app-1 | at PrinterService.generateResume (/app/dist/apps/server/main.js:13261:21) app-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) app-1 | at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21) app-1 | at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21) app-1 | at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25) chrome-1 | browserless.io:limiter Job has hit timeout after 10,001ms of activity. +10s chrome-1 | browserless.io:limiter Calling timeout handler +0ms chrome-1 | browserless.io:router Websocket job has timedout, sending 429 response +44s chrome-1 | browserless.io:limiter (Running: 0, Pending: 0) All jobs complete. +0ms chrome-1 | browserless.io:browser-manager 0 Client(s) are currently connected +44s chrome-1 | browserless.io:browser-manager Closing browser session +0ms chrome-1 | browserless.io:browser-manager Deleting "/tmp/browserless-data-dirs/browserless-data-dir-a6beb202-11be-446d-8712-5dd1a4732438" user-data-dir and session from memory +0ms chrome-1 | browserless.io:browsers:chromium:cdp Closing browser process and all listeners +10s chrome-1 | browserless.io:browser-manager Deleting data directory "/tmp/browserless-data-dirs/browserless-data-dir-a6beb202-11be-446d-8712-5dd1a4732438" +1ms

@zwnk
Copy link

zwnk commented Apr 22, 2024

i get also a blank page. My app container states the following error:
[Nest] 89 - 04/22/2024, 7:37:42 PM ERROR Error: net::ERR_NAME_NOT_RESOLVED at http://host.docker.internal:3030/artboard/preview

@P6g9YHK6
Copy link

same

@singhvaibhav98
Copy link

Even I am facing this issue, link copied is undefined and if I click on download it is opening blank page

image

Thanks, I love your work and following this application since v3,

message: 'InvalidBrowserConnection',
error: 'Unexpected server response: 429',
statusCode: 500

}, status: 500, options: {} } at PrinterService.generateResume (/app/dist/apps/server/main.js:13261:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21) at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21) at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25) Trace: InternalServerErrorException: InvalidBrowserConnection at PrinterService.getBrowser (/app/dist/apps/server/main.js:13147:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PrinterService.generateResume (/app/dist/apps/server/main.js:13185:29) at async PrinterService.printResume (/app/dist/apps/server/main.js:13158:21) at async ResumeService.printResume (/app/dist/apps/server/main.js:13993:21) at async ResumeController.printResume (/app/dist/apps/server/main.js:13615:25) { response: { message: 'InvalidBrowserConnection', error: 'Unexpected server response: 429', statusCode: 500 }, status: 500, options: {} }

Able to fix it, realised the docker was not able to resolve the minio public domain name I was using, just made the minio public domain available to it and it started working. Thanks @AmruthPillai

@CARahulDarji
Copy link
Author

CARahulDarji commented Apr 29, 2024 via email

@thebetauser
Copy link

I'm also getting this issue, the chrome instance is showing a timeout after 10s

2024-05-07T16:52:12.083280411Z [Nest] 84  - 05/07/2024, 4:52:12 PM   ERROR Error: net::ERR_NAME_NOT_RESOLVED at http://host.docker.internal:3000/artboard/preview
2024-05-07T16:52:12.817361223Z [Nest] 84  - 05/07/2024, 4:52:12 PM   ERROR Error: net::ERR_NAME_NOT_RESOLVED at http://host.docker.internal:3000/artboard/preview
2024-05-07T16:52:35.062018904Z Trace: Error: net::ERR_NAME_NOT_RESOLVED at http://host.docker.internal:3000/artboard/preview
2024-05-07T16:52:35.062129218Z     at navigate (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:171:27)
2024-05-07T16:52:35.062146107Z     at async Deferred.race (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:36:20)
2024-05-07T16:52:35.062157866Z     at async CdpFrame.goto (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:137:25)
2024-05-07T16:52:35.062169144Z     at async CdpPage.goto (/app/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:585:20)
2024-05-07T16:52:35.062180144Z     at async PrinterService.generateResume (/app/dist/apps/server/main.js:13091:13)
2024-05-07T16:52:35.062191125Z     at async PrinterService.printResume (/app/dist/apps/server/main.js:13038:21)
2024-05-07T16:52:35.062201588Z     at async ResumeService.printResume (/app/dist/apps/server/main.js:13835:21)
2024-05-07T16:52:35.062212384Z     at async ResumeController.printResume (/app/dist/apps/server/main.js:13482:25)
2024-05-07T16:52:35.062222680Z     at PrinterService.generateResume (/app/dist/apps/server/main.js:13143:21)
2024-05-07T16:52:35.062233069Z     at async PrinterService.printResume (/app/dist/apps/server/main.js:13038:21)
2024-05-07T16:52:35.062243477Z     at async ResumeService.printResume (/app/dist/apps/server/main.js:13835:21)
2024-05-07T16:52:35.062253940Z     at async ResumeController.printResume (/app/dist/apps/server/main.js:13482:25)
2024-05-07T16:53:51.970181220Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.10.0.5 GET: data:image/png;base64,REDACTED +56ms
2024-05-07T16:53:51.972788941Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.10.0.5 200: data:image/png;base64,REDACTED +2ms
2024-05-07T16:54:00.484539466Z   browserless.io:limiter:warn  Job has hit timeout after 10,003ms of activity. +32s
2024-05-07T16:54:00.484739650Z   browserless.io:limiter:info  Calling timeout handler +10s
2024-05-07T16:54:00.484796020Z   browserless.io:router:error  Websocket job has timedout, sending 429 response +32s
2024-05-07T16:54:00.486168306Z   browserless.io:limiter:info  (Running: 0, Pending: 0) All jobs complete.  +1ms
2024-05-07T16:54:00.491883579Z   browserless.io:router:trace  WebSocket Request handler has finished. +9s
2024-05-07T16:54:00.492009133Z   browserless.io:browser-manager:info  0 Client(s) are currently connected +32s
2024-05-07T16:54:00.492043615Z   browserless.io:browser-manager:info  Closing browser session +0ms
2024-05-07T16:54:00.492135892Z   browserless.io:browser-manager:info  Deleting "/tmp/browserless-data-dirs/browserless-data-dir-8552eddb-9dd4-498c-a02f-cff96c6d26e6" user-data-dir and session from memory +0ms
2024-05-07T16:54:00.492770387Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.10.0.5 Closing ChromiumCDP process and all listeners +9s
2024-05-07T16:54:00.498148755Z   browserless.io:server:trace  Websocket connection complete +10s
2024-05-07T16:54:00.503047627Z   browserless.io:browser-manager:info  Deleting data directory "/tmp/browserless-data-dirs/browserless-data-dir-8552eddb-9dd4-498c-a02f-cff96c6d26e6" +11ms

@thebetauser
Copy link

FINALLY got this working.

The solution was to use the external docker IP inside the docker compose file for the following lines:

Original simple.yml config

      PUBLIC_URL: http://localhost:3000
      STORAGE_URL: http://localhost:9000/default

Fixed Config: (replace 10.10.10.10 with your host IP, this is the same IP you use to connect to the host in your browser's address bar):

      PUBLIC_URL: http://10.10.10.10:3000
      STORAGE_URL: http://10.10.10.10:9000/default

After reading a comment from someone else having pdf printing issues, I realized this is most likely a network related issue when ghxstxch added an extra variable to make the host accessible within the docker network.

The root cause is the simple.yml docker compose script using localhost instead of the correct endpoints

@thebetauser
Copy link

Running this on a raspberry pi 4, it takes on average 5-7s to generate the PDF. This comes close to timing out before the pdf is generated. If you are getting timeouts after implementing the fix, I suggest updating the TIMEOUT: 10000 in the chrome section to TIMEOUT: 30000 which is 30s

@AashishSinghal
Copy link
Contributor

AashishSinghal commented May 12, 2024

I have found that when we build the application the pdf generation starts to work. I saw that when I had not built the application, not even once, the resume thumbnails were not rendering rather showing a JSON output that there was no such directory in the "dist/apps/client/index.html",
can someone give it a try after building the application?
Once the application is built the Preview/Generation of Resume works as expected.

@CARahulDarji
Copy link
Author

do not change the default font and the pdf generation will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

9 participants