Ok yeah that bugfix did it, luckily we can upgrade to 4.7.0.
Posts made by SimonHenz97
-
RE: Error trying to create new users
-
RE: Error trying to create new users
I just looked at the changelog
With Version 4.6.0 there is a bugfix concerning this scenario, I will test that. -
RE: Error trying to create new users
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. -
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 userapi
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. -
RE: Error trying to use custom certificates
Ok, I managed to find a solution
ports: - ${PORT}:443 volumes: - jsreport:/jsreport - certs:/certs environment: httpsPort: 443 certificate_key: /certs/${SSL_KEY} certificate_cert: /certs/${SSL_CERT}
I needed to specify the certs directory from the root...
And the config path needed a ' _ ' not a ' . ' , I don't know how I made that assumption -
Error trying to use custom certificates
Hello, my Team needs to serve jsReport via https (no we are not allowed to use a reverse proxy...)
so in order to test https I created a test certificate and supplied them using docker-composeports: - ${PORT}:443 volumes: - jsreport:/jsreport - certs:/certs environment: httpsPort: 443 certificate.key: certs/${SSL_KEY} certificate.cert: certs/${SSL_CERT}
the certifcates are available in the right directory in the container but if I try to run it I get this error
I checked multiple times, there are no typos in the filenames etc.
Any help is appreciated, thx!
-
RE: Trying to fit template inside a letterhead
That is indeed helpful, thanks for the help!
-
Trying to fit template inside a letterhead
https://playground.jsreport.net/w/SimonHenz97/BevfD4vK
Hello, for my current Project I need to add a letterhead to my generated Pages like this.
the thing is I only got a PDF file with the headers and footers already backed in.
I could make screenshots of those parts and create individual parts like that but I still need to make sure they are backed into the right pages.Header A doesn't seem so hard, because I can just add it at the top of the template, but Header B needs to be added after every page break.
My current solution would be to add a huge margin to the template and merge the different parts onto it, but is there a better solution, especially because the page margins need to be different per header.
I also don't know why there is a big margin before the headers in my playground.
Any help is appreciated, thank you!
-
RE: Child Components (slots) with Props
Looks like I found my issue.
Inside the componentWithChildValue context this is not available but @root is which means I need to use @root to send data to the child components since those don't inherit the context.
I made a playground to show exactly what I mean: https://playground.jsreport.net/w/SimonHenz97/j6brgA8X
But my Issue is solved by using @root.
-
Child Components (slots) with Props
Re: The best way to pass children like in React
I'm really looking for a way like this to call children in a different Component.
The only diffence between my use case and the topic above is the fact that I need to call a component with props
Currently the props I give my child don't carry over to the component itself{{#componentWithChildValue "wrapper"}} {{{component "c1" prop="A"}}} {{/componentWithChildValue}}
Something like this doesn't work prop is undefined in the wrapper component
Is there a way to change the function to also carry over the props?
async function componentWithChildValue(name, opts) { const childValue = await jsreport.templatingEngines.waitForAsyncHelper(opts.fn()) return component.call({ ...opts.data, value: childValue }, name, opts) }
-
RE: Error trying to create a postgres connection
Oh wow it works now.
I tried the option with true and false, I didn't expect that not providing the info was a third option, since we are talking about a bool.Thank you 👍
-
Error trying to create a postgres connection
Using the full docker image I tried to use my supabase postgres database as storage for my instance.
version: '3.3' services: jsreport: image: jsreport/jsreport:4.4.0-full container_name: jsreport restart: always ports: - "5488:5488" volumes: - <redacted>:/app/data environment: trustUserCode: "true" store_provider: "postgres" extensions_postgres-store_host: "aws-0-eu-central-1.pooler.supabase.com" extensions_postgres-store_port: 5432 extensions_postgres-store_database: "postgres" extensions_postgres-store_user: "postgres.<redacted>" extensions_postgres-store_password: "<redacted>" extensions_postgres-store_ssl: "false"
But when I try to run the container I get the error
[winston] Unknown logger level: { error: TypeError: Cannot use 'in' operator to search for 'key' in false at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:86:19) at Object.onceWrapper (node:events:632:26) at Socket.emit (node:events:517:28) at Socket.emit (node:domain:489:12) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23), level: 'error', message: "uncaughtException: Cannot use 'in' operator to search for 'key' in false\n" + "TypeError: Cannot use 'in' operator to search for 'key' in false\n" + ' at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:86:19)\n' + ' at Object.onceWrapper (node:events:632:26)\n' + ' at Socket.emit (node:events:517:28)\n' + ' at Socket.emit (node:domain:489:12)\n' + ' at addChunk (node:internal/streams/readable:368:12)\n' + ' at readableAddChunk (node:internal/streams/readable:341:9)\n' + ' at Readable.push (node:internal/streams/readable:278:10)\n' + ' at TCP.onStreamRead (node:internal/stream_base_commons:190:23)', stack: "TypeError: Cannot use 'in' operator to search for 'key' in false\n" + ' at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:86:19)\n' + ' at Object.onceWrapper (node:events:632:26)\n' + ' at Socket.emit (node:events:517:28)\n' + ' at Socket.emit (node:domain:489:12)\n' + ' at addChunk (node:internal/streams/readable:368:12)\n' + ' at readableAddChunk (node:internal/streams/readable:341:9)\n' + ' at Readable.push (node:internal/streams/readable:278:10)\n' + ' at TCP.onStreamRead (node:internal/stream_base_commons:190:23)', exception: true, date: 'Sat Jun 15 2024 14:57:21 GMT+0000 (Coordinated Universal Time)', process: [Object], os: [Object], trace: [Array] } (node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [File]. Use emitter.setMaxListeners() to increase limit (Use `node --trace-warnings ...` to show where the warning was created) (node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [File]. Use emitter.setMaxListeners() to increase limit (node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [File]. Use emitter.setMaxListeners() to increase limit (node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [File]. Use emitter.setMaxListeners() to increase limit
I don't really know what to do with this information.
Is my config scuffed or is this a implmentation error.Please let me know if you need more information.
Thanks everyone