Error trying to create new users



  • Hello,

    I'm currently trying to add new users/groups to jsReport to better manage access to templates.
    I now created a user api that is only used for special api calls. api is only set to read only for everything.

    Now there are 2 errors occurring when I try to login as this user

    error: Error during processing request at https://localhost:5488/api/settings, details: TypeError: Cannot read properties of undefined (reading 'complexType')
        at eq (/app/node_modules/@jsreport/odata-to-sql/lib/filter.js:34:22)
        at filterObject (/app/node_modules/@jsreport/odata-to-sql/lib/filter.js:109:44)
        at module.exports (/app/node_modules/@jsreport/odata-to-sql/lib/filter.js:121:22)
        at module.exports (/app/node_modules/@jsreport/odata-to-sql/lib/query.js:66:11)
        at Object.query (/app/node_modules/@jsreport/odata-to-sql/lib/transformer.js:46:14)
        at Cursor.toArray (/app/node_modules/@jsreport/sql-store/lib/sqlProvider.js:22:29)
        at replay (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:53:21)
        at /app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:60:18
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async resolveIsAdmin (/app/node_modules/@jsreport/jsreport-authentication/lib/main.js:630:38)
    

    And

    TypeError: Cannot read properties of null (reading '_id')
        at /app/node_modules/@jsreport/jsreport-authentication/lib/main.js:238:18
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    

    Is there anything I'm missing?
    Thanks for your help.



  • So your api user looks like this right? Did you create it using jsreport studio?
    0_1739909529763_upload-51f4fd4e-444d-431b-a3c9-4078bb8b787f

    Please also share..
    what jsreport version do you use?
    what sql store driver and what version do you use?



  • Hey, sry for the late reply,

    Yes the user was created using the Studio and exactly like this.
    We are using Version 4.5.0.
    With Postgress v16.



  • I just looked at the changelog
    With Version 4.6.0 there is a bugfix concerning this scenario, I will test that.



  • Ok yeah that bugfix did it, luckily we can upgrade to 4.7.0.


Log in to reply
 

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