Hola!, me sale un error al iniciar jsreport



  • Hola!, me sale un error al iniciar jsreport. Estaba trabajando en el studio editor y tuve un fallo de energia. Cuando encendi e inicie el servidor con jsrepor start me sale el siguiente error

    Hello! I get an error when starting jsreport. I was working in the studio editor and I had a power failure. When I started up and started the server with jsrepor start I get the following error

    jsreport start
    2018-09-05T17:05:56.206Z - info: Initializing jsreport@2.2.0 in development mode using configuration file:                 jsreport.config.json
    2018-09-05T17:05:56.221Z - info: Searching for available extensions in /home/pi/jsreportapp/
    2018-09-05T17:05:56.369Z - info: Extensions location cache doesn't contain entry yet, crawling
    2018-09-05T17:05:58.256Z - info: Found 31 extensions
    2018-09-05T17:05:58.321Z - debug: Writing extension locations cache to /tmp/jsreport/core/locations.json
    2018-09-05T17:05:58.327Z - debug: Discovered 31 extensions
    2018-09-05T17:05:58.590Z - info: Setting process based strategy for rendering. Please visit     http://jsreport.net/learn/configuration for information how to get more performance.
    2018-09-05T17:05:58.629Z - info: Using extension handlebars
    2018-09-05T17:05:58.656Z - info: Using extension import-export
    2018-09-05T17:05:59.294Z - info: Using extension templates
    2018-09-05T17:05:59.311Z - info: Using extension jsrender
    2018-09-05T17:05:59.314Z - debug: Extension authentication is disabled, skipping
    2018-09-05T17:05:59.315Z - info: Using extension freeze
    2018-09-05T17:05:59.323Z - info: Using extension cli
    2018-09-05T17:05:59.326Z - info: Using extension express
    2018-09-05T17:05:59.904Z - info: Using extension debug
    2018-09-05T17:05:59.913Z - info: Using extension tags
    2018-09-05T17:05:59.929Z - info: Using extension data
    2018-09-05T17:05:59.939Z - info: Using extension fs-store
    2018-09-05T17:06:00.867Z - info: Using extension authorization
    2018-09-05T17:06:00.878Z - debug: Extension authorization was disabled
    2018-09-05T17:06:00.879Z - info: Using extension html-to-xlsx
    2018-09-05T17:06:01.591Z - info: html-to-xlsx detected chrome as available html engine
    2018-09-05T17:06:01.592Z - info: Using extension child-templates
    2018-09-05T17:06:01.603Z - info: Using extension browser-client
    2018-09-05T17:06:01.613Z - info: Using extension chrome-pdf
    2018-09-05T17:06:01.655Z - info: Using extension pdf-utils
    2018-09-05T17:06:01.663Z - info: Using extension version-control
    2018-09-05T17:06:01.789Z - info: Using extension reports
    2018-09-05T17:06:01.806Z - info: Using extension text
    2018-09-05T17:06:01.810Z - info: Using extension base
    2018-09-05T17:06:01.817Z - info: Using extension studio
    2018-09-05T17:06:01.945Z - info: Using extension licensing
    2018-09-05T17:06:02.017Z - info: Using extension scripts
    2018-09-05T17:06:02.037Z - info: Using extension assets
    2018-09-05T17:06:02.073Z - info: Using extension scheduling
    2018-09-05T17:06:02.280Z - info: Using extension xlsx
    2018-09-05T17:06:02.734Z - info: Using extension sample-template
    2018-09-05T17:06:02.744Z - info: Using extension resources
    2018-09-05T17:06:02.750Z - info: Using extension public-templates
    2018-09-05T17:06:02.767Z - debug: Extension public-templates was disabled
    2018-09-05T17:06:02.790Z - info: fs store is persisting using fs
    2018-09-05T17:06:02.792Z - info: fs store is synchronizing using fs
    2018-09-05T17:06:02.801Z - info: fs store is loading data
    2018-09-05T17:06:02.867Z - error: Error occured during reporter init SyntaxError: Unexpected end of JSON input
        at JSON.parse (<anonymous>)
        at parse (/home/pi/jsreportapp/node_modules/jsreport-fs-store/lib/customUtils.js:77:15)
        at parseFiles (/home/pi/jsreportapp/node_modules/jsreport-fs-store/lib/persistence.js:25:18)
        at <anonymous>
    An error has occurred when trying to initialize jsreport (2). Unexpected end of JSON input (1).
    caused by error (2) -> stack = Error:
        at instance.init.then.catch (/home/pi/jsreportapp/node_modules/jsreport-cli/lib/instanceHandler.js:31:29)
        at <anonymous>
    caused by error (1) -> stack = SyntaxError:
        at JSON.parse (<anonymous>)
        at parse (/home/pi/jsreportapp/node_modules/jsreport-fs-store/lib/customUtils.js:77:15)
        at parseFiles (/home/pi/jsreportapp/node_modules/jsreport-fs-store/lib/persistence.js:25:18)
        at <anonymous>

  • administrators

    Hola, ya que estas usando fs-store como almacenamiento parece que algunos de los registros (archivos) se corrompieron debido a la falla de energía que presentaste. una solución rapida puede ser eliminar el archivo settings que esta presente en la carpeta data de tu proyecto, luego trata de iniciar jsreport denuevo.

    hi! since you are using fs-store as storage it seems that some of the records (files) were corrupted when you had the power failure. a quick fix can be to delete the settings file that you have in data directory of your project, then try to start jsreport again



  • Hola, sigue saliendo el mismo error, luego de haber eliminado el archivo setting de data. Justo en ese momento cuando se presento el fallo de energia estabá configurando propiedades en los margenes de chrome-pdf.

    Hello, the same error is still coming out, after having deleted the setting data file. Just at that moment when the power failure was present, it was configuring properties in the chrome-pdf margins.



  • Hola, otra información adicional es los archivos en los cuales estaba trabajando es en tamplate/Reporte, assets/Reporte.css, assets/Reporte.js, Reporte footer, Reporte header. Pude observar en los archivos que por cada elemento en assets hay una carpeta que contiene content.json y el archivo original por ejemplo content.css. Este ejemplo anterior para el caso del css no tiene valores en config.son. Quizas eliminando este archivo se pueda colocar en marcha de nuevo?

    Hello, another additional information is the files in which I was working is in tamplate / Report, assets / Reporte.css, assets / Reporte.js, Footer Report, Report header. I could see in the files that for each element in assets there is a folder that contains content.json and the original file for example content.css. This previous example for the case of the css has no values in config.son. Maybe removing this file can be put back on track?


  • administrators

    Hello, another additional information is the files in which I was working is in tamplate / Report, assets / Reporte.css, assets / Reporte.js, Footer Report, Report header. I could see in the files that for each element in assets there is a folder that contains content.json and the original file for example content.css. This previous example for the case of the css has no values in config.son. Maybe removing this file can be put back on track?

    yes, you can try removing that file (and others that have the similar problem) too but in that case it will be better if you remove the whole directory (like assets/Reporte.css) and create the entity again, you can save the contents in another location and then when jsreport is able to start you can paste the original content using the studio UI.



  • Hola, si, me funciono correctamente y pude correr el proyecto, respalde los contents y cuando ya estaba funcionado, los volvi a crear y cargue nuevamene el contenido. Gracias!

    Hello, yes, I worked correctly and could run the project, back the contents and when it was already working, I created them and loaded the content again. Thanks!


Log in to reply
 

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