Skip to content

AzureDevops Pipeline Task WikiPdfExportTask@4 not working anymore since Release 8.0.1 #170

@dschmittwilken

Description

@dschmittwilken

Hi all,
I experienced that somehow without updating the WikiPdfExportTask@4 on my side. I suddenly needed dotnet 8 instead of 6. After swichting to dotnet 8 in my ubuntu pipeline agent. I get a new error, that X server is missing.

Any ideas on how to fix it?

Pipeline Task:

  • task: WikiPdfExportTask@4
    displayName: 'Asd'
    continueOnError: true
    inputs:
    cloneRepo: false
    usePreRelease: false
    localpath: '$(Build.SourcesDirectory)'
    outputFile: '$(Build.ArtifactStagingDirectory)/asd.pdf'

Error Message:
00:00:00.11 No CSS specified, using devopswikistyle.css
00:00:00.11 Converting HTML to PDF
00:00:00.11 No Chrome path defined, downloading to user temp...
00:00:11.78 Chrome ready.
00:00:12.29 ERR: Something bad happend.
PuppeteerSharp.ProcessException: Failed to launch browser! [2018:2018:1009/103812.326457:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:249] Missing X server or $DISPLAY
[2018:2018:1009/103812.326492:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting.

at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 83
at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 89
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 77
at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 110
at azuredevops_export_wiki.PDFGenerator.ConvertHTMLToPDFAsync(SelfDeletingTemporaryFile tempHtmlFile)
at azuredevops_export_wiki.WikiPDFExporter.Export()

What I tried:
I tried adding an x server as a workaround to make puppeteer work, but this didn't help at all.

Added in Yaml Pipeline:

  • script: |
    sudo apt-get update
    sudo apt-get install xvfb
    export DISPLAY=:99
    Xvfb :99 -screen 0 1920x1080x24 &
    sleep 3
    displayName: Start xvfb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions