Error occured during reporter init



  • Hi,

    I am using JSReport in a desktop application, which was built using electron.
    Coming to point, I can able to compile the code and run it in development mode, but when I built .exe and start the application, JSReport crashes the application and while checking the log had found the following error message, please help me how to fix this

    Here is the complete log error: Error occured during reporter init Error: ENOENT: no such file or directory, rename 'C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\static\dist\1.client.js' -> 'C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\static\dist\extensions.client.js'
    at Object.fs.renameSync (fs.js:766:18)
    at Reporter.reporter.on (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\lib\studio.js:76:12)
    at emitOne (events.js:121:20)
    at Reporter.emit (events.js:211:7)
    at configureExpressApp (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-express\lib\reporter.express.js:167:12)
    at Object.reporter.initializeListeners.add (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-express\lib\reporter.express.js:266:21)
    at C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\listener-collection\lib\listenerCollection.js:171:33
    at C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\listener-collection\lib\listenerCollection.js:151:16
    at tryCatcher (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:17:14)



  • Can I get any solution for this?



  • College wrote this blog post about integrating jsreport into electron desktop app. Perhaps it helps.

    https://jsreport.net/blog/pdf-reports-in-electron-app



  • Thanks for your response @jan_blaha ,

    I did followed the same way in the post, after all these done and once I built the application, it get crashes and leaves me an error stack as like I mentioned in the post, the error stack was given by error.txt file which was created by jsreport. I guess that's asking me to change the name of the file '1.client.js' to 'extensions.client.js' in jsreport studio, so please check and let me know how to fix that.



  • The college who wrote this is on vacation and I don't do electron development.

    It is failing in the jsreport studio extension. Do you need that actually? You could disable it using config

    {
     "extensions": { "studio": { "enabled": false } }
    }
    


  • Even after following this also, I am getting the same issue.



  • Is your config file applied? Can you get the logs?



  • Yeah I had applied that and here is the config file contents
    { "certificate": { "key": "certificates/jsreport.net.key", "cert": "certificates/jsreport.net.cert" }, "httpPort": 5488, "httpsPort": null, "logger": { "console": { "transport": "console", "level": "debug" }, "file": { "transport": "file", "level": "info", "filename": "logs/reporter.log" }, "error": { "transport": "file", "level": "error", "filename": "logs/error.log" } }, "store": { "provider": "fs" }, "blobStorage": { "provider": "fs" }, "templatingEngines": { "strategy": "dedicated-process", "timeout": 10000, "allowedModules": [] }, "phantom": { "strategy": "dedicated-process", "timeout": 60000 }, "extensions": { "studio": { "enabled": false }, "authentication": { "cookieSession": { "secret": "<your strong secret>" }, "admin": { "username": "admin", "password": "password" }, "enabled": false }, "scripts": { "allowedModules": [ "request" ], "timeout": 60000 }, "sample-template": { "createSamples": true }, "allowLocalFilesAccess": true } }
    and following is the error what I am getting
    2018-10-22T09:47:17.403Z - error: Error occured during reporter init Error: ENOENT: no such file or directory, rename 'C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\static\dist\1.client.js' -> 'C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\static\dist\extensions.client.js' at Object.fs.renameSync (fs.js:766:18) at Reporter.reporter.on (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-studio\lib\studio.js:76:12) at emitOne (events.js:121:20) at Reporter.emit (events.js:211:7) at configureExpressApp (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-express\lib\reporter.express.js:167:12) at Object.reporter.initializeListeners.add (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\jsreport-express\lib\reporter.express.js:266:21) at C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\listener-collection\lib\listenerCollection.js:171:33 at C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\listener-collection\lib\listenerCollection.js:151:16 at tryCatcher (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\balasubramani\AppData\Local\Programs\demo-app\resources\app.asar\node_modules\bluebird\js\release\async.js:17:14)


Log in to reply
 

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