Commit Error



  • Using the online cloud version, when I navigate to the 'Commit' option, I receive the following error. Everything else works fine.

    TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. at Function.Buffer.from (buffer.js:202:9) at patch.documentProperties.forEach (/usr/src/app/node_modules/jsreport-version-control/lib/patches.js:27:37) at Array.forEach () at module.exports.applyPatch (/usr/src/app/node_modules/jsreport-version-control/lib/patches.js:21:28) at v.changes.forEach (/usr/src/app/node_modules/jsreport-version-control/lib/versionControl.js:97:9) at Array.forEach () at versions.forEach (/usr/src/app/node_modules/jsreport-version-control/lib/versionControl.js:81:17) at Array.forEach () at applyPatches (/usr/src/app/node_modules/jsreport-version-control/lib/versionControl.js:80:14) at Object.commit (/usr/src/app/node_modules/jsreport-version-control/lib/versionControl.js:254:25) at ...

    Steven



  • Thank you for the bug report.
    We take a look and come back to you.


  • administrators

    hi @Steven-McFadyen can you please tell me what is the name of your jsreportonline account? and also can you describe the exact steps you do in order to get such error? i've tried to produce the same issue on my account but no luck.



  • Just click on Commit to get the error. Screenshots:
    0_1587497127310_2020-04-21_2023_js1.png
    0_1587497134975_2020-04-21_2023_js2.png
    Second screenshot has the user name.


  • administrators

    thanks for the details, we are currently investigating the issue, we have some ideas about the fix, but it will be available in the next jsreportonline release, which should happend probably next week. sorry for the troubles



  • No problems or rush. I am still migrating a few reports as and when I get a little time, before fully switching over to JSReport.



  • I am having the same issue. We run three different jsreport servers in different regions for production, plus one for testing, the commit/version control is working for 3 of the 4 servers. But I get this error on one of the production servers.



  • Getting this error now:

    0_1590393483193_Screen Shot 2020-05-25 at 5.57.11 pm.png



  • I know that this feature is in beta, but I am finding it super, super helpful.



  • @AB-D
    To the createBlockBlobFromText... error.
    I believe this was fixed in the latest 1.1.1 release of the jsreport-azure-storage extension.
    Can you verify what version you use?



  • Hi @jan_blaha , we were on 2.7.2 but have just updated to 2.8 and the issue is still there



  • @AB-D This is a custom extension, it isn't part of the jsreport installation. So you had to explicitly install it.



  • @jan_blaha I have installed the jsreport-azure-storage extension but it has not fixed the createBlobFromText issue. I am still not able to commit.



  • @AB-D The 1.1.1 version of the jsreport-azure-storage doesn't even use the createBlockBlobFromText function. It looks you haven't updated it properly. Please try something like npm i jsreport-azure-storage@1.1.1 --save --save-exact



  • @jan_blaha , I'm helping @AB-D to resolve this issue and we are not progress at the moment.

    We have a custom docker image hosted in our container registry and served from an Azure app service.

    This is the contents of the docker file:

    FROM jsreport/jsreport:2.8.0-full
    RUN npm i -d webpack@3.0.0
    RUN npm i jsreport-docxtemplater@1.3.0
    RUN npm i jsreport-azure-storage@1.1.1
    

    The build logs for the rsreport-azure-stage step are as follows:

    Step 4/4 : RUN npm i jsreport-azure-storage@1.1.1
    ---> Running in df1d8b662282
    npm WARN jsreport-server@ No repository field.
    npm WARN jsreport-server@ No license field.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

    • jsreport-azure-storage@1.1.1
      updated 1 package and audited 1556 packages in 9.325s

    and finally, the container log

    2020-06-17T01:55:18.859373357Z 2020-06-17T01:55:18.858Z - error: Error during processing request at https://x20-reports-us.azurewebsites.net/api/version-control/commit, details: createBlockBlobFromText requires the size of text to be less than 64MB. Please use createBlockBlobFromLocalFile or createBlockBlobFromStream to upload large blobs., stack: RangeError: createBlockBlobFromText requires the size of text to be less than 64MB. Please use createBlockBlobFromLocalFile or createBlockBlobFromStream to upload large blobs.
    2020-06-17T01:55:18.859404957Z at startUpload (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:4550:15)
    2020-06-17T01:55:18.859411257Z at BlobService._uploadBlobFromText (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:4599:5)
    2020-06-17T01:55:18.859415557Z at creationCallback (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:4271:12)
    2020-06-17T01:55:18.859419657Z at BlobService._createBlob (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:5856:5)
    2020-06-17T01:55:18.859423757Z at BlobService._createBlobFromText (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:4276:8)
    2020-06-17T01:55:18.859427857Z at BlobService.createBlockBlobFromText (/app/node_modules/jsreport-fs-store-azure-storage-persistence/node_modules/azure-storage/lib/services/blob/blobservice.core.js:3208:15)
    2020-06-17T01:55:18.859439258Z at BlobService.tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
    2020-06-17T01:55:18.859443158Z at BlobService.ret [as createBlockBlobFromTextAsync] (eval at makeNodePromisifiedEval (/app/node_modules/bluebird/js/release/promisify.js:1:1), <anonymous>:12:23)
    2020-06-17T01:55:18.859447158Z at Object.appendFile (/app/node_modules/jsreport-fs-store-azure-storage-persistence/lib/fileSystemAzureStorage.js:72:26)
    2020-06-17T01:55:18.859450858Z at runMicrotasks (<anonymous>)
    2020-06-17T01:55:18.859454558Z at processTicksAndRejections (internal/process/task_queues.js:97:5)
    2020-06-17T01:55:18.859459958Z at async /app/node_modules/jsreport-fs-store/lib/provider.js:141:9
    2020-06-17T01:55:18.859463658Z at async lock (/app/node_modules/jsreport-fs-store/lib/customUtils.js:145:12)

    any help would be greatly appreciated.



  • Ah, thank you for the full stack trace. I see the error is in another extension here.
    I will hotfix it and get back to you. I believe tomorrow.



  • This is now fixed in jsreport/jsreport-fs-store-azure-storage-persistence@1.2.0.
    You can install it in docker using

    RUN npm i jsreport-fs-store-azure-storage-persistence@1.2.0 --save-exact
    

    However, this should fix working with files bigger than 64mb. Consider if you don't have some rubbish in the assets. The 64mb is quite a lot and in the most of the cases you should reach this limit.



  • thanks @jan_blaha , that did the trick


Log in to reply
 

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