JSReport Online "Unauthorized for versions" error

  • I use jsreport online and defined there serveral templates which are downloaded by an Angular App.
    Since a few days I can't generate any reports by the App, but via Postman it works fine with the same Authorization header and content.

    When I try to generate the report via the JS-App, jsreport logs the following error on its console:

    Unauthorized for versions
    Error: Unauthorized for versions at module.exports (/usr/src/app/node_modules/jsreport-core/lib/util/createError.js:11:13) at Reporter.createError (/usr/src/app/node_modules/jsreport-core/lib/reporter.js:330:12) at Object.createAuthorizationError (/usr/src/app/node_modules/jsreport-authorization/lib/authorization.js:58:23) at Function. (/usr/src/app/node_modules/jsreport-version-control/lib/versionControl.js:51:40) at /usr/src/app/node_modules/listener-collection/lib/listenerCollection.js:171:33 at /usr/src/app/node_modules/listener-collection/lib/listenerCollection.js:151:16 at tryCatcher (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/promise.js:693:18) at Async._drainQueue (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/async.js:133:16) at Async._drainQueues (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/app/node_modules/listener-collection/node_modules/bluebird/js/release/async.js:17:14) at processImmediate (internal/timers.js:456:21) at process.topLevelDomainCallback (domain.js:137:15)

    Can anybody help me?

  • Hi, we are investigating this issue. I come back to you ASAP.

  • No luck replicating the issue so far, please let me know if your request includes some special props additional to

      "template: { "name": "foo" },
      "data": { .... }

    Also, I believe you will mitigate the error immediately when you will use an admin email for the API calls for now.

  • Update. We are able to replicate the same error when adding reports to the request.

    options: {
                reports: {
                    save: true

  • My issue was that I had the following structure:

        template: { 'shortid': 'Hkgpf1tISI'},
        data: {...},
        options: { 'reports': { 'save': true }}

    I just had to remove the options part and it worked again.
    Nevertheless, this worked for the last 2 years - but maybe others would need that option.
    Thanks for support!

  • @jan_blaha You were faster :)

    For me it is not a problem to remove the reports property, but maybe for some others?

  • Great, thanks for the info.

    Nevertheless, this worked for the last 2 years - maybe

    Yes, we released the last week a big jsreportonline update and it includes this regression bug.
    We will hotfix it.
    Thanks again

  • Awesome, thanks!

  • FYI this was hotfixed in jsreportonline some hours ago.

Log in to reply

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