Local install of JSReport crashed - now won't start



  • As the title says, I have a local install that I've been experimenting with, and it's been working fine. I was working on trying to get some external data with scripts, when my computer crashed (blue screen - Windows 10). Once it did the disk scan and repair, I tried to load jsreport again from the command line and get this error each time.

    2018-07-18T10:46:37.907Z - info: Using extension public-templates
    2018-07-18T10:46:37.918Z - debug: Extension public-templates was disabled
    2018-07-18T10:46:37.927Z - info: fs store is persisting using fs
    2018-07-18T10:46:37.929Z - info: fs store is synchronizing using fs
    2018-07-18T10:46:38.019Z - info: fs store is loading data
    2018-07-18T10:46:38.095Z - error: Error occured during reporter init SyntaxError: Unexpected token   in JSON at position 0
        at JSON.parse (<anonymous>)
        at parse (C:\Users\ar206747\node_modules\jsreport-fs-store\lib\customUtils.js:77:15)
        at Array.map (<anonymous>)
        at loadFlatDocument (C:\Users\ar206747\node_modules\jsreport-fs-store\lib\persistence.js:148:58)
        at <anonymous>
    An error has occurred when trying to initialize jsreport (2). Unexpected token   in JSON at position 0 (1).
    caused by error (2) -> stack = Error:
        at instance.init.then.catch (C:\Users\ar206747\node_modules\jsreport-cli\lib\instanceHandler.js:31:29)
        at <anonymous>
    caused by error (1) -> stack = SyntaxError:
        at JSON.parse (<anonymous>)
        at parse (C:\Users\ar206747\node_modules\jsreport-fs-store\lib\customUtils.js:77:15)
        at Array.map (<anonymous>)
        at loadFlatDocument (C:\Users\ar206747\node_modules\jsreport-fs-store\lib\persistence.js:148:58)
        at <anonymous>
    

    The odd thing is the error it's reporting about unexpected token in json at <anonymous> is the problem I was trying to debug in my script when the computer crashed.

    I've tried jsreport repair but it hasn't fixed the problem.

    Any ideas?



  • please backup/delete file data/settings and start again.

    Which version of jsreport you have please? We will need to investigate how the data became inconsistent, it should not happen.



  • I'm on 2.1.0, but I can't find that file to delete?



  • It should be there, please paste screen of your data folder.

    Side note - you should create an extra folder for jsreport app. As we instruct now on the download page. You seems to be running directly from the user folder.



  • which jsreport folder will the data folder be in? I'm not overly familiar with the structure.



  • The default is
    jsreportappdir/data - data folder
    jsreportappdir/jsreport.config.json - configuration file
    .....



  • I'm removed it and get the same error.



  • There could be another file in the root of data folder that is causing the problem.

    Please zip your data folder and send it to my email. Remove the secret information.
    Thank you.


Log in to reply
 

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