<@U04UQ68083H> q: is cockroachdb supported in ory ...
# ory-copilot
g
@chilly-king-10285 q: is cockroachdb supported in ory hydra?
b
A message from kapa.ai
Yes, CockroachDB is supported in Ory Hydra. According to the knowledge sources, Ory Hydra supports CockroachDB as a storage backend. Here are the key points: 1. CockroachDB is listed as one of the supported databases for Ory Hydra, along with PostgreSQL, MySQL, and SQLite. 2. To use CockroachDB with Ory Hydra, you need to configure the Data Source Name (DSN) with the
cockroach://
prefix. For example:
Copy code
DSN=<cockroach://user:password@host:123/database>
3. Additional DSN parameters are supported for CockroachDB, such as
sslmode
,
application_name
,
sslcert
,
sslkey
, and
sslrootcert
. 4. When using CockroachDB, you need to run database migrations using the
hydra migrate sql
command before starting the Ory Hydra server. 5. CockroachDB Enterprise is specifically mentioned as supported for Ory Hydra Enterprise builds, offering features like multi-region failover, database sharding, and zero-downtime migrations. For more detailed information on configuring CockroachDB with Ory Hydra, you can refer to the [Ory documentation on database setup and configuration](https://www.ory.sh/docs/hydra/self-hosted/dependencies-environment) and [CockroachDB configuration](https://www.ory.sh/docs/self-hosted/deployment#cockroachdb).
g
I'm following some tutorial but now get stuck on this error with the selfservice-ui app @chilly-king-10285
Copy code
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Socket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle
    at JSON.stringify (<anonymous>)
    at UserErrorCard$1 (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:104:36900)
    at _t (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:3633)
    at Nl (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:4508)
    at Ha (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:7515)
    at Wa (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:9191)
    at Rr (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:8960)
    at Ro (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:7183)
    at Ha (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:7943)
    at Wa (/usr/src/app/node_modules/@ory/elements-markup/dist/index.umd.js:169:9191)
b
A message from kapa.ai
Based on the error message you've provided, it appears you're encountering an issue with the Ory Elements UI library, specifically in the selfservice-ui application. This error is related to a circular structure being converted to JSON, which is not directly addressed in the provided knowledge sources. However, I can offer some general guidance based on the information available. 1. First, it's important to note that this error is occurring in the
@ory/elements-markup
package, which is part of the Ory Elements library used for building custom UIs for Ory services. 2. The error suggests that there's a circular reference in an object being passed to a component, likely the
UserErrorCard
component. To troubleshoot this issue, you could try the following steps: 1. Make sure you're using the latest version of the Ory Elements library. You can update it by running:
Copy code
npm update @ory/elements @ory/elements-markup
2. Check your implementation to ensure you're not passing any circular structures to the Ory Elements components. This might involve reviewing how you're handling and passing error objects or responses from Ory APIs. 3. If you're using a custom domain with Ory Network, ensure that your configuration is correct. As mentioned in the [Ory documentation on troubleshooting](https://www.ory.sh/docs/troubleshooting), there can be issues with routing when using custom domains with certain Ory clients. 4. Consider using the
@ory/client
package instead of
@ory/kratos-client
if you're not already doing so. According to an Ory team member's comment in a GitHub issue,
@ory/kratos-client
can sometimes have issues with Ory Cloud and is expected to be deprecated. If the problem persists after trying these steps, you might want to: 1. Check the [Ory Elements repository](https://github.com/ory/elements/) for any open issues related to this error. 2. Consider opening a new issue in the Ory Elements repository with details about your setup and the steps to reproduce the error. Remember, without more context about your specific implementation and setup, it's challenging to provide a definitive solution. If you need further assistance, you might want to share more details about your project setup and the steps you're following in the tutorial.