Open matmar10 opened 3 months ago
I have got this aswell when setting up a new project. Using all latest versions of packages
@jono-allen Note you can use sslmode=no-verify
in your connection string to ignore SSL verification.
Albeit insecure, it's a quick workaround until support for ca cert verification is supposed by the phase of the application lifecycle that loads the modules. Seems like the migration phase does it fine (since they will run okay).
Hello, I am having exactly the same issue.
I have a medusa docker container deployed in my cluster. The database is being written, because i see the tables, and yet the application crashes as described here, with the same error.
After two days of debugging and coming across this issue, this was fixed by using ?sslmode=disable
in the database connection string.
This was time consuming and doesn't seem like good practice. Is there something wrong with the installation? Does v2 have this issue?
I'm having the same issue, but even locally and when running npx medusa migrations run
, it started happening after I bumped my medusa version form 1.20.0 to 1.20.7, then I had rolled it and it still persists. Tried removing node_modules and clearing pnpm cache, no results
I had the same error after upgrading to 1.20.7 which I resolved by adding a resolution for modules-sdk to my monorepo root package.json:
"resolutions": {
"@medusajs/modules-sdk": "^1.12.11"
}
This also resolved another error I saw at the same time "GraphQLError: Syntax Error: Unexpected
Solution for me (fixed the mentioned error, as well as "GraphQLError: Syntax Error: Unexpected .") and Module x not found in over 1400 places:
Same here!
It started on Ubuntu without errors. With exactly the same setting, but on macos it throws an error. I've been trying to decide all day.
On macOs here, same issue. Haven't been able solve it yet.
I have tried:
On macOs here, same issue. Haven't been able solve it yet.
I have tried:
- Updating all packages to the same as starter template.
- Disabling ssl using connection string
- cleaned node modules.
- Added @medusajs/modules-sdk to resolutions.
- sslmode=no-verify is not working for me, it just creates a new issue.
I solved the error. In the problematic version I used pnpm. Switched to yarn and moved package-lock.json from the starting template repository.
👋 Varme og venlige hilsner 🙂
Bug report
TL;DR:
sslrootcert
option ignored during module bootstrap phase; workaround is to specifysslmode=no-verify
Describe the bug
There is an issue with the module bootstrap phase of startup when connecting to a remote database:
It seems like (maybe) this is due to specifying self-signed and specifying CA root certificate (e.g. Digital Ocean).
Probably the way the modules are bootstrapped they are not passing all the connection string parameters to the underlying postgresql library?
System information
Medusa version (including plugins):
v20.12.0
Database:PostgreSQL 16
(on Digital Ocean) Operating system: Mac OS 12.4 Browser (if relevant): N/ASteps to reproduce the behavior
&sslrootcert=./certs/db-pg-prod.crt
to postgresDATABASE_URL
Expected behavior
Application should bootstrap successfully with valid DB credentials & certificate location.
I.E. if db migrations run successfully, then the application should also bootstrap successfully.
Screenshots
If applicable, add screenshots to help explain your problem
Code snippets
If applicable, add code samples to help explain your problem
Additional context
I have verified: