question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Seems to hang for ever on my build agent

See original GitHub issue

Context:

Trying to run this on my azure devops build agent ( Ubuntu-20.04)

I install using sudo npm install md-to-pdf -g -unsafe-perm=true

then run simply md-to-pdf Release1.0.0.md

When i do this on my local machine a pdf is generated in less than a second

On my build agent it hangs indefinitely

Strangely if i kill the task i see this in the logs

[17:18:10] generating PDF from Release1.0.0.md [started]
[17:18:12] generating PDF from Release1.0.0.md [completed]

so it seems it is running in about 2 seconds, but not existing properly so the script task doesnt exit

UPDATE - I managed to work around it by using the following syntax cat file.md | md-to-pdf > path/to/output.pdf but leaving this open in case the above issue is of interest to you

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
panvickacommented, Mar 7, 2021

A small update from me. I have got it working, even the function mdToPdf works on my self-hosted Drone CI/CD with Docker Runner, both running in a Docker.

  1. part of the yml file that installs puppeteer that works on my server
pipeline:
   build:
      image: node
      commands:
        - npm install
        - npm install puppeteer --only=dev
        - apt-get update
        - apt-get install -y -qq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget > /dev/null
        - node node_modules/puppeteer/install.js
  1. I am running node.js script using the function mdToPdf like this
 pdf = await mdToPdf({ path: pathToMd }, confObj).catch(console.error);

with launch_options: { args: ["--no-sandbox"] in confObj

  1. If you have tried several times failing, restart CI/DC server and Docker service as well (!). At one point my pipeline started working after a hard restart.
0reactions
simonhaenischcommented, Mar 7, 2021

Thanks for the update 🙌 I think there’s enough info here for now, so I’ll go ahead and close this as there’s nothing actionable about it for me. But feel free to add more comments about possible solutions or causes of this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some stages in release appear to hang even though ...
Recently, we've seen an increased number of stages continue to run (looking hung up), even though the corresponding work in Azure Portal is...
Read more >
What to do when your build hangs on the Hosted Pool...
Disabling the Just-in-time debugger is a simple matter of resetting a couple of registry keys. And now the build no longer freezes and...
Read more >
Troubleshoot pipeline runs - Azure DevOps
A pipeline may run for a long time and then fail due to job time-out. Job timeout closely depends on the agent being...
Read more >
Builds hang when agent stops capturing build log | Bamboo
We have long running builds and the lack of logging triggers the hung build event, but the build on the agent is actually...
Read more >
Builds hanging forever following a symlink · Issue #22
Running builds using any of the repositories that include the git submodule cause the build to hang. We had to disable the browserstack...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found