Feature(s) impacted
Forest admin dashboard not able to connect to the ssl database, we use typeorm for database connection
Observed behavior
Forest admin cannot connect to the ssl enabled database
Expected behavior
Be able to view the forest admin dashboard with the database tables
Failure Logs
Context
- Project name: Spottr
- Team name: Spottr
- Environment name: Spottr
- Agent type & version:
- Recent changes made on your end if any: …
Hi @ayorcodes
Is this a new project?
Where does this error comes from? your agent starting, or the forest CLI?
Which agent are you using?
Did you use the stable agent (forest-express-sequelize
) or the new version (agent-nodejs@beta
) tjat we’re currently rolling out?
the error comes from here
.addDataSource(createSqlDataSource(AppConstants.TYPEORM_URL))
// Replace myNestApp
by your NestJS application
.mountOnNestJs(app)
.start();
i am running nestjs node
these are the packages i am using
“@forestadmin/agent”: “^1.0.0-beta.43”,
“@forestadmin/datasource-sql”: “^1.0.0-beta.40”,
Can you try appending ?ssl=true
to your database connection URI?
createSqlDataSource(`${AppConstants.TYPEORM_URL}?ssl=true`)
If your database is using a self-signed certificate (common in development), you may want to use
createSqlDataSource(`${AppConstants.TYPEORM_URL}?ssl=true&sslmode=no-verify`)
the second options works!!! thanks
now there is a new error
i might have figured it out, will update in a few hours
Now i get cors error on the dashbaord
can you copy as curl
the failing request and run it in a terminal to get the actual error? (simply open in a new tab if its a GET request)
your browser is hiding the response because the errors does not contains cors headerss
i’ve gotten it to work,
i changed
app.enableCors();initialiseForestAdmin(app);
to
initialiseForestAdmin(app);app.enableCors();