jsreport 3 postgres-store error



  • Hey, I was trying out the new jsreport 3 and encountered a warning while using postgres-store.

    I'm using jsreport 3.2.0 with @jsreport/jsreport-postgres-store (from https://github.com/jsreport/jsreport/tree/master/packages/jsreport-postgres-store)
    The error itself is:

    error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
    

    Full logs from jsreport initialization:

    PS C:\Projects\jsreport3> jsreport start
    2022-01-08T13:21:44.688Z - info: Initializing jsreport (version: 3.2.0, configuration file: jsreport.config.json, nodejs: 16.13.1)
    2022-01-08T13:21:44.690Z - info: Searching for available extensions in C:\Projects\jsreport3\
    2022-01-08T13:21:44.695Z - info: Extensions location cache contains up to date information, skipping crawling in C:\Projects\jsreport3\
    2022-01-08T13:21:44.705Z - info: Found 36 extension(s)
    2022-01-08T13:21:44.731Z - debug: Writing extension locations cache to C:\Users\JANNO~1.SAK\AppData\Local\Temp\jsreport\core\locations.json
    2022-01-08T13:21:44.733Z - debug: Discovered 36 extensions
    2022-01-08T13:21:44.776Z - info: Using extension authentication@3.1.0
    2022-01-08T13:21:44.957Z - info: Using extension base@3.0.0
    2022-01-08T13:21:44.961Z - info: Using extension child-templates@3.0.1
    2022-01-08T13:21:44.963Z - info: Using extension cli@3.0.0
    2022-01-08T13:21:44.964Z - info: Using extension components@3.1.0
    2022-01-08T13:21:44.966Z - info: Using extension data@3.0.1
    2022-01-08T13:21:44.967Z - info: Using extension express@3.2.0
    2022-01-08T13:21:45.233Z - info: Using extension freeze@3.0.1
    2022-01-08T13:21:45.236Z - info: Using extension fs-store@3.0.0
    2022-01-08T13:21:45.321Z - info: Using extension handlebars@3.0.0
    2022-01-08T13:21:45.323Z - info: Using extension import-export@3.0.2
    2022-01-08T13:21:45.333Z - info: Using extension jsrender@3.0.0
    2022-01-08T13:21:45.334Z - info: Using extension licensing@3.0.1
    2022-01-08T13:21:45.358Z - info: Using extension localization@3.1.0
    2022-01-08T13:21:45.359Z - info: Using extension npm@3.1.0
    2022-01-08T13:21:45.362Z - info: Using extension pdf-utils@3.1.0
    2022-01-08T13:21:45.364Z - info: Using extension postgres-store@3.0.0
    2022-01-08T13:21:45.508Z - info: Using extension reports@3.0.0
    2022-01-08T13:21:45.513Z - info: Using extension tags@3.0.0
    2022-01-08T13:21:45.515Z - info: Using extension text@3.0.0
    2022-01-08T13:21:45.516Z - info: Using extension version-control@3.0.1
    2022-01-08T13:21:45.546Z - info: Using extension assets@3.1.0
    2022-01-08T13:21:45.558Z - info: Using extension authorization@3.1.0
    2022-01-08T13:21:45.562Z - info: Using extension browser-client@3.1.0
    2022-01-08T13:21:45.565Z - info: Using extension chrome-pdf@3.1.0
    2022-01-08T13:21:45.568Z - debug: Chrome strategy is chrome-pool, numberOfWorkers: 5
    2022-01-08T13:21:45.569Z - info: Using extension docx@3.1.0
    2022-01-08T13:21:45.571Z - info: Using extension html-to-xlsx@3.1.0
    2022-01-08T13:21:45.651Z - info: html-to-xlsx detected chrome as available html engine
    2022-01-08T13:21:45.652Z - info: Using extension pptx@3.1.0
    2022-01-08T13:21:45.655Z - info: Using extension scheduling@3.0.1
    2022-01-08T13:21:45.687Z - info: Using extension scripts@3.1.0
    2022-01-08T13:21:45.688Z - info: Using extension static-pdf@3.0.0
    2022-01-08T13:21:45.690Z - info: Using extension studio@3.2.0
    2022-01-08T13:21:45.747Z - info: Using extension xlsx@3.1.0
    2022-01-08T13:21:45.771Z - info: Using extension public-templates@3.0.0
    2022-01-08T13:21:45.772Z - info: Using extension sample-template@3.1.0
    2022-01-08T13:21:45.775Z - info: Using extension studio-theme-dark@3.0.1
    2022-01-08T13:21:45.777Z - info: Using general timeout for rendering (reportTimeout: 60000)
    2022-01-08T13:21:45.777Z - info: Using postgres provider for template store.
    2022-01-08T13:21:45.880Z - debug: studio default theme is: light
    2022-01-08T13:21:45.880Z - debug: studio is using custom logo from base64 source
    2022-01-08T13:21:45.896Z - info: Creating default express app.
    2022-01-08T13:21:45.921Z - info: jsreport server successfully started on http port: 5488
    2022-01-08T13:21:45.922Z - info: Verifying license key free
    2022-01-08T13:21:45.924Z - info: Using free license
    2022-01-08T13:21:45.931Z - info: Initializing worker threads
    2022-01-08T13:21:45.933Z - debug: Extensions in workers: authentication, base, child-templates, components, data, express, handlebars, jsrender, localization, npm, pdf-utils, reports, text, version-control, assets, authorization, browser-client, chrome-pdf, docx, html-to-xlsx, pptx, scripts, static-pdf, studio, xlsx
    2022-01-08T13:21:46.198Z - info: 5 worker threads initialized in 267ms
    2022-01-08T13:21:46.198Z - info: Starting temp files cleanup with 180000ms threshold
    2022-01-08T13:21:46.200Z - info: reporter initialized
    2022-01-08T13:21:52.465Z - info: Logging in user admin
    2022-01-08T13:21:53.016Z - debug: OData query on templates
    2022-01-08T13:21:53.019Z - debug: OData query on folders
    2022-01-08T13:21:53.023Z - debug: OData query on components
    2022-01-08T13:21:53.025Z - debug: OData query on data
    2022-01-08T13:21:53.028Z - debug: OData query on tags
    2022-01-08T13:21:53.032Z - debug: OData query on assets
    2022-01-08T13:21:53.045Z - debug: OData query on scripts
    2022-01-08T13:21:53.047Z - debug: OData query on users
    2022-01-08T13:21:53.049Z - debug: OData query on usersGroups
    2022-01-08T13:21:53.052Z - debug: OData query on schedules
    2022-01-08T13:21:53.066Z - debug: OData query on settings
    2022-01-08T13:21:53.146Z - debug: OData query on templates
    2022-01-08T13:21:53.167Z - debug: OData query on profiles
    2022-01-08T13:21:53.201Z - debug: OData query on monitoring
    2022-01-08T13:22:47.210Z - warn: unable to persist monitoring info, but no need to worry, we will retry, details:error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    2022-01-08T13:23:47.205Z - warn: unable to persist monitoring info, but no need to worry, we will retry, details:error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    2022-01-08T13:24:47.204Z - warn: unable to persist monitoring info, but no need to worry, we will retry, details:error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    2022-01-08T13:25:47.206Z - warn: unable to persist monitoring info, but no need to worry, we will retry, details:error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    2022-01-08T13:26:47.206Z - warn: unable to persist monitoring info, but no need to worry, we will retry, details:error: column "inheritedReadPermissions" of relation "jsreport_MonitoringType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    

    Any ideas? Is this just a bug?



  • I also tried importing a folder to jsreport 3.2 that I exported from jsreport 2.11
    But I received another similar "inheritedReadPermissions" error but from a different database table.

    Any ideas why the postgre DB is missing these "inheritedReadPermissions" columns?

    Import failed: Unable to insert an entity (folders) "/TestFolder" during the import: error: column "inheritedReadPermissions" of relation "jsreport_FolderType" does not exist Error: Import failed: Unable to insert an entity (folders) "/TestFolder" during the import: error: column "inheritedReadPermissions" of relation "jsreport_FolderType" does not exist
        at Parser.parseErrorMessage (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:287:98)
        at Parser.handlePacket (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:126:29)
        at Parser.parse (C:\Projects\jsreport3\node_modules\pg-protocol\dist\parser.js:39:38)
        at Socket.<anonymous> (C:\Projects\jsreport3\node_modules\pg-protocol\dist\index.js:11:42)
        at Socket.emit (node:events:390:28)
        at addChunk (node:internal/streams/readable:315:12)
        at readableAddChunk (node:internal/streams/readable:289:9)
        at Socket.Readable.push (node:internal/streams/readable:228:10)
        at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
    From previous event:
        at I.H [as _captureStackTrace] (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:8:197199)
        at I._resolveFromExecutor (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:8:227559)
        at new I (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:8:220636)
        at Object.d.forEach.h.<computed> [as post] (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:3:758186)
        at Object.b.methods.forEach.n.API.<computed> [as post] (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:402:34253)
        at ImportModal._callee2$ (http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:3182:53)
        at m (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:318:152940)
        at Generator._invoke (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:318:152693)
        at Generator.forEach.e.<computed> [as next] (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:318:153120)
        at step (http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:2923:191)
        at http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:2923:437
        at new Promise (<anonymous>)
        at ImportModal.<anonymous> (http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:2923:99)
        at ImportModal._import (http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:3229:22)
        at onClick (http://localhost:5488/studio/assets/studio-extensions.client.7030b650bf29c89b7ddd.js:3476:39)
        at Object.a (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:458)
        at f (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:601)
        at http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:747
        at _ (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:833)
        at st (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:16338)
        at rt (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:16171)
        at at (http://localhost:5488/studio/assets/client.85292b4c92f95f8a8b29.js:334:16527)
    


  • This can happen if you first start jsreport with disabled authentication.
    This causes that SQL tables are created without the inheritedReadPermissions columns.
    If you then change your mind a start jsreport again with enabled authentication, the app can't find these columns and logs the mentioned errors.

    The solution now should be to start jsreport with the final configs and empty database.



  • You're right, creating an empty database with the authentication enabled fixed it.
    Thank you!


Log in to reply
 

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