Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: attempt to write a readonly database , when running quickstart-dev #3900

Open
3 of 5 tasks
rohit-patel-tw opened this issue Apr 30, 2024 · 0 comments
Open
3 of 5 tasks
Labels
bug Something is not working.

Comments

@rohit-patel-tw
Copy link

rohit-patel-tw commented Apr 30, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

I am trying to build dev docker build of kratos with help of make quickstart-dev. But getting belwo error:

Error: error executing migrations/sql/20231108111100000000_credential_types_passkey.up.sql, sql: INSERT INTO identity_credential_types (id, name)
kratos-migrate-1              | SELECT '8d0ca544-9bf6-45d3-bd75-0bbb3aeba3c7', 'passkey'
kratos-migrate-1              | WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'passkey');: attempt to write a readonly database

Reproducing the bug

  1. checkout master (latest commit 3ecdf2b)
  2. make quickstart-dev

Relevant log output

kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=Migration has already been applied, skipping. audience=application migration_file=migrations/sql/20230818000000000001_verification_add_oauth2_login_challenge_identity_id.up.sql migration_name=verification_add_oauth2_login_challenge_identity_id service_name=Ory Kratos service_version= version=20230818000000000001
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=Migration has already been applied, skipping. audience=application migration_file=migrations/sql/20230823000000000001_verification_add_oauth2_login_challenge_params.sqlite.up.sql migration_name=verification_add_oauth2_login_challenge_params service_name=Ory Kratos service_version= version=20230823000000000001
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=Migration has already been applied, skipping. audience=application migration_file=migrations/sql/20230907085000000000_add_organization_id.up.sql migration_name=add_organization_id service_name=Ory Kratos service_version= version=20230907085000000000
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=Migration has already been applied, skipping. audience=application migration_file=migrations/sql/20230920171028000000_identity_search_index.up.sql migration_name=identity_search_index service_name=Ory Kratos service_version= version=20230920171028000000
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=Migration has not been applied but it might be a legacy migration, investigating. audience=application migration_file=migrations/sql/20231108111100000000_credential_types_passkey.up.sql migration_name=credential_types_passkey service_name=Ory Kratos service_version= version=20231108111100000000
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=info msg=Migration has not yet been applied, running migration. audience=application migration_file=migrations/sql/20231108111100000000_credential_types_passkey.up.sql migration_name=credential_types_passkey service_name=Ory Kratos service_version= version=20231108111100000000
kratos-migrate-1              | time=2024-04-30T06:29:35Z level=debug msg=0.0360 seconds audience=application service_name=Ory Kratos service_version=
kratos-migrate-1              | Error: error executing migrations/sql/20231108111100000000_credential_types_passkey.up.sql, sql: INSERT INTO identity_credential_types (id, name)
kratos-migrate-1              | SELECT '8d0ca544-9bf6-45d3-bd75-0bbb3aeba3c7', 'passkey'
kratos-migrate-1              | WHERE NOT EXISTS ( SELECT * FROM identity_credential_types WHERE name = 'passkey');: attempt to write a readonly database

OR

Reproducing the bug

  1. checkout v1.1.0 (commit f47675b)
  2. make docker
  3. docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-latest.yml $(QUICKSTART_OPTIONS) up --build --force-recreate

Relevant log output

kratos-1                      | time=2024-04-30T06:44:24Z level=error msg=Failed to create error container. func=github.com/ory/kratos/selfservice/errorx.(*Manager).Forward file=/go/src/github.com/ory/kratos/selfservice/errorx/manager.go:67 audience=application error=map[message:sqlite create: named insert: attempt to write a readonly database stack_trace:
kratos-1                      | github.com/ory/x/sqlcon.handleSqlite
kratos-1                      |         /go/pkg/mod/github.com/ory/x@v0.0.614/sqlcon/error_sqlite.go:36
kratos-1                      | github.com/ory/x/sqlcon.HandleError
kratos-1                      |         /go/pkg/mod/github.com/ory/x@v0.0.614/sqlcon/error.go:92
kratos-1                      | github.com/ory/kratos/persistence/sql.(*Persister).CreateErrorContainer
kratos-1                      |         /go/src/github.com/ory/kratos/persistence/sql/persister_errorx.go:45
kratos-1                      | github.com/ory/kratos/selfservice/errorx.(*Manager).Create
kratos-1                      |         /go/src/github.com/ory/kratos/selfservice/errorx/manager.go:46
kratos-1                      | github.com/ory/kratos/selfservice/errorx.(*Manager).Forward
kratos-1                      |         /go/src/github.com/ory/kratos/selfservice/errorx/manager.go:64
kratos-1                      | github.com/ory/kratos/selfservice/flow/login.(*Handler).createBrowserLoginFlow
kratos-1                      |         /go/src/github.com/ory/kratos/selfservice/flow/login/handler.go:522
kratos-1                      | github.com/ory/kratos/x.(*RouterPublic).GET.NoCacheHandle.func1
kratos-1                      |         /go/src/github.com/ory/kratos/x/nocache.go:21
kratos-1                      | github.com/ory/kratos/x.(*RouterPublic).Handle.NoCacheHandle.func1
kratos-1                      |         /go/src/github.com/ory/kratos/x/nocache.go:21
kratos-1                      | github.com/julienschmidt/httprouter.(*Router).ServeHTTP
kratos-1                      |         /go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387
kratos-1                      | github.com/ory/nosurf.(*CSRFHandler).handleSuccess
kratos-1                      |         /go/pkg/mod/github.com/ory/nosurf@v1.2.7/handler.go:234

Relevant configuration

No response

Version

latest

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

None

Additional Context

No response

@rohit-patel-tw rohit-patel-tw added the bug Something is not working. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant