Export to PDF option not working
Closed this issue · 13 comments
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
Even I am facing this issue, link copied is undefined and if I click on download it is opening blank page
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: {}
}
For me, PDF download works successfuly.
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/puppeteer-core@22.6.1/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/puppeteer-core@22.6.1/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:36:20) app-1 | at async CdpFrame.goto (/app/node_modules/.pnpm/puppeteer-core@22.6.1/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:137:25) app-1 | at async CdpPage.goto (/app/node_modules/.pnpm/puppeteer-core@22.6.1/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
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
same
Even I am facing this issue, link copied is undefined and if I click on download it is opening blank page
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
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/puppeteer-core@22.8.0/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/puppeteer-core@22.8.0/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/puppeteer-core@22.8.0/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/puppeteer-core@22.8.0/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
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
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
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.
do not change the default font and the pdf generation will work
@CARahulDarji Do you have any solution after changing the default font?