Failed to initialize V3 after upgrade



  • We are using the jsReport library in our existing Express app. After upgrading jsReport from 2.6.1 to 3.0.1, we received the following error message during jsReport initialization.

    0_1636492013027_upload-ba08764a-f9d7-4a1a-adfa-0b7100a82968

    Any help is appreciated.

    Thank you!



  • Thank you for reporting the problem. I apologize for the inconvenience.

    I see you likely integrate the express in this way
    https://jsreport.net/learn/adapting-jsreport#attach-to-existing-express-app

    I was able to replicate the problem and just pushed the fix. Please install the updated express extension

    npm i @jsreport/jsreport-express@3.0.1 --save --save-exact
    


  • Thank you so much, @jan_blaha . The fix works!



  • Hi @jan_blaha,

    The same issue came back after I restarted our Express app.

    Here are what I did:

    1. Installed the updated express extension as you suggested
    2. Started our Express app and it worked!
    3. Restarted the same Express app and the same error appeared

    Do you have any suggestion?

    Thank you!



  • You are right. It behaves like that.
    We will ship the fix in the next full jsreport hotfix. In a few days.

    Until then, you can apply config useExtensionsLocationCache: false, as a workaround.

    const jsreport = require('jsreport')({
      useExtensionsLocationCache: false,
      extensions: {
          express: { app: reportingApp, server: server },
      },
      appPath: "/reporting"
    });
    

    I apologize for the troubles.


Log in to reply
 

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