(Issue) Invalid parameters scale: double value expected

  • Hi everyone!

    I'm trying to request a chrome-pdf report, but when I make the request, I get this error: "Protocol error (Page.printToPDF): Invalid parameter range: expected double value".
    In chrome proprieties I set the scale to 0.6, but when the request is made, the scale value is converted to a string, adding " ".

    When I do debugging in JSReport Studio, I haven't this problem because the value is a double, as you can see:


    Thanks for your time. I hope you can help me

  • administrators

    hi! can you describe or show how do you send the request? it looks like your http request client is serializing that value to string

  • Hi! Thanks for your quick reply. Yes, I can show you how I send the request.


    This is just an example, but I think that is clear. When I made the request I never pass or change the scale value. I assume this variable from JSReport.

  • administrators

    hmm i see, so yes this can be a bug, can you share an export zip with the template (and other entities that this template needs)? i would like to try it and check.

    PD: you can upload the zip here, just click the "Reply" button and you will be able to drag and drop your zip file in the new left area that is shown.

  • This post is deleted!

  • 0_1585771665234_upload-176c2362-edc0-4284-951c-2ca374faf706
    [0_1585771627452_export(45).zip](Uploading 100%)

  • administrators

    i see you tried to upload the zip, looks like there was a problem during the upload, can you try again?

  • I tried again and the error is the same. I haven't permissions to upload any kind of file. Can I send the zip by email? For a supporting email or something like that

  • Yes you can email it to us or just put it to some dropbox... but email is very fine.

  • I send via email for you @jan_blaha and @bjrmatos . The topic of email is the same that this issue

  • administrators

    i've sent you an email about the problem and solution, i'm going to post here too for the rest of people interested

    this was a specific problem with the postgres-store, we found that the nodejs postgres driver does not convert the postgres numeric type to javascript float when reading from database. this was the problem for your case, because when you try to render from http api then you only pass a shortid and the rest is loaded from db, but when you do the render from studio the whole template is send to the http api so there was no problem in that case. we did some tweaks to the way the postgres driver converts the numeric type and it should be ok now. you can try the fix by installing the postgres-store from github "npm i jsreport/jsreport-postgres-store"

  • Thanks @bjrmatos and @jan_blaha
    In the next few days, I will update my container and, when updated, I report the results.

  • administrators

    we have also released postgres-store 1.3.1, which includes this fix, so now you just need to update the jsreport-postgres-store in your project instead of installing from git dep, just FYI

  • Thank you guys.
    I'm sorry for my late reply, but only today I had time to test correctly on my container. I only update to postgres-store 1.3.0 to 1.3.1, in my docker image, and now its working. Thanks.

Log in to reply

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