Reactive-Resume
Reactive-Resume copied to clipboard
download pdf is not working
Is there an existing issue for this?
- [X] Yes, I have searched the existing issues and none of them match my problem.
Product Variant
Self-Hosted
Current Behavior
Hello, Dev team. I hosted Rx resume to my vps. When I visit to the site in my local, "download pdf" is not working. Here is code spiniest of . env ##############################
Chrome Browser (for printing)
generated with openssl rand -hex 32
CHROME_PORT=8080 CHROME_TOKEN=997869a469188cf79a41acc6698c139546142ff634400be1a7af5261f66f5113 CHROME_URL=ws://localhost:8080 ########################################### I generated CHROME_TOKEN using openssl rand -hex 32 I changed CHROME_URL=ws://vps_ip:8080 but the function is mot working, too.
here are error message
##########################################################
[Nest] 17084 - 02/28/2024, 9:58:53 AM ERROR InternalServerErrorException: InvalidBrowserConnection [Nest] 17084 - 02/28/2024, 10:07:27 AM DEBUG [PrismaService] [Query] User.findUniqueOrThrow - 181ms [Nest] 17084 - 02/28/2024, 10:07:27 AM DEBUG [UtilsService] Cache Key "user:clsn9wugp0000dy7iwaqv86o4:resume:clsnkrymv0001120de54be4sd": hit - 4ms [Nest] 17084 - 02/28/2024, 10:07:29 AM DEBUG [PrismaService] [Query] User.findUniqueOrThrow - 5ms [Nest] 17084 - 02/28/2024, 10:07:53 AM DEBUG [PrismaService] [Query] User.findUniqueOrThrow - 13ms [Nest] 17084 - 02/28/2024, 10:07:53 AM DEBUG [UtilsService] Cache Key "user:clsn9wugp0000dy7iwaqv86o4:resume:clsnkrymv0001120de54be4sd": hit - 5ms [Nest] 17084 - 02/28/2024, 10:07:53 AM DEBUG [UtilsService] Cache Key "user:clsn9wugp0000dy7iwaqv86o4:storage:resumes:clsnkrymv0001120de54be4sd": miss Trace: InternalServerErrorException: InvalidBrowserConnection at PrinterService.getBrowser (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13128:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PrinterService.generateResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13170:29) at async C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13140:25 at async UtilsService.getCachedOrSet (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:11902:23) at async ResumeService.printResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13985:21) at async ResumeController.printResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13600:25) { response: { message: 'InvalidBrowserConnection', error: 'connect ECONNREFUSED ::1:8080', statusCode: 500 }, status: 500, options: {} } at PrinterService.generateResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13246:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13140:25 at async UtilsService.getCachedOrSet (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:11902:23) at async ResumeService.printResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13985:21) at async ResumeController.printResume (C:\Users\Admin\Documents\CYS\all-resume-ai-react\dist\apps\server\main.js:13600:25)
####################################################################################
I need help of Dev team,
Thanks
Expected Behavior
No response
Steps To Reproduce
No response
What browsers are you seeing the problem on?
Chrome
What template are you using?
None
Anything else?
No response
the link to the resume is visible in the console but does not trigger download the actual dowload
the function in the PrinterService like this
private async getBrowser() {
try {
return await connect({ browserWSEndpoint: this.browserURL });
} catch (error) {
throw new InternalServerErrorException(ErrorMessage.InvalidBrowserConnection, error.message);
}
}
change to
private async getBrowser() {
try {
return await puppeteer.launch({
executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
headless: false,
slowMo: 500,
devtools: false
});
// return await connect({ browserWSEndpoint: this.browserURL });
} catch (error) {
throw new InternalServerErrorException(ErrorMessage.InvalidBrowserConnection, error.message);
}
}
just for development
Thanks for reaching out to me. Let me try again.
Thanks for reaching out to me. Let me try again.
Another solution is to download the source code of browserless and then start browserless on your local machine. After that, you can use browserless locally without needing a Docker image.