JSReport running in docker on azure app services

  • Hi,

    Having some issues and I can't see how to resolve them myself.

    I am using the local JSReport binary (linux binary)

    I have an App Service hosted on Azure (using a docker container). The docker file was generated by Visual Studio and I added the additional installs required (which I got from one of the posts on this forum).

    Everything else works as excepted so my only issue is coming from JSReport. When I attempt to generate the report I get the following error

    An exception was thrown. jsreport.Local.JsReportBinaryException: Error rendering report: internal/modules/cjs/loader.js:58const internalModuleStat = function (f) { return require('fs').internalModuleStat(f); }; ^TypeError: require(...).internalModuleStat is not a function at internalModuleStat (internal/modules/cjs/loader.js:58:64) at stat (internal/modules/cjs/loader.js:137:18) at Function.Module._findPath (internal/modules/cjs/loader.js:667:16) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:967:27) at Function.Module._load (internal/modules/cjs/loader.js:862:27) at Module.require (internal/modules/cjs/loader.js:1042:19) at Module._preloadModules (internal/modules/cjs/loader.js:1296:12) at loadPreloadModules (internal/bootstrap/pre_execution.js:449:5) at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:73:3) at internal/bootstrap/pkg.js:7:1

    I am using .NET Core 3.1, what additional information would you need to point me in the right direction.

    As reference here is a snippet from my Dockerfile

    FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
    WORKDIR /app
    EXPOSE 80
    EXPOSE 443

    install chrome with deps, see https://github.com/jsreport/jsreport/blob/master/docker/full/Dockerfile

    RUN apt-get update && apt-get install -y --no-install-recommends libgconf-2-4 gnupg git curl wget ca-certificates libgconf-2-4 &&
    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&
    sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
    apt-get update && \
    apt-get install -y lsb-release google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst libxtst6 libxss1 --no-install-recommends

    debian needs this additional install

    RUN apt-get install -y libx11-6 libx11-xcb1

    ENV chrome_launchOptions_executablePath google-chrome-stable
    ENV chrome_launchOptions_args --no-sandbox,--disable-dev-shm-usage,--single-process,--no-zygote

    The rest is all just autogenerated.

    Let me know if you need me to send through anything else.


  • Thanks for the quick response, I already tried that but maybe I'm misunderstanding the man's instructions.

    He mentions select the property with name as ApplicationInsights****Nodejs, I don't have that property and he seems to remove some text from the property name so I can't make it myself.

    In the else section of his answer he says you can create a new application setting:

    name: appInsights.defaultClient.config.disableAppInsights
    value: true

    Am I doing this incorrectly?

  • I also don't see that property and didn't find some docs for that.

    How about disable the app insights here

  • Interesting, after turning it off the error went away but now I get

    <title> Server Error </title>
    <font color ="#aa0000">
    <h2>Server Error.</h2>

        There was an unexpected error in the request processing.


  • Got it working thank you so much!

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.