Error in starting jsreport when using S3 for storage



  • I am using S3 to store template and I am getting the following error when starting jsreport

    • 2019-06-07T04:27:47.528Z - info: Initializing jsreport@2.5.0 in production mode using configuration file: jsreport.config.json
      2019-06-07T04:27:47.531Z - info: Searching for available extensions in /home/ubuntu/jsreportapp/
      2019-06-07T04:27:47.538Z - info: Extensions location cache contains up to date information, skipping crawling in /home/ubuntu/jsreportapp/
      2019-06-07T04:27:47.541Z - info: Found 33 extensions
      2019-06-07T04:27:47.597Z - info: Setting http-server strategy for rendering
      2019-06-07T04:27:47.796Z - info: Using extension handlebars@2.0.2
      2019-06-07T04:27:47.800Z - info: Using extension tags@2.2.0
      2019-06-07T04:27:47.802Z - info: Using extension templates@2.2.0
      2019-06-07T04:27:47.803Z - info: Using extension jsrender@2.0.0
      2019-06-07T04:27:47.804Z - info: Using extension import-export@1.3.0
      2019-06-07T04:27:47.886Z - info: Using extension authentication@2.2.3
      2019-06-07T04:27:47.907Z - info: Using extension cli@2.0.7
      2019-06-07T04:27:47.907Z - info: Using extension freeze@2.0.0
      2019-06-07T04:27:47.909Z - info: Using extension debug@2.0.2
      2019-06-07T04:27:47.910Z - info: Using extension express@2.4.0
      2019-06-07T04:27:47.972Z - info: Using extension pdf-utils@1.4.0
      2019-06-07T04:27:48.102Z - info: Using extension data@2.1.0
      2019-06-07T04:27:48.103Z - info: Using extension authorization@2.2.4
      2019-06-07T04:27:48.105Z - info: Using extension chrome-pdf@1.4.0
      2019-06-07T04:27:48.160Z - info: Using extension child-templates@1.2.0
      2019-06-07T04:27:48.163Z - info: Using extension browser-client@2.1.1
      2019-06-07T04:27:48.164Z - info: Using extension licensing@2.1.0
      2019-06-07T04:27:48.188Z - info: Using extension fs-store@2.4.1
      2019-06-07T04:27:48.304Z - info: fs store underlying changes synchronization with studio is disabled
      2019-06-07T04:27:48.305Z - info: Using extension version-control@1.2.3
      2019-06-07T04:27:48.342Z - info: Using extension reports@2.2.0
      2019-06-07T04:27:48.344Z - info: Using extension text@2.0.0
      2019-06-07T04:27:48.345Z - info: Using extension base@2.0.2
      2019-06-07T04:27:48.346Z - info: Using extension studio@2.5.1
      2019-06-07T04:27:48.360Z - info: Using extension html-to-xlsx@2.3.1
      2019-06-07T04:27:48.426Z - info: html-to-xlsx detected chrome as available html engine
      2019-06-07T04:27:48.426Z - info: Using extension assets@1.1.3
      2019-06-07T04:27:48.431Z - info: Using extension scheduling@2.0.7
      2019-06-07T04:27:48.468Z - info: Using extension scripts@2.1.0
      2019-06-07T04:27:48.471Z - info: Using extension fs-store-aws-s3-persistence@1.2.7
      2019-06-07T04:27:48.522Z - info: Using extension fs-store-aws-sns-sync@1.0.2
      2019-06-07T04:27:48.580Z - info: Using extension xlsx@2.0.10
      2019-06-07T04:27:48.663Z - info: Using extension sample-template@2.3.0
      2019-06-07T04:27:48.665Z - info: Using extension resources@2.0.3
      2019-06-07T04:27:48.666Z - info: Using extension public-templates@2.0.1
      2019-06-07T04:27:48.666Z - info: Using fs provider for template store.
      2019-06-07T04:27:48.670Z - info: fs store is persisting using aws-s3
      2019-06-07T04:27:48.684Z - error: Error occured during reporter init TypeError: Cannot promisify an API that has normal methods with 'Async'-suffix

      See http://goo.gl/MqrFmX

      at checkValid (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:54:27)
      at promisifiableMethods (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:77:5)
      at promisifyAll (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:241:9)
      at Function.Promise.promisifyAll (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:311:12)
      at module.exports (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store-aws-s3-persistence/lib/fileSystemS3.js:21:11)
      at reporter.fsStore.registerPersistence (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store-aws-s3-persistence/lib/main.js:10:8)
      at Object.load (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store/lib/provider.js:54:15)
      at Object.init (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/store/documentStore.js:143:29)
      at Reporter.init (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/reporter.js:206:32)
      at process._tickCallback (internal/process/next_tick.js:68:7)
      An error has occurred when trying to initialize jsreport (2). Cannot promisify an API that has normal methods with 'Async'-suffix

      See http://goo.gl/MqrFmX
      (1).
      caused by error (2) -> stack = Error:
      at instance.init.then.catch (/home/ubuntu/jsreportapp/node_modules/jsreport-cli/lib/instanceHandler.js:31:29)
      at process._tickCallback (internal/process/next_tick.js:68:7)
      caused by error (1) -> stack = TypeError:
      at checkValid (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:54:27)
      at promisifiableMethods (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:77:5)
      at promisifyAll (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:241:9)
      at Function.Promise.promisifyAll (/home/ubuntu/jsreportapp/node_modules/bluebird/js/release/promisify.js:311:12)
      at module.exports (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store-aws-s3-persistence/lib/fileSystemS3.js:21:11)
      at reporter.fsStore.registerPersistence (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store-aws-s3-persistence/lib/main.js:10:8)
      at Object.load (/home/ubuntu/jsreportapp/node_modules/jsreport-fs-store/lib/provider.js:54:15)
      at Object.init (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/store/documentStore.js:143:29)
      at Reporter.init (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/reporter.js:206:32)
      at process._tickCallback (internal/process/next_tick.js:68:7)

    This is my configuration

    {
    "extensions": {
    "fs-store-aws-s3-persistence": {
    "accessKeyId": "myKey",
    "secretAccessKey": "mySecretAccessKey",
    "bucket": "myBucket",
    "lock": {
    "queueName": "myQueue.fifo",
    "region": "us-west-2",
    "enabled": true,
    "attributes": {}
    },
    "s3Options": {
    "maxRetries": 3
    }
    },
    "scripts": {
    "timeout": 40000,
    "strategy": "http-server"
    },
    "sample-template": {
    "createSamples": false
    },
    "fs-store": {
    "persistence": {
    "provider": "aws-s3"
    },
    "compactionInterval": 20000
    }
    },
    "store": {
    "provider": "fs"
    },
    "blobStorage": {
    "provider": "fs"
    },
    "httpPort": 5488,
    "logger": {
    "console": {
    "transport": "console",
    "level": "info"
    },
    "file": {
    "transport": "file",
    "level": "info",
    "filename": "logs/reporter.log"
    },
    "error": {
    "transport": "file",
    "level": "info",
    "filename": "logs/error.log"
    }
    },
    "allowLocalFilesAccess": true,
    "templatingEngines": {
    "timeout": 10000,
    "strategy": "http-server"
    },
    "chrome": {
    "launchOptions": {
    "args": [
    "--no-sandbox"
    ]
    },
    "timeout": 40000
    }
    }



  • Thanks for reporting this. This turned out to be bug which is now fixed in
    jsreport-fs-store-aws-s3-persistence@1.3.0



  • Thanks for the answer. I figured the same. I rollback to 1.2..6 and it worked. I will update to 1.3.0


Log in to reply
 

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