Reactive-Resume icon indicating copy to clipboard operation
Reactive-Resume copied to clipboard

Trace: InternalServerErrorException: InvalidBrowserConnection

Open sowdf opened this issue 1 year ago • 7 comments

Trace: InternalServerErrorException: InvalidBrowserConnection at PrinterService.getBrowser (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/printer/printer.service.ts:39:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at PrinterService.generateResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/printer/printer.service.ts:101:23) at /Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/printer/printer.service.ts:56:21 at UtilsService.getCachedOrSet (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/utils/utils.service.ts:56:19) at ResumeService.printResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/resume/resume.service.ts:197:17) at ResumeController.printResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/resume/resume.controller.ts:132:19) { response: { message: 'InvalidBrowserConnection', error: 'connect ECONNREFUSED ::1:8080', statusCode: 500 }, status: 500, options: {} } at PrinterService.generateResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/printer/printer.service.ts:207:15) at processTicksAndRejections (node:internal/process/task_queues:95:5) at /Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/printer/printer.service.ts:56:21 at UtilsService.getCachedOrSet (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/utils/utils.service.ts:56:19) at ResumeService.printResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/resume/resume.service.ts:197:17) at ResumeController.printResume (/Users/caozhihui/code/Reactive-Resume/dist/apps/server/webpack:/src/resume/resume.controller.ts:132:19)

sowdf avatar Nov 27 '23 11:11 sowdf

image

sowdf avatar Nov 27 '23 11:11 sowdf

this is ws://localhost:8080 , Do we have to start this ourselves

sowdf avatar Nov 27 '23 11:11 sowdf

You can check if the chrome service is indeed running by going to http://localhost:8080.

In case you have a chrome token set, you would see unauthorized. In which case just visit http://localhost:8080?token=your-chrome-token

AmruthPillai avatar Nov 27 '23 21:11 AmruthPillai

Have the same issue image Images not working: image Config: image I have my public url as my domain. But can't login using the internal url for some reason.

Ultragian avatar Jan 02 '24 19:01 Ultragian

Same issue.

LOG [Bootstrap] 🚀 Server is up and running on port 3000
LOG [PrinterService] Retrying to generate preview of resume #clra24iv60001zq5uo7277gm3, attempt #1
LOG [PrinterService] Retrying to generate preview of resume #clra24iv60001zq5uo7277gm3, attempt #2
LOG [PrinterService] Retrying to generate preview of resume #clra24iv60001zq5uo7277gm3, attempt #3
ERROR InternalServerErrorException: InvalidBrowserConnection

Docker Compose config:

CHROME_PORT: 9985
CHROME_TOKEN: ${REACTIVE_RESUME_CHROME_TOKEN}
CHROME_URL: ws://host.docker.internal

I know Chrome is reachable since I can curl it:

curl -I http://localhost:9985/?token=REDACTED

HTTP/1.1 200 OK
Set-Cookie: browserless_token=REDACTED; Max-Age=86400; HttpOnly
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Mon, 30 Oct 2023 16:12:33 GMT
ETag: W/"13df-18b815bb568"
Content-Type: text/html; charset=UTF-8
Content-Length: 5087
Date: Fri, 12 Jan 2024 03:20:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Not sure why the app is unable to connect to it.

jeayalar avatar Jan 12 '24 03:01 jeayalar

Update: I managed to make it work, however I had to give it a publicly accessible URL and use wss instead of ws.

My docker compose then looked like this:

CHROME_PORT: 443
CHROME_TOKEN: ${REACTIVE_RESUME_CHROME_TOKEN}
CHROME_URL: wss://subdomain.domain.tld

jeayalar avatar Jan 12 '24 20:01 jeayalar

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.

AashishSinghal avatar May 12 '24 03:05 AashishSinghal