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
21.82k stars 2.34k forks source link

[Bug] <PDF Downloader does not work> #2000

Open jo-4co opened 1 month ago

jo-4co commented 1 month ago

Is there an existing issue for this?

Product Variant

Cloud (https://rxresu.me)

Current Behavior

(In Chrome) When clicking the Export PDF button, a new tab opens almost immediately but the file never downloads. Only the .json file can be downloaded, but I need a PDF version!

Expected Behavior

PDF download starts after clicking the Export PDF button.

Steps To Reproduce

  1. On the right hand side column, scroll down to the "Export" panel.
  2. Click on "PDF" button.

What browsers are you seeing the problem on?

Chrome

What template are you using?

Chikorita

Anything else?

I don't know if this issue is specific to the Chikorita template. I haven't tried downloading a PDF of any other template.

1337codes commented 1 month ago

Hi, could you try changing your font family to IBM Plex Sans and export again?

jo-4co commented 1 month ago

Hi, could you try changing your font family to IBM Plex Sans and export again?

I tried! But still it doesn't start the download...

jamess60 commented 1 month ago

+1 - Doesnt work for me in FireFox, tried multiple fonts including the IBM Plex Sans

JSON Download works but PDF download just opens an about:blank tab

I would consider this a critical bug as the application is essentially useless without it.

My docker compose:


    rr-db:
        container_name: rr-db
        image: postgres:16
        restart: no
        volumes:
            - ./reactive-resume/db:/var/lib/postgresql/data
        environment:
            POSTGRES_DB: postgres
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: secret
            PG_PORT: 5033
        ports:
            - 5033:5033
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
            interval: 10s
            timeout: 5s
            retries: 5
    rr-minio:
        container_name: rr-minio
        image: minio/minio
        restart: no
        command: server /data
        ports:
            - "9000:9000"
        volumes:
            - ./reactive-resume/minio:/data
        environment:
            MINIO_ROOT_USER: secret
            MINIO_ROOT_PASSWORD: secret
    rr-chrome:
        container_name: rr-chrome
        image: ghcr.io/browserless/chromium:latest
        restart: no
        environment:
            TIMEOUT: 10000
            CONCURRENT: 10
            TOKEN: secret
            EXIT_ON_HEALTH_FAILURE: true
            HEALTH: true
    rr-app:
        container_name: rr-app
        image: amruthpillai/reactive-resume:latest
        restart: no
        ports:
            - "3002:3002"
        depends_on:
            - rr-db
            - rr-minio
            - rr-chrome
        environment:
            PORT: 3002
            NODE_ENV: production
            PUBLIC_URL: http://localhost:3002
            STORAGE_URL: http://localhost:9000/default
            CHROME_TOKEN: chrome_token
            CHROME_URL: ws://chrome:3000
            DATABASE_URL: postgresql://postgres:postgres@rr-db:5033/postgres
            ACCESS_TOKEN_SECRET: secret
            REFRESH_TOKEN_SECRET: secret
            MAIL_FROM: noreply@localhost      
            STORAGE_ENDPOINT: rr-minio
            STORAGE_PORT: 9000
            STORAGE_BUCKET: default
            STORAGE_ACCESS_KEY: secret
            STORAGE_SECRET_KEY: secret
            STORAGE_USE_SSL: false
            STORAGE_SKIP_BUCKET_CHECK: false
            DISABLE_SIGNUPS: true
jo-4co commented 1 month ago

Exactly! The same exact scenario occurs for me in Chrome.

1337codes commented 1 month ago

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

wmhoneycutt commented 1 month ago

I thought I was having the same issue, but it turns out the browser pop-up blocker was stopping it. But I still can't export to PDF. A webpage pops up displaying the following: ` AccessDenied

Access Denied. resumes/Project Manager.pdf clz2qf1nc00001rz45pz68h04 /clz2qf1nc00001rz45pz68h04/resumes/Project Manager.pdf 17E5CCE240ECF013 dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8

`

image

I get the same error using Microsoft Edge and Google Chrome

jo-4co commented 1 month ago

Exactly! I thought I had the same issue but after I enabled all pop-ups still no download :(

david-askari commented 1 month ago

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

New resumes do work, even after some editing. Would need to investigate more at which stage the PDF export breaks.


In the meantime I found a workaround for existing resumes. Exporting them as JSON and importing them as new resumes, fixes the PDF export for me. If it then breaks again, I export and import it again.

@jo-4co @jamess60 @wmhoneycutt have you guys tried this?

jamess60 commented 1 month ago

If I create a brand new empty document and hit export, I get the same about:blank issue.

On 27 Jul 2024, at 15:55, David Askari @.***> wrote:

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

New resumes do work, even after some editing. Would need to investigate more at which stage the PDF export breaks.

In the meantime I found a workaround for existing resumes. Exporting them as JSON and importing them as new resumes, fixes the PDF export for me. If it then breaks again, I export and import it again.

@jo-4co https://github.com/jo-4co @jamess60 https://github.com/jamess60 @wmhoneycutt https://github.com/wmhoneycutt have you guys tried this?

— Reply to this email directly, view it on GitHub https://github.com/AmruthPillai/Reactive-Resume/issues/2000#issuecomment-2254170706, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6EPDEM5GVKQYKKQTFTHMT3ZOOYHTAVCNFSM6AAAAABLJF3COGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGE3TANZQGY. You are receiving this because you were mentioned.

Tarkan67 commented 1 month ago

I had the same issue, the problem was i had a "Ü" in the title most likely it has some issues with non english characters

jo-4co commented 1 month ago

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

New resumes do work, even after some editing. Would need to investigate more at which stage the PDF export breaks.

In the meantime I found a workaround for existing resumes. Exporting them as JSON and importing them as new resumes, fixes the PDF export for me. If it then breaks again, I export and import it again.

@jo-4co @jamess60 @wmhoneycutt have you guys tried this?

This method worked! Thank you. I had originally downloaded a somewhat distorted PDF version of the resume via the Windows Print to PDF feature, and then edited it in Illustrator to polish it visually. However your method is much faster! Thanks again.

jamess60 commented 1 month ago

I had the same issue, the problem was i had a "Ü" in the title most likely it has some issues with non english characters

It doesn't work for me with a completely blank document or a document with a single standard ASCII character. I doubt this is the cause.

wmhoneycutt commented 1 month ago

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

New resumes do work, even after some editing. Would need to investigate more at which stage the PDF export breaks.

In the meantime I found a workaround for existing resumes. Exporting them as JSON and importing them as new resumes, fixes the PDF export for me. If it then breaks again, I export and import it again.

@jo-4co @jamess60 @wmhoneycutt have you guys tried this?

Sorry for the late reply. However my resume is a new one, created from scratch. I tried the export to JSON and then import, to try and export to PDF, but it gave me the same error.

image

jamess60 commented 1 month ago

Not for me - it’s not working under any condition 

wmhoneycutt commented 1 month ago

See attached for exported log from the Resume-CHROME container and copy of my docker compose. Let me know if there is anything else I can provide to assist. Resume-CHROME.csv rxv4 docker compose file.txt

tehniemer commented 1 month ago

Same issue here, I get these errors in the app logs when I try to export a PDF.

Trace: Error [TypeError]: Cannot read properties of null (reading 'cloneNode')
    at evaluate (evaluate at processPage (/app/dist/apps/server/main.js:13232:50), <anonymous>:1:50)
    at #evaluate (/app/node_modules/.pnpm/puppeteer-core@22.10.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:376:56)
    at async ExecutionContext.evaluate (/app/node_modules/.pnpm/puppeteer-core@22.10.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:271:16)
    at async IsolatedWorld.evaluate (/app/node_modules/.pnpm/puppeteer-core@22.10.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:99:16)
    at async CdpFrame.evaluate (/app/node_modules/.pnpm/puppeteer-core@22.10.0/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:342:20)
    at async CdpPage.evaluate (/app/node_modules/.pnpm/puppeteer-core@22.10.0/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:823:20)
    at async processPage (/app/dist/apps/server/main.js:13232:39)
    at async PrinterService.generateResume (/app/dist/apps/server/main.js:13245:17)
    at async PrinterService.printResume (/app/dist/apps/server/main.js:13171:21)
    at async ResumeService.printResume (/app/dist/apps/server/main.js:13969:21)
    at PrinterService.generateResume (/app/dist/apps/server/main.js:13276:21)
    at async PrinterService.printResume (/app/dist/apps/server/main.js:13171:21)
    at async ResumeService.printResume (/app/dist/apps/server/main.js:13969:21)
    at async ResumeController.printResume (/app/dist/apps/server/main.js:13616:25)
Veltarn commented 1 month ago

Hi,

I have the same issue here in Firefox I got this warning just before the about:blank page pop rather than the PDF.

image

jamess60 commented 1 month ago

@Veltarn What happens if you inspect element the button and replace host.docker.internal:3000 with nameofyourchromecontainer:3000 ?

Veltarn commented 1 month ago

@jamess60 unfortunately, the host is not a property of the button. When I click on the PDF exportation button, it looks like it works for a couple of seconds then I got the error message on my logs. So it seems the error is triggered by something after I clicked on the PDF exportation. I doubled checked on the DOM and on the network calls, my browser only call the main application which call Chrome container.

jamess60 commented 1 month ago

Unlucky. Seems the issue stems from comms with the chrome container. Might be worth trying an older version of it? Roll it back say 3-6 months and try?

Veltarn commented 1 month ago

Mmh indeed. I try that later as soon as I come back home! I'll Keep you tuned

Veltarn commented 1 month ago

Ok, I had some new informations.. Not what I expected at the beginning :)

I arbitrarly set the version to the 4.0.0 and... had the same error as previously mentionned (ERR_NAME_NOT_RESOLVED). I mention that I completely purged the containers, volumes and images.

I did some research and found someone who created a fork and changed some code on the tools/compose/simple.yml file which was related to chrome and PDF printing.

When I added the extra_hosts on my compose file and tried to export the PDF I had something else. My browser (Firefox), rather than opening me an about:blank tab opened a tab to the URL: http://localhost:9000/clzk69kdt0000jx7u6sz05rp2/resumes/clzk6bhiy0005jx7ueyv6jm9p.pdf

I also tried to find something about that URL host.docker.internal and found a bunch of results that make me thing this URL is used in dev mode rather than prod mode.

It seems the app tries to redirect the user to the Minio container to show the exported PDF. In my case i'm behind a Nginx reverse proxy and the containers themselves cannot be accessed directly.

I don't know if it makes sense 😄 but I feel this is a part of the problem. I keep searching

Veltarn commented 1 month ago

I managed to make the PDF export to work. This issue seems to be linked to this one.

On the docker compose file, I've added the following on the chrome service like that

  chrome:
    image: ghcr.io/browserless/chromium:latest
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      TIMEOUT: 50000
      CONCURRENT: 10
      TOKEN: chrome_token
      EXIT_ON_HEALTH_FAILURE: true
      PRE_REQUEST_HEALTH_CHECK: true

I also drastically increased the Timeout env variable to 50 seconds since my VPS is a bit slow. On the default 10 seconds timeout the export crashed every couple of time (producing another error message, making the whole thing even more confusing).

Since I'm behind a Nginx reverse proxy, I had to change the environment variable PUBLIC_URL and STORAGE_URL to their proper values. It seems (unless I mistook the way the application works) we need to be able to access to Minio so I reverse proxified it.

So extra_hosts played a decisive role as well as having a public URL for Minio.

Nattfisk commented 1 month ago

I managed to make the PDF export to work. This issue seems to be linked to this one.

On the docker compose file, I've added the following on the chrome service like that

  chrome:
    image: ghcr.io/browserless/chromium:latest
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      TIMEOUT: 50000
      CONCURRENT: 10
      TOKEN: chrome_token
      EXIT_ON_HEALTH_FAILURE: true
      PRE_REQUEST_HEALTH_CHECK: true

I also drastically increased the Timeout env variable to 50 seconds since my VPS is a bit slow. On the default 10 seconds timeout the export crashed every couple of time (producing another error message, making the whole thing even more confusing).

Since I'm behind a Nginx reverse proxy, I had to change the environment variable PUBLIC_URL and STORAGE_URL to their proper values. It seems (unless I mistook the way the application works) we need to be able to access to Minio so I reverse proxified it.

So extra_hosts played a decisive role as well as having a public URL for Minio.

thank you for this!

turns out i had the same issue, my chromium container was unable to resolve the url to Reactive Resume. in my case i had to map the public_url and storage_url to my reverse proxy hosted on the same machine so i added:

    extra_hosts:
      - "<public_url>:host-gateway"
      - "<storage_url>:host-gateway"

and now pdf download works!

andreu4448 commented 1 month ago

Same happened to me. I had to increase the timeout even further though as with it at 50s I was getting the blank tab and no download. When increasing the time, I got properly redirected to the url of the download but with localhost:9000/path/to/pdf. Then manually changing the localhost to the IP of the server triggered the download.

I need to investigate how to fix the IP but I imagine it is just because I did not configure the IP in PUBLIC_URL parameter in app.

jamess60 commented 1 month ago

Tried this, still not working. Also seems to be broken from LAN, so I doubt my cloudflare tunnel is playing any part in this. Tried blank, minimal and full files with different fonts to rule that out too

Veltarn commented 1 month ago

@jamess60 Indeed I also doubt cloudflare is involved in that. Can you see the logs at the moment you click on the PDF export ? Especially those just before the tab is opened?

sean822 commented 3 weeks ago

Does the export to PDF work when you create a new Resume just type in 1 word and export it with altering settings/fonts etc.?

New resumes do work, even after some editing. Would need to investigate more at which stage the PDF export breaks.

In the meantime I found a workaround for existing resumes. Exporting them as JSON and importing them as new resumes, fixes the PDF export for me. If it then breaks again, I export and import it again.

@jo-4co @jamess60 @wmhoneycutt have you guys tried this?

It worked. Thanks !

Roguinsura commented 3 weeks ago

@Veltarn this is what i get in my console - Trace: InternalServerErrorException: InvalidBrowserConnection at PrinterService.getBrowser (D:\SURESH\nodejs\resume1\dist\apps\server\main.js:13160:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at PrinterService.generateResume (D:\SURESH\nodejs\resume1\dist\apps\server\main.js:13198:29) at PrinterService.printResume (D:\SURESH\nodejs\resume1\dist\apps\server\main.js:13171:21) at ResumeService.printResume (D:\SURESH\nodejs\resume1\dist\apps\server\main.js:13969:21) at ResumeController.printResume (D:\SURESH\nodejs\resume1\dist\apps\server\main.js:13616:25) { response: { message: 'InvalidBrowserConnection', error: '', statusCode: 500 }, status: 500, options: {} }

I am running the project in my localhost in window, pdf is not downloading, please suggest me a way, do i need to get chrome token or something?

Veltarn commented 3 weeks ago

@Roguinsura Does it happens when you try to export as PDF ? Because it looks like something is returning an error. Do you have access to server's logs ?

jamess60 commented 3 weeks ago

@Veltarn - Made some changes to my compose (a weeks rest and a fresh pair of eyes helped...) Firstly, my chrome url was pointing to chrome, not rr-chrome. Secondly, my chrome token was wrong.

Now, instead of getting an about:blank and nothing, it redirects me to https://rr-minio:9000/default/clz19gmu1000012f5pya84ibh/resumes/test3.pdf which would be the storage_url var

I suspect my minio container might be broken as there are no previews on the /dashboard/resumes page and when it redirects for the PDF download, I get a server not found.

Compose:

    rr-db:
        container_name: rr-db
        image: postgres:16
        restart: always
        volumes:
            - /containers/v-cont-01/data/reactive-resume/db:/var/lib/postgresql/data
        environment:
            POSTGRES_DB: postgres
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: postgres
            PG_PORT: 5033
        ports:
            - 5033:5033
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
            interval: 10s
            timeout: 5s
            retries: 5
    rr-minio:
        container_name: rr-minio
        image: minio/minio
        restart: always
        command: server /data
        ports:
            - "9000:9000"
        volumes:
            - /containers/v-cont-01/data/reactive-resume/minio:/data
        environment:
            MINIO_ROOT_USER: netadmin
            MINIO_ROOT_PASSWORD: netadmin
    rr-chrome:
        container_name: rr-chrome
        image: ghcr.io/browserless/chromium:latest
        restart: always
        extra_hosts:
            - "host.docker.internal:host-gateway"
        environment:
            TIMEOUT: 500000
            CONCURRENT: 10
            TOKEN: netadmin
            EXIT_ON_HEALTH_FAILURE: true
            PRE_REQUEST_HEALTH_CHECK: true
    rr-app:
        container_name: rr-app
        image: amruthpillai/reactive-resume:latest
        restart: always
        ports:
            - "3002:3002"
        depends_on:
            - rr-db
            - rr-minio
            - rr-chrome
        environment:
            PORT: 3002
            NODE_ENV: production
            PUBLIC_URL: http://localhost:3002
            STORAGE_URL: http://rr-minio:9000/default
            CHROME_TOKEN: netadmin
            CHROME_URL: ws://rr-chrome:3000
            DATABASE_URL: postgresql://postgres:postgres@rr-db:5033/postgres
            ACCESS_TOKEN_SECRET: netadmin
            REFRESH_TOKEN_SECRET: netadmin
            MAIL_FROM: noreply@localhost      
            STORAGE_ENDPOINT: rr-minio
            STORAGE_PORT: 9000
            STORAGE_BUCKET: default
            STORAGE_ACCESS_KEY: netadmin
            STORAGE_SECRET_KEY: netadmin
            STORAGE_USE_SSL: false
            STORAGE_SKIP_BUCKET_CHECK: false
            DISABLE_SIGNUPS: true

The last log entry for rr-app (no additional entries after clicking export): [Nest] 104 - 08/15/2024, 10:48:19 AM LOG [Bootstrap] 🚀 Server is up and running on port 3002

rr-chrome logs when clicking export:

  browserless.io:index:info  Saving metrics to "/tmp/browserless-metrics.json" +0ms

2024-08-15T10:53:55.564832968Z   browserless.io:server:trace  Handling inbound WebSocket request on "/?token=netadmin" +3m

2024-08-15T10:53:55.565550026Z   browserless.io:server:trace  Found matching WebSocket route handler "?(/),/chromium" +1ms

2024-08-15T10:53:55.565584793Z   browserless.io:server:trace  Authorizing WebSocket request to "http://0.0.0.0:3000/?token=netadmin&launch=%7B%7D" +0ms

2024-08-15T10:53:55.565643750Z   browserless.io:server:trace  Validating route query-params with QUERY schema +0ms

2024-08-15T10:53:55.572009218Z   browserless.io:limiter:info  (Running: 0, Pending: 0) Adding to queue, max time allowed is 500,000ms  +3m

2024-08-15T10:53:55.572045207Z   browserless.io:limiter:info  (Running: 1, Pending: 0) Starting new job  +0ms

2024-08-15T10:53:55.572849046Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Starting new ChromiumCDP instance +0ms

2024-08-15T10:53:55.573471880Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 ChromiumCDP got open port 46579 +1ms

2024-08-15T10:53:55.573736708Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 {

2024-08-15T10:53:55.573760252Z   args: [

2024-08-15T10:53:55.573774519Z     '--remote-debugging-port=46579',

2024-08-15T10:53:55.573788945Z     '--no-sandbox',

2024-08-15T10:53:55.573803289Z     '--user-data-dir=/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c'

2024-08-15T10:53:55.573818013Z   ],

2024-08-15T10:53:55.573832463Z   executablePath: '/usr/local/bin/playwright-browsers/chromium-1129/chrome-linux/chrome'

2024-08-15T10:53:55.573847023Z } Launching ChromiumCDP Handler +0ms

2024-08-15T10:53:55.972864906Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 ChromiumCDP is running on ws://127.0.0.1:46579/devtools/browser/d8534eef-917e-4d48-8839-424ea291aa55 +399ms

2024-08-15T10:53:55.972898551Z   browserless.io:router:trace  Running found WebSocket handler. +3m

2024-08-15T10:53:55.972967367Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Proxying http://0.0.0.0:3000/?token=netadmin&launch=%7B%7D to ChromiumCDP ws://127.0.0.1:46579/devtools/browser/d8534eef-917e-4d48-8839-424ea291aa55 +0ms

2024-08-15T10:53:56.023818957Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Setting up file:// protocol request rejection +0ms

2024-08-15T10:53:56.031092032Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/preview +7ms

2024-08-15T10:53:56.039296506Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/preview +9ms

2024-08-15T10:53:56.051365150Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Navigation to http://host.docker.internal:3002/artboard/preview +12ms

2024-08-15T10:53:56.059620887Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/assets/index-ClKAxTlp.js +8ms

2024-08-15T10:53:56.060275718Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/assets/index-CdmPNc05.css +1ms

2024-08-15T10:53:56.060807143Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web +0ms

2024-08-15T10:53:56.061543510Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 error: The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy. It was defined either in the final response or a redirect. Please deliver the response using the HTTPS protocol. You can also use the 'localhost' origin instead. See https://www.w3.org/TR/powerful-features/#potentially-trustworthy-origin and https://html.spec.whatwg.org/#the-cross-origin-opener-policy-header. +1ms

2024-08-15T10:53:56.062263328Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 warn: The page requested an origin-keyed agent cluster using the Origin-Agent-Cluster header, but could not be origin-keyed since the origin 'http://host.docker.internal:3002' had previously been placed in a site-keyed agent cluster. Update your headers to uniformly request origin-keying for all pages on the origin. +1ms

2024-08-15T10:53:56.078147652Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/assets/index-CdmPNc05.css +15ms

2024-08-15T10:53:56.138617585Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/assets/index-ClKAxTlp.js +61ms

2024-08-15T10:53:56.251412584Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 302: https://unpkg.com/@phosphor-icons/web +113ms

2024-08-15T10:53:56.251754044Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1 +0ms

2024-08-15T10:53:56.293321898Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 302: https://unpkg.com/@phosphor-icons/web@2.1.1 +42ms

2024-08-15T10:53:56.293617653Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/index.js +0ms

2024-08-15T10:53:56.344214694Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/index.js +51ms

2024-08-15T10:53:56.347961638Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css +3ms

2024-08-15T10:53:56.348276196Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css +1ms

2024-08-15T10:53:56.348635683Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css +0ms

2024-08-15T10:53:56.348872881Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css +0ms

2024-08-15T10:53:56.349298319Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css +1ms

2024-08-15T10:53:56.349447102Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css +0ms

2024-08-15T10:53:56.364356295Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Navigation to http://host.docker.internal:3002/artboard/preview +15ms

2024-08-15T10:53:56.395121018Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.googleapis.com/css?family=IBM+Plex+Serif:regular,italic,600&subset=latin +30ms

2024-08-15T10:53:56.400785187Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css +6ms

2024-08-15T10:53:56.406472058Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css +6ms

2024-08-15T10:53:56.408220901Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css +1ms

2024-08-15T10:53:56.408912159Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css +1ms

2024-08-15T10:53:56.427866090Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/Phosphor.woff2 +19ms

2024-08-15T10:53:56.451098799Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css +23ms

2024-08-15T10:53:56.455975027Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css +5ms

2024-08-15T10:53:56.466744025Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/Phosphor-Bold.woff2 +11ms

2024-08-15T10:53:56.561110656Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.googleapis.com/css?family=IBM+Plex+Serif:regular,italic,600&subset=latin +94ms

2024-08-15T10:53:56.568431387Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q1s.woff2 +8ms

2024-08-15T10:53:56.570072699Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zc.woff2 +0ms

2024-08-15T10:53:56.570931887Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTjg.woff2 +2ms

2024-08-15T10:53:56.610225675Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/Phosphor.woff2 +39ms

2024-08-15T10:53:56.615489454Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/Phosphor-Bold.woff2 +6ms

2024-08-15T10:53:56.785513003Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTjg.woff2 +170ms

2024-08-15T10:53:56.801702726Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zc.woff2 +16ms

2024-08-15T10:53:56.808200265Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q1s.woff2 +7ms

2024-08-15T10:53:56.815188499Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/icon/dark.svg +6ms

2024-08-15T10:53:56.825141285Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/icon/dark.svg +10ms

2024-08-15T10:53:58.380848039Z   browserless.io:router:trace  WebSocket Request handler has finished. +2s

2024-08-15T10:53:58.380894423Z   browserless.io:browser-manager:info  0 Client(s) are currently connected, Keep-until: 0 +3m

2024-08-15T10:53:58.380911135Z   browserless.io:browser-manager:info  Closing browser session +0ms

2024-08-15T10:53:58.380926280Z   browserless.io:browser-manager:info  Deleting "/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c" user-data-dir and session from memory +0ms

2024-08-15T10:53:58.380945522Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Closing ChromiumCDP process and all listeners +2s

2024-08-15T10:53:58.381691840Z   browserless.io:server:trace  Websocket connection complete +3s

2024-08-15T10:53:58.382285204Z   browserless.io:limiter:info  Job has succeeded after 2,810ms of activity. +3s

2024-08-15T10:53:58.382304366Z   browserless.io:limiter:info  (Running: 0, Pending: 0) All jobs complete.  +0ms

2024-08-15T10:53:58.383241576Z   browserless.io:browser-manager:info  Deleting data directory "/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c" +3ms

Minio logs (since container start):

MinIO Object Storage Server

Copyright: 2015-2024 MinIO, Inc.

License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html

Version: RELEASE.2024-08-03T04-33-23Z (go1.22.5 linux/amd64)

API: http://172.18.0.6:9000  http://127.0.0.1:9000 

WebUI: http://172.18.0.6:33165 http://127.0.0.1:33165  

Docs: https://min.io/docs/minio/linux/index.html

Neither container seems to let me attach to their shell so not able to test if they can ping each other.

Roguinsura commented 3 weeks ago

@Roguinsura Does it happens when you try to export as PDF ? Because it looks like something is returning an error. Do you have access to server's logs ?

@Veltarn Yes its happening when i do export as PDF, yes i have access to server logs, but i think ths issue is with chrome printing because in my env i have - CHROME_PORT=8080 CHROME_TOKEN=chrome_token CHROME_URL=ws://localhost:8080 and when i visit http://localhost:8080 , it doesnt shows up anything, how to configure this or how to get the chrome token? also how can i send you a message personally?

Roguinsura commented 3 weeks ago

@Veltarn - Made some changes to my compose (a weeks rest and a fresh pair of eyes helped...) Firstly, my chrome url was pointing to chrome, not rr-chrome. Secondly, my chrome token was wrong.

Now, instead of getting an about:blank and nothing, it redirects me to https://rr-minio:9000/default/clz19gmu1000012f5pya84ibh/resumes/test3.pdf which would be the storage_url var

I suspect my minio container might be broken as there are no previews on the /dashboard/resumes page and when it redirects for the PDF download, I get a server not found.

Compose:

    rr-db:
        container_name: rr-db
        image: postgres:16
        restart: always
        volumes:
            - /containers/v-cont-01/data/reactive-resume/db:/var/lib/postgresql/data
        environment:
            POSTGRES_DB: postgres
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: postgres
            PG_PORT: 5033
        ports:
            - 5033:5033
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
            interval: 10s
            timeout: 5s
            retries: 5
    rr-minio:
        container_name: rr-minio
        image: minio/minio
        restart: always
        command: server /data
        ports:
            - "9000:9000"
        volumes:
            - /containers/v-cont-01/data/reactive-resume/minio:/data
        environment:
            MINIO_ROOT_USER: netadmin
            MINIO_ROOT_PASSWORD: netadmin
    rr-chrome:
        container_name: rr-chrome
        image: ghcr.io/browserless/chromium:latest
        restart: always
        extra_hosts:
            - "host.docker.internal:host-gateway"
        environment:
            TIMEOUT: 500000
            CONCURRENT: 10
            TOKEN: netadmin
            EXIT_ON_HEALTH_FAILURE: true
            PRE_REQUEST_HEALTH_CHECK: true
    rr-app:
        container_name: rr-app
        image: amruthpillai/reactive-resume:latest
        restart: always
        ports:
            - "3002:3002"
        depends_on:
            - rr-db
            - rr-minio
            - rr-chrome
        environment:
            PORT: 3002
            NODE_ENV: production
            PUBLIC_URL: http://localhost:3002
            STORAGE_URL: http://rr-minio:9000/default
            CHROME_TOKEN: netadmin
            CHROME_URL: ws://rr-chrome:3000
            DATABASE_URL: postgresql://postgres:postgres@rr-db:5033/postgres
            ACCESS_TOKEN_SECRET: netadmin
            REFRESH_TOKEN_SECRET: netadmin
            MAIL_FROM: noreply@localhost      
            STORAGE_ENDPOINT: rr-minio
            STORAGE_PORT: 9000
            STORAGE_BUCKET: default
            STORAGE_ACCESS_KEY: netadmin
            STORAGE_SECRET_KEY: netadmin
            STORAGE_USE_SSL: false
            STORAGE_SKIP_BUCKET_CHECK: false
            DISABLE_SIGNUPS: true

The last log entry for rr-app (no additional entries after clicking export): [Nest] 104 - 08/15/2024, 10:48:19 AM LOG [Bootstrap] 🚀 Server is up and running on port 3002

rr-chrome logs when clicking export:

  browserless.io:index:info  Saving metrics to "/tmp/browserless-metrics.json" +0ms

2024-08-15T10:53:55.564832968Z   browserless.io:server:trace  Handling inbound WebSocket request on "/?token=netadmin" +3m

2024-08-15T10:53:55.565550026Z   browserless.io:server:trace  Found matching WebSocket route handler "?(/),/chromium" +1ms

2024-08-15T10:53:55.565584793Z   browserless.io:server:trace  Authorizing WebSocket request to "http://0.0.0.0:3000/?token=netadmin&launch=%7B%7D" +0ms

2024-08-15T10:53:55.565643750Z   browserless.io:server:trace  Validating route query-params with QUERY schema +0ms

2024-08-15T10:53:55.572009218Z   browserless.io:limiter:info  (Running: 0, Pending: 0) Adding to queue, max time allowed is 500,000ms  +3m

2024-08-15T10:53:55.572045207Z   browserless.io:limiter:info  (Running: 1, Pending: 0) Starting new job  +0ms

2024-08-15T10:53:55.572849046Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Starting new ChromiumCDP instance +0ms

2024-08-15T10:53:55.573471880Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 ChromiumCDP got open port 46579 +1ms

2024-08-15T10:53:55.573736708Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 {

2024-08-15T10:53:55.573760252Z   args: [

2024-08-15T10:53:55.573774519Z     '--remote-debugging-port=46579',

2024-08-15T10:53:55.573788945Z     '--no-sandbox',

2024-08-15T10:53:55.573803289Z     '--user-data-dir=/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c'

2024-08-15T10:53:55.573818013Z   ],

2024-08-15T10:53:55.573832463Z   executablePath: '/usr/local/bin/playwright-browsers/chromium-1129/chrome-linux/chrome'

2024-08-15T10:53:55.573847023Z } Launching ChromiumCDP Handler +0ms

2024-08-15T10:53:55.972864906Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 ChromiumCDP is running on ws://127.0.0.1:46579/devtools/browser/d8534eef-917e-4d48-8839-424ea291aa55 +399ms

2024-08-15T10:53:55.972898551Z   browserless.io:router:trace  Running found WebSocket handler. +3m

2024-08-15T10:53:55.972967367Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Proxying http://0.0.0.0:3000/?token=netadmin&launch=%7B%7D to ChromiumCDP ws://127.0.0.1:46579/devtools/browser/d8534eef-917e-4d48-8839-424ea291aa55 +0ms

2024-08-15T10:53:56.023818957Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Setting up file:// protocol request rejection +0ms

2024-08-15T10:53:56.031092032Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/preview +7ms

2024-08-15T10:53:56.039296506Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/preview +9ms

2024-08-15T10:53:56.051365150Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Navigation to http://host.docker.internal:3002/artboard/preview +12ms

2024-08-15T10:53:56.059620887Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/assets/index-ClKAxTlp.js +8ms

2024-08-15T10:53:56.060275718Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/assets/index-CdmPNc05.css +1ms

2024-08-15T10:53:56.060807143Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web +0ms

2024-08-15T10:53:56.061543510Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 error: The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy. It was defined either in the final response or a redirect. Please deliver the response using the HTTPS protocol. You can also use the 'localhost' origin instead. See https://www.w3.org/TR/powerful-features/#potentially-trustworthy-origin and https://html.spec.whatwg.org/#the-cross-origin-opener-policy-header. +1ms

2024-08-15T10:53:56.062263328Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 warn: The page requested an origin-keyed agent cluster using the Origin-Agent-Cluster header, but could not be origin-keyed since the origin 'http://host.docker.internal:3002' had previously been placed in a site-keyed agent cluster. Update your headers to uniformly request origin-keying for all pages on the origin. +1ms

2024-08-15T10:53:56.078147652Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/assets/index-CdmPNc05.css +15ms

2024-08-15T10:53:56.138617585Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/assets/index-ClKAxTlp.js +61ms

2024-08-15T10:53:56.251412584Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 302: https://unpkg.com/@phosphor-icons/web +113ms

2024-08-15T10:53:56.251754044Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1 +0ms

2024-08-15T10:53:56.293321898Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 302: https://unpkg.com/@phosphor-icons/web@2.1.1 +42ms

2024-08-15T10:53:56.293617653Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/index.js +0ms

2024-08-15T10:53:56.344214694Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/index.js +51ms

2024-08-15T10:53:56.347961638Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css +3ms

2024-08-15T10:53:56.348276196Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css +1ms

2024-08-15T10:53:56.348635683Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css +0ms

2024-08-15T10:53:56.348872881Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css +0ms

2024-08-15T10:53:56.349298319Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css +1ms

2024-08-15T10:53:56.349447102Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css +0ms

2024-08-15T10:53:56.364356295Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 Navigation to http://host.docker.internal:3002/artboard/preview +15ms

2024-08-15T10:53:56.395121018Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.googleapis.com/css?family=IBM+Plex+Serif:regular,italic,600&subset=latin +30ms

2024-08-15T10:53:56.400785187Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css +6ms

2024-08-15T10:53:56.406472058Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css +6ms

2024-08-15T10:53:56.408220901Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css +1ms

2024-08-15T10:53:56.408912159Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css +1ms

2024-08-15T10:53:56.427866090Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/Phosphor.woff2 +19ms

2024-08-15T10:53:56.451098799Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css +23ms

2024-08-15T10:53:56.455975027Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css +5ms

2024-08-15T10:53:56.466744025Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/Phosphor-Bold.woff2 +11ms

2024-08-15T10:53:56.561110656Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.googleapis.com/css?family=IBM+Plex+Serif:regular,italic,600&subset=latin +94ms

2024-08-15T10:53:56.568431387Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q1s.woff2 +8ms

2024-08-15T10:53:56.570072699Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zc.woff2 +0ms

2024-08-15T10:53:56.570931887Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: https://fonts.gstatic.com/s/ibmplexserif/v19/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTjg.woff2 +2ms

2024-08-15T10:53:56.610225675Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/Phosphor.woff2 +39ms

2024-08-15T10:53:56.615489454Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/Phosphor-Bold.woff2 +6ms

2024-08-15T10:53:56.785513003Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizBREVNn1dOx-zrZ2X3pZvkTiUa6zUTjg.woff2 +170ms

2024-08-15T10:53:56.801702726Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizDREVNn1dOx-zrZ2X3pZvkTiUf2zc.woff2 +16ms

2024-08-15T10:53:56.808200265Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: https://fonts.gstatic.com/s/ibmplexserif/v19/jizAREVNn1dOx-zrZ2X3pZvkTi3A_yI0q1s.woff2 +7ms

2024-08-15T10:53:56.815188499Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 GET: http://host.docker.internal:3002/artboard/icon/dark.svg +6ms

2024-08-15T10:53:56.825141285Z   browserless.io:ChromiumCDPWebSocketRoute:trace 172.18.0.29 200: http://host.docker.internal:3002/artboard/icon/dark.svg +10ms

2024-08-15T10:53:58.380848039Z   browserless.io:router:trace  WebSocket Request handler has finished. +2s

2024-08-15T10:53:58.380894423Z   browserless.io:browser-manager:info  0 Client(s) are currently connected, Keep-until: 0 +3m

2024-08-15T10:53:58.380911135Z   browserless.io:browser-manager:info  Closing browser session +0ms

2024-08-15T10:53:58.380926280Z   browserless.io:browser-manager:info  Deleting "/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c" user-data-dir and session from memory +0ms

2024-08-15T10:53:58.380945522Z   browserless.io:ChromiumCDPWebSocketRoute:info 172.18.0.29 Closing ChromiumCDP process and all listeners +2s

2024-08-15T10:53:58.381691840Z   browserless.io:server:trace  Websocket connection complete +3s

2024-08-15T10:53:58.382285204Z   browserless.io:limiter:info  Job has succeeded after 2,810ms of activity. +3s

2024-08-15T10:53:58.382304366Z   browserless.io:limiter:info  (Running: 0, Pending: 0) All jobs complete.  +0ms

2024-08-15T10:53:58.383241576Z   browserless.io:browser-manager:info  Deleting data directory "/tmp/browserless-data-dirs/browserless-data-dir-b1531b37-4c8c-42a4-be48-7689f946e67c" +3ms

Minio logs (since container start):

MinIO Object Storage Server

Copyright: 2015-2024 MinIO, Inc.

License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html

Version: RELEASE.2024-08-03T04-33-23Z (go1.22.5 linux/amd64)

API: http://172.18.0.6:9000  http://127.0.0.1:9000 

WebUI: http://172.18.0.6:33165 http://127.0.0.1:33165  

Docs: https://min.io/docs/minio/linux/index.html

Neither container seems to let me attach to their shell so not able to test if they can ping each other.

it redirects you to the link which is correct, i think you are so close, your issue is solved 99%, i wanted to ask someting about setting up on live server, currently i am running in localhost, Please give me your email i want to contact you for some help regarding making it live on server brother.

nwrzd commented 1 week ago

I managed to make the PDF export to work. This issue seems to be linked to this one.

On the docker compose file, I've added the following on the chrome service like that

  chrome:
    image: ghcr.io/browserless/chromium:latest
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      TIMEOUT: 50000
      CONCURRENT: 10
      TOKEN: chrome_token
      EXIT_ON_HEALTH_FAILURE: true
      PRE_REQUEST_HEALTH_CHECK: true

I also drastically increased the Timeout env variable to 50 seconds since my VPS is a bit slow. On the default 10 seconds timeout the export crashed every couple of time (producing another error message, making the whole thing even more confusing).

Since I'm behind a Nginx reverse proxy, I had to change the environment variable PUBLIC_URL and STORAGE_URL to their proper values. It seems (unless I mistook the way the application works) we need to be able to access to Minio so I reverse proxified it.

So extra_hosts played a decisive role as well as having a public URL for Minio.

This helped. Added extra_hosts and TIMEOUT value of 100000. Thank you!