Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large image size breaks rendering #4

Open
fujiiface opened this issue Jul 16, 2020 · 7 comments
Open

Large image size breaks rendering #4

fujiiface opened this issue Jul 16, 2020 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fujiiface
Copy link

Hi,

I started running into an issue while using this action that seems to be linked to the markdown-to-pdf container. Haven't really changed anything on my end other than some content in markdown and some more pictures to render. Here's the error out put:

Error: Invalid protocol: data:
    at Request.init (/node_modules/request/request.js:458:31)
    at new Request (/node_modules/request/request.js:127:8)
    at request (/node_modules/request/index.js:53:10)
    at /node_modules/request/index.js:61:12
    at Function.get (/node_modules/request/index.js:100:12)
    at /markdown-to-pdf.js:170:11
    at new Promise (<anonymous>)
    at encodeImage (/markdown-to-pdf.js:169:9)
    at ConvertImageRoutes (/markdown-to-pdf.js:111:22)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
ERROR: SyntaxError: Invalid regular expression: /data:image/png;base64,iVBORw0KGgo....
........

omitted for brevity

........YII=/: Nothing to repeat
    at new RegExp (<anonymous>)
    at ConvertImageRoutes (/markdown-to-pdf.js:112:32)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /markdown-to-pdf.js:229:15**
Built HTML file: UserGuide.html
Built PDF file: UserGuide.pdf
Gracefully shut down image server.
(node:1) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
    at /node_modules/puppeteer/lib/LifecycleWatcher.js:142:21
  -- ASYNC --
    at Frame.<anonymous> (/node_modules/puppeteer/lib/helper.js:110:27)
    at Page.goto (/node_modules/puppeteer/lib/Page.js:629:49)
    at Page.<anonymous> (/node_modules/puppeteer/lib/helper.js:111:23)
    at /markdown-to-pdf.js:159:14
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

I did upgrade my action to use 1.0.1 in case that was the issue but I'm still getting this consistently now.

@fujiiface
Copy link
Author

Further reference here: I'm trying to process about 35 images in one document. Total size of the images is about 4.5MB so nothing terribly big.

@BaileyJM02
Copy link
Owner

Thanks for the detailed report, I've got a busy day today, but I'll try and have a look this evening, if not tomorrow 👍.

@fujiiface
Copy link
Author

Hey thanks again for taking a look. I'm able to get all the images processing now but I had to reduce their size by 50%. Also, I am still getting the listed error repeated twice but for two separate images.

@BaileyJM02
Copy link
Owner

Hi Christopher, sorry I haven't got this sorted sooner, work has been crazy. I've just booked some time this evening to look at this, have you come across anything else over the last few days? Thanks. 😃

@fujiiface
Copy link
Author

Hi Bailey thanks for the follow up. Work has been crazy over here, also. Haven't been able to push any test updates since last mentioned but there was errors still occurring in the output. It doesn't seem to stop anything at the moment but like I mentioned previously, I had to reduce the image sizes by about 50% for the action to complete successfully.

@BaileyJM02

This comment was marked as outdated.

@BaileyJM02

This comment was marked as outdated.

@BaileyJM02 BaileyJM02 self-assigned this Feb 7, 2021
@BaileyJM02 BaileyJM02 added the enhancement New feature or request label Feb 7, 2021
@BaileyJM02 BaileyJM02 added this to the v1.1.0 milestone Feb 7, 2021
@BaileyJM02 BaileyJM02 added bug Something isn't working and removed enhancement New feature or request labels May 4, 2021
@BaileyJM02 BaileyJM02 changed the title Action Error Large image size breaks rendering May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants