Studio not loading



  • Hi sir,

    We are using jsreport hiearchyMove Api for changing the hiearchy of folders , it works fine but when frequently move folder from source to target the jsreport studio failed to load. in the browser


  • administrators

    hi @reshmajacob93

    But studio is not loading

    you mention that there is no error shown in browser, did you also open dev tools? perhaps there is some error there in the browser console.

    the only reason I can imagine studio not being able to load is that somehow during the calls to odata API something got corrupted (perhaps in the hierarchyMove), and probably a deeper look for the exact data you are passing to the hierarchyMove route.

    and while export whole templates from studio and try try to import in jsreport running locally it also the same error ie

    that Error: end of central directory record signature not found means that during the import the export file passed as input is detected to be corrupted, in other words, not a valid zip (export file after all is a zip file with our custom extension .jsrexport), I can only imagine you got this export file corrupted by either saving wrongly during HTTP api export. but you mention that you got this file from export directly in the studio, right? if so, please share the export file so i can take a look what can be wrong about it



  • hi sir,

    I have shared my export file to your mail id - bjrmatos@gmail.com

    Since studio is not responding so i have use odata API to export the whole templates.



  • hi sir,

    how can i resolve this error if it may be the issue while saving hierarchyMove?


  • administrators

    thanks for the export file, in the email, you mention that since studio is not loading you got this export file from the HTTP API, ok this what I was expecting then, because it will be weird the studio produce an invalid export file.

    I checked the export file and it seems the export HTTP API call you made is actually saving an error from AWS, not the export file. you can try to open the export file in your editor and you will see this content:

    0_1668188531474_Screenshot 2022-11-11 at 12.42.01@2x.jpg

    not sure now if the HTTP API call you made to the aws is returning status 200 but with that html 504 Gateway Time-out, any way to solve this you need to do two things

    • go to your aws, and increase there the timeout for the gateway. it seems the export is taking more time than the aws gateway is expected to wait for it
    • improve your code that executes the export http call to recognize these aws errors, perhaps you need to check the status code of the response too and recognize when the aws is returning some error, or perhaps you need to check the buffer and detect the content type (with something like file-type) and only assume everything was right if the content type is detected to be zip.

    about studio not loading, you shared with me the URL of your app, I can try to check a bit more if you share with me some jsreport credentials to get pass the login screen, just to verify if i can inspect something else there in the browser.

    how can i resolve this error if it may be the issue while saving hierarchyMove?

    you will need to share with me a bit more details about the code that calls hierarchyMove, i mostly need to know what are the values in inputData



  • ok sir thanks for reply input data contains Authorization header and source folder id and target folder id



  • hi sir,,

    I have deleted few tenplates from studio but issue not resolved



  • This post is deleted!


  • Hi sir,
    I have given cleanInterval and cleanTreshold property in report config file for deleting old printed templates
    How can i check whether old templates get deleted or not?



  • It shouldn't be cleanTreshold but cleanThreshold.

    You should see also the output logs in the following lines in the specified interval. Do you?

    2022-11-14T16:43:02.844Z - debug: Cleaning up old reports
    2022-11-14T16:43:02.858Z - debug: Cleaning old reports with remove xxx reports
    

    Please rather share the whole configuration to be sure we are on the same page.

    Please also share which collection is the biggest. What is the count of documents in that collection?



  • thank you sir for the reply. Actually we are using AWS documentdb it is not possible to view the mongodb data and not be available to connect from outside.



  • Actually we are using AWS documentdb it is not possible to view the mongodb data and not be available to connect from outside.

    There are always ways. You will need to connect there and find out whats using so much space in the DB.

    I've seen yesterday that your server didn't return responses to simple odata calls very often. That could have something to do with your infrastructure or db.



    • Acually cleanThreshold spelling was incorrect in my configuration file i think due to this spelling mistake template clean was not happen earlier isn't it? Also what is the use of cleanThreshold ?

    • Also cleaning template means permanent delete or storing template temporarily in a particular folder?because i have seen logs like,
      2022-11-14T07:49:53.876Z - debug: Writing extension locations cache to /tmp/jsreport/core/locations.json



  • Acually cleanThreshold spelling was incorrect in my configuration file Is due to this spelling mistake template clean was not happen earlier? Also what is the use of cleanThreshold ?

    Yes, cleaning is not running at all if it isn't correct cleanThreshold
    The meaning is the time, how long the reports should be persisted before cleaned up. If you put there 1d, it will mean that all reports older than one day will get deleted.

    Also cleaning template means permanent delete or storing template temporarily in a particular folder?because i have seen below line in our log
    2022-11-14T07:49:53.876Z - debug: Writing extension locations cache to /tmp/jsreport/core/locations.json

    It's a permanent delete from the template store and a blob from the blob storage.

    Also I haven't seen template clean logs in our logs yet ie,

    It needs to be there, otherwise, it doesn't run.

    Also this log comes every minute (based on clean interval property value) right in our logs?

    Yes


    Unfortunately, I'm not sure what happens if the app starts to clean millions of records you may have there now. It expects to clean a small number of reports frequently. It may reach memory limits in your case now. You may need to clean it from the DB manually anyway, but let's see.


Log in to reply
 

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