resumake.io icon indicating copy to clipboard operation
resumake.io copied to clipboard

Failed to load pdf file

Open fabulousmichael opened this issue 5 years ago β€’ 16 comments

Tried making a new CV after putting in details and information and I then click on MAKE, the page comes with an error message saying (Failed to load pdf file).

fabulousmichael avatar Jan 08 '20 18:01 fabulousmichael

@fabulousmichael template #6?

sky-97 avatar Feb 03 '20 04:02 sky-97

I had an issue where I copied over bullet points (with whitespacing) and I received the same error. I would check your inputs again and make sure everything is plain text.

jimmyhuang avatar Feb 10 '20 01:02 jimmyhuang

Tried making a new CV after putting in details and information and I then click on MAKE, the page comes with an error message saying (Failed to load pdf file).

Need to install latex first in your local machine to be able to compile: https://www.latex-project.org/get/

holako1992 avatar May 14 '20 07:05 holako1992

I am having the same issue. I have tried MiKTeX but still same.

omerfraz avatar May 17 '20 17:05 omerfraz

@omerfraz Could you share the error message from the terminal where you are running the Resumake server?

saadq avatar May 18 '20 00:05 saadq

[HPM] Error occurred while trying to proxy request /api/generate/resume from localhost:3000 to [::1]:3001 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

omerfraz avatar May 18 '20 00:05 omerfraz

And some tests!

FAIL src\tests\api.js (19.65s) ● Console

console.error node_modules\koa\lib\application.js:194

console.error node_modules\koa\lib\application.js:195
    Error: Error while running latexindent.
        at ChildProcess.<anonymous> (G:\resumake.io-master\app\server\node_modules\pretty-latex\index.js:62:22)
        at ChildProcess.emit (events.js:203:13)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
console.error node_modules\koa\lib\application.js:196

● POST /api/generate/resume should generate a PDF

Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.

  at node_modules/jest-jasmine2/build/queue_runner.js:72:21

● POST /api/generate/source should generate a zip of the LaTeX source code

Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.

  at node_modules/jest-jasmine2/build/queue_runner.js:72:21

Test Suites: 1 failed, 3 passed, 4 total Tests: 2 failed, 8 passed, 10 total Snapshots: 0 total Time: 20.223s Ran all test suites. npm ERR! Test failed. See above for more details. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] test:server: cd app/server && npm test npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] test:server script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\omerf\AppData\Roaming\npm-cache_logs\2020-05-17T23_59_46_454Z-debug.log npm ERR! Test failed. See above for more details.

G:\resumake.io-master> G:\resumake.io-master>

omerfraz avatar May 18 '20 00:05 omerfraz

And contents of the log

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'test:server' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pretest:server', 'test:server', 'posttest:server' ] 5 info lifecycle [email protected]~pretest:server: [email protected] 6 info lifecycle [email protected]~test:server: [email protected] 7 verbose lifecycle [email protected]~test:server: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~test:server: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;G:\resumake.io-master\node_modules.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;G:\resumake.io-master\node_modules.bin;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\Python27;C:\Python27\Scripts;C:\Program Files\PHP\v7.1;C:\Windows\system32\inetsrv;C:\Program Files\PHP\v7.3;C:\ProgramData\Boxstarter;C:\Program Files\Microsoft MPI\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C;C:\Program Files\MySQL\MySQL Utilities 1.6;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\AOMEI Backupper;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x86)\Atmel\Flip 3.4.7\bin;C:\Users\omerf\AppData\Roaming\npm;C:\Program Files\JetBrains\PhpStorm 2019.1.3\bin;C:\Users\omerf.dotnet\tools;C:\Program Files (x86)\Nmap;C:\Users\omerf\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\omerf\AppData\Local\Microsoft\WindowsApps 9 verbose lifecycle [email protected]~test:server: CWD: G:\resumake.io-master 10 silly lifecycle [email protected]~test:server: Args: [ '/d /s /c', 'cd app/server && npm test' ] 11 silly lifecycle [email protected]~test:server: Returned: code: 1 signal: null 12 info lifecycle [email protected]~test:server: Failed to exec test:server script 13 verbose stack Error: [email protected] test:server: cd app/server && npm test 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:203:13) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:203:13) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) 14 verbose pkgid [email protected] 15 verbose cwd G:\resumake.io-master 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test:server" 18 verbose node v12.6.0 19 verbose npm v6.9.0 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] test:server: cd app/server && npm test 22 error Exit status 1 23 error Failed at the [email protected] test:server script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

omerfraz avatar May 18 '20 01:05 omerfraz

It would be easier to debug this over Slack, and then we can update here when fixed. Could you join the Slack channel and then I can take a look later today or tomorrow.

saadq avatar May 18 '20 02:05 saadq

Thanks for the invite. I headed over to Slack and checked the issue, its more likely the way we ran the scripts (client and server to run separately in two different command windows i.e. npm run start:client and npm run start:server in addition to some settings in webpack.dev.config.js i.e.

proxy: {
'/api/**': {
target: 'http://[::1]:3001',
//secure: false,
//changeOrigin: false,
headers: {
        "Connection": "keep-alive"
    }
  }
}

and a change in the client/package.json build was changed to production (was originally development) for making things moving.

"build": "cross-env NODE_ENV=production webpack --config webpack.prod.config.js --progress --profile --colors",

omerfraz avatar May 20 '20 12:05 omerfraz

I also have the exact same issue. I have installed latex and confirmed via command line that it works. When I try to 'Make' the PDF, I get this error on the webpage,

Screen Shot 2020-06-10 at 10 59 00 AM

followed by this error on the terminal

Error: LaTeX Syntax Error
  ! LaTeX Error: File `fullpage.sty' not found.
  Enter file name:     \usepackage{amssymb}
  ! Undefined control sequence.
  \filename@simple ...t \relax \edef \filename@base 
  !  ==> Fatal error occurred, no output PDF file produced!
      at ReadStream.<anonymous> (/Users/aditya/dev/resumake.io/app/server/node_modules/node-latex/index.js:60:21)
      at ReadStream.emit (events.js:323:22)
      at ReadStream.EventEmitter.emit (domain.js:482:12)
      at endReadableNT (_stream_readable.js:1204:12)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)

This is limited to template 1, but when I change templates, the errors are similar with different .sty files

adityasatalkar avatar Jun 10 '20 16:06 adityasatalkar

@ars75 Your issue is unrelated to the ones above. The "Failed to load PDF" error shows up on the client whenever there's any server error.

What OS are you on? But regardless, there may just be an issue with your installation. If you search for File fullpage.sty not found on the web, you should see a few similar problems from people where the fullpage package doesn't work because of the specific installation you used.

saadq avatar Jun 10 '20 19:06 saadq

I'm currently on macOS 10.15.1

Thanks a lot. I did try looking into a few other places on the internet too.

The way I got this to work was I had to run the following commands:

sudo tlmgr install preprint

it then complained saying

tlmgr itself needs to be updated.
Please do this via either
  tlmgr update --self

So I ran

sudo tlmgr install preprint

re-ran the resumake script and voila! its working now for template 1.

I similarly had to run

sudo tlmgr install hyphenat
sudo tlmgr install textpos
sudo tlmgr install tocloft
sudo tlmgr install xifthen
sudo tlmgr install framed
sudo tlmgr install enumitem
sudo tlmgr install titlesec

to get a few more templates to run

adityasatalkar avatar Jun 10 '20 22:06 adityasatalkar

How did you install latex initially? Did you do it through MacTeX? (https://www.tug.org/mactex/)

I think MacTeX is the recommended solution for installing latex on Mac and usually comes with most of those packages installed.

saadq avatar Jun 11 '20 01:06 saadq

Yes I installed MacTex first and then tried running the scripts. But now I’m running into Syntax errors for a few templates πŸ˜… while others compile it just fine. Idk why that’s happening though. So will have to look into it next

adityasatalkar avatar Jun 11 '20 01:06 adityasatalkar

I get Failed to load PDF file. I'm on windows10. I'm clicking the Make button to make a PDF.

Where do I copy the folder node-latex-master? I pasted it here, C:\test\resumake.io-master\node-latex-master
The only thing I ran was, "npm install node-latex"

Do I need to do anything else to install node-latex? Do I need to do something with the Usage code, mentioned in the readme.md? Thanks.

I have MikTex and TeXWorks installed. [HPM] Error occurred while trying to proxy request /api/generate/resume from localhost:3000 to http://localhost:3001 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

Interesting, but I get this error, when import a .json file, which I made on my localhost:3000 Error occured while trying to proxy to: localhost:3000/api/upload

on an OpenSuse machine everything worked. For some reason, I got Failed to load when I imported a JSON file that I had just created. But I got it to load the PDF in preview screen and make a PDF resume on the first test. Several times after that, it says Failed to Load PDF.

powertrio77 avatar Jun 16 '20 00:06 powertrio77