AmruthPillai / Reactive-Resume

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
https://rxresu.me
MIT License
25.91k stars 2.65k forks source link

[Bug] PDF generation doesn't work anymore #1646

Open d1zanv opened 11 months ago

d1zanv commented 11 months ago

Is there an existing issue for this?

Product Variant

Cloud (http://rxresu.me)

Current Behavior

After finishing my resume, I want to export it in PDF, by clicking on the button "Download a PDF". Except that instead of downloading the PDF automatically as usual, it's just opening an empty new tab and doesn't do anything else.

Expected Behavior

It should opened a new tab and automatically download the PDF, as before the new version.

Steps To Reproduce

  1. Open a new or old Resume
  2. Do some modifications to your resume
  3. Click on the button "Download a PDF"

What browsers are you seeing the problem on?

Firefox

What template are you using?

None

Anything else?

image The new tab that is opened after clicking the button.

d1zanv commented 11 months ago

I ran a few tests, all of which proved inconclusive. For the first test, I downloaded the JSON of my CV and imported it into a new CV, a new empty tab was displayed as mentioned above. In a second test, I created a new CV and added the elements of my original CV by hand, same problem. However, the only time I was able to download a CV was when I created a new CV and clicked on the download button without making any changes.

And you can see from the screenshot that I have a few adblock extensions, but they've all been disabled on the rxresu.me site since before the bug.

debanjanc01 commented 11 months ago

@d1zanv I believe this has been fixed and the pdf download is working now. I happened to be trying it right now, and it wasn't working. Then the service was unavailable for a few minutes. It looks to be working now.

myanello-rescale commented 11 months ago

I'm still getting this issue with the docker hosted variant:

2023-12-06T14:06:30.676Z browserless:chrome-helper Chrome PID: 825
2023-12-06T14:06:30.677Z browserless:chrome-helper Finding prior pages
2023-12-06T14:06:30.684Z browserless:chrome-helper Found 1 pages
2023-12-06T14:06:30.684Z browserless:chrome-helper Setting up page Unknown
2023-12-06T14:06:30.684Z browserless:chrome-helper Injecting download dir "/usr/src/app/workspace"
2023-12-06T14:06:30.684Z browserless:system Chrome launched 273ms
2023-12-06T14:06:30.684Z browserless:system Got chrome instance
2023-12-06T14:06:30.684Z browserless:job ZTGEPV063UFM5KE7OPE0WKWD2H71GA4P: Starting session.
2023-12-06T14:06:30.684Z browserless:job ZTGEPV063UFM5KE7OPE0WKWD2H71GA4P: Proxying request to /devtools/browser route: ws://127.0.0.1:40769/devtools/browser/3b87bb20-4a74-4ef6-93f5-11e22fdccdfa.
2023-12-06T14:06:30.685Z browserless:chrome-helper Setting up file:// protocol request rejection
2023-12-06T14:06:30.772Z browserless:chrome-helper Setting up page Unknown
2023-12-06T14:06:30.772Z browserless:chrome-helper Injecting download dir "/usr/src/app/workspace"
2023-12-06T14:06:30.773Z browserless:chrome-helper Setting up file:// protocol request rejection

and

[Nest] 131  - 12/06/2023, 2:06:18 PM     LOG [PrinterService] Retrying to generate preview of resume #clpe969w20003mmg61x7i99qs, attempt #1
Trace: Error: net::ERR_SSL_PROTOCOL_ERROR at https://resume:3000/artboard/preview
    at navigate (/app/node_modules/.pnpm/puppeteer-core@21.5.2/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:176:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Deferred.race (/app/node_modules/.pnpm/puppeteer-core@21.5.2/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:83:20)
    at async CdpFrame.goto (/app/node_modules/.pnpm/puppeteer-core@21.5.2/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:142:25)
    at async CdpPage.goto (/app/node_modules/.pnpm/puppeteer-core@21.5.2/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:595:20)
    at async PrinterService.generateResume (/app/dist/apps/server/main.js:13176:13)
    at async /app/dist/apps/server/main.js:13120:25
    at async UtilsService.getCachedOrSet (/app/dist/apps/server/main.js:11886:23)
    at async ResumeService.printResume (/app/dist/apps/server/main.js:13965:21)
    at async ResumeController.printResume (/app/dist/apps/server/main.js:13580:25)
    at PrinterService.generateResume (/app/dist/apps/server/main.js:13226:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/dist/apps/server/main.js:13120:25
    at async UtilsService.getCachedOrSet (/app/dist/apps/server/main.js:11886:23)
    at async ResumeService.printResume (/app/dist/apps/server/main.js:13965:21)
    at async ResumeController.printResume (/app/dist/apps/server/main.js:13580:25)
[Nest] 131  - 12/06/2023, 2:06:19 PM     LOG [PrinterService] Retrying to generate preview of resume #clpe969w20003mmg61x7i99qs, attempt #2
[Nest] 131  - 12/06/2023, 2:06:23 PM     LOG [PrinterService] Retrying to generate preview of resume #clpe969w20003mmg61x7i99qs, attempt #3
[Nest] 131  - 12/06/2023, 2:06:30 PM   ERROR Error: net::ERR_SSL_PROTOCOL_ERROR at https://resume:3000/artboard/preview
d1zanv commented 11 months ago

@debanjanc01 Thanks you for your quick reply. Unfortunately, I still have the issue when I am clicking the download button.

d1zanv commented 11 months ago

After a few minutes of adjusting the font, font size, margin and line spacing parameters, I was finally able to download my CV. I don't know what could have unblocked the problem, but there seems to be a bug with one of the settings.

turtaf commented 11 months ago

Same here.

Adapted an old resume to fit into 2 pages, clicked on download pdf, nothing happened....

myanello-rescale commented 11 months ago

I was able to fix my ssl errors by making the docker file point to https instead. This got it to connect to minio and then download the resume

octavian-negru commented 11 months ago

@myanello-rescale can you be more specific about the changes?

myanello-rescale commented 11 months ago

@myanello-rescale can you be more specific about the changes?

@octavian-negru sure,

    resume:
        image: amruthpillai/reactive-resume:latest
        environment:
        # -- URLs --
        - PUBLIC_URL=http://myhostname.net
        - STORAGE_URL=http://myhostname.net/default

becomes

    resume:
        image: amruthpillai/reactive-resume:latest
        environment:
        # -- URLs --
        - PUBLIC_URL=https://myhostname.net
        - STORAGE_URL=https://myhostname.net/default

in my docker-compose.yaml

octavian-negru commented 11 months ago

For me the fix was to do these changes locally and use the yml file from the PR with docker-compose. Thank you, @myanello-rescale

Caboshone commented 11 months ago

For anyone on the web client who's still struggling, the solution is just to pick one of the 8 default fonts. I tried a bunch from the dropdown and they all didn't work, but after I switched to Lato, all was OK.

hayzamjs commented 10 months ago

I'm facing the same issue, unable to export to PDF tried from both chrome and firefox I didn't try self-hosted yet.

Caboshone commented 10 months ago

I'm facing the same issue, unable to export to PDF tried from both chrome and firefox I didn't try self-hosted yet.

Did you try switching to a default font

Weav3r commented 9 months ago

For those using the default simple.yml or traefik.yml compose files consider trying the fix below https://github.com/AmruthPillai/Reactive-Resume/issues/1754#issuecomment-1930143530

yanalescho commented 9 months ago

For anyone on the web client who's still struggling, the solution is just to pick one of the 8 default fonts. I tried a bunch from the dropdown and they all didn't work, but after I switched to Lato, all was OK.

Thank you, that solved the issue for me of not being able to export to pdf on the cloud version.