Issue Description
When running die migration, the ACME provider couldn’t be migrated.
I worked around this issue with removing the provider association for all domains.
Migration worked but adding the provider back or creating a new one to add to a domain returns an error.
Expected Behavior
I can successfully add the newly created or migrated ACME provider to a domain.
Actual Behavior
When saving the domain with the old migrated or a newly created ACME provider this error is shown in the UI:
“This item references another item that does not exist.”
Reproduction Steps
- Migrate a v0.16.27 instance with configured ACME setup.
Relevant Log Output
Ui error:
This item references another item that does not exist.
Trace Logs:
2026-10-26T20:43:49Z TRACE HTTP request body (http.request-body) listenerId = “https”, localPort = 443, remoteIp = , remotePort = 48968, headers = [[“host”, “”], [“user-agent”, “Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0”], [“accept”, “/”], [“accept-language”, “en-GB,en;q=0.9”], [“accept-encoding”, “gzip, deflate, br, zstd”], [“referer”, “https:///admin/Management/x:Domain/d”], [“authorization”, “”], [“content-type”, “application/json”], [“content-length”, “401”], [“origin”, “https://”], [“sec-gpc”, “1”], [“connection”, “keep-alive”], [“cookie”, “”], [“sec-fetch-dest”, “empty”], [“sec-fetch-mode”, “cors”], [“sec-fetch-site”, “same-origin”], [“priority”, “u=4”]], contents = “{"using":["urn:ietf:params:jmap:core","urn:stalwart:jmap","urn:ietf:params:jmap:blob","urn:ietf:params:jmap:mail","urn:ietf:params:jmap:calendars","urn:ietf:params:jmap:contacts","urn:ietf:params:jmap:principals","urn:ietf:params:jmap:sieve","urn:ietf:params:jmap:vacationresponse"],"methodCalls":[["x:AcmeProvider/get",{"accountId":"b","ids":[""],"properties":["id","description"]},"0"]]}”, size = 401
2026-10-26T20:43:49Z DEBUG JMAP method call (jmap.method-call) listenerId = “https”, localPort = 443, remoteIp = , remotePort = 48968, command = “x:AcmeProvider/get”, accountId = 1, elapsed = 0ms
2026-10-26T20:43:49Z TRACE HTTP response body (http.response-body) listenerId = “https”, localPort = 443, remoteIp = , remotePort = 48968, contents = “{"methodResponses":[["x:AcmeProvider/get",{"accountId":"b","list":[{"description":"Let’s Encrypt Live","id":""}],"notFound":},"0"]],"sessionState":""}”, code = 200, size = 172
Migration logs when running concurrently, but another issue:
2026-10-26T19:25:11.452840Z INFO migrate::commands::run: run state=/var/lib/stalwart-migrate/state.sqlite source=/etc/stalwart/config-0.16.json target=/etc/stalwart/config.json categories=settings,principals,mail,calendars,contacts,files,sieve,identities,push_subscriptions,spam_samples,reports,archive,spam_model,queue,tasks,telemetry blob_mode=Copy edition=“enterprise” concurrency=8
2026-10-26T19:25:12.484944Z INFO migrate::orchestrator::account: account pass started accounts=2 removed=0
2026-10-26T19:25:26.455363Z INFO progress: progress run_id=3 objects_written=0 emails_written=0 bytes_written=0 objects_skipped=0 objects_deleted=0 log_rows=0 blobs_copied=0 blob_bytes=0 registry_written=0 registry_dropped=0 registry_deleted=0 accounts_full=0 accounts_delta=0 accounts_unchanged=0 accounts_failed=0 accounts_wiped=0 accounts_removed=0 global_records=0 global_deleted=0 issues=1 errors=0
2026-10-26T19:25:41.454879Z INFO progress: progress run_id=3 objects_written=0 emails_written=0 bytes_written=0 objects_skipped=0 objects_deleted=0 log_rows=0 blobs_copied=0 blob_bytes=0 registry_written=0 registry_dropped=0 registry_deleted=0 accounts_full=0 accounts_delta=0 accounts_unchanged=0 accounts_failed=0 accounts_wiped=0 accounts_removed=0 global_records=0 global_deleted=0 issues=1 errors=0
2026-10-26T19:25:46.205636Z ERROR migrate::orchestrator::account: account failed account_id=2 error=transient error: Authentication error (auth.error): details = Account not found., accountId = 2, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
2026-10-26T19:25:51.881325Z ERROR migrate::orchestrator::account: account failed account_id=1 error=transient error: Authentication error (auth.error): details = Account not found., accountId = 1, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
2026-10-26T19:25:51.889029Z ERROR migrate::orchestrator: run finished with failed accounts failed_accounts=2
2026-10-26T19:25:51.891288Z INFO migrate::orchestrator: run finished run_id=3 status=failed stats={“accounts_delta”:0,“accounts_failed”:2,“accounts_full”:0,“accounts_removed”:0,“accounts_unchanged”:0,“accounts_wiped”:0,“blob_bytes”:0,“blobs_copied”:0,“bytes_written”:0,“emails_written”:0,“errors”:2,“global_deleted”:0,“global_records”:0,“issues”:3,“log_rows”:0,“objects_deleted”:0,“objects_skipped”:0,“objects_written”:0,“registry_deleted”:0,“registry_dropped”:0,“registry_written”:0}
run 3: failed ({“accounts_delta”:0,“accounts_failed”:2,“accounts_full”:0,“accounts_removed”:0,“accounts_unchanged”:0,“accounts_wiped”:0,“blob_bytes”:0,“blobs_copied”:0,“bytes_written”:0,“emails_written”:0,“errors”:2,“global_deleted”:0,“global_records”:0,“issues”:3,“log_rows”:0,“objects_deleted”:0,“objects_skipped”:0,“objects_written”:0,“registry_deleted”:0,“registry_dropped”:0,“registry_written”:0})
State database: /var/lib/stalwart-migrate/state.sqlite
tool_version 1.0.0
edition enterprise
source_def_hash 3f4655519a9b20ff8f7a8ac5488987b8
target_def_hash 79d2ab5360c06ea5f656e4f1a3b59dd8
target_schema_version 7
categories settings,principals,mail,calendars,contacts,files,sieve,identities,push_subscriptions,spam_samples,reports,archive,spam_model,queue,tasks,telemetry
created_at 2026-10-26T19:18:45Z
source_store directory /opt/stalwart/data
target_claim 64aa033ce306b802d6b58dc6ff961f31
claim_generation 20d46fe7cad9c82927398267e6c32d01
claim_generation_pending 20d46fe7cad9c82927398267e6c32d01
final_done not done
Accounts: 2
error 2
Accounts in error:
1 attempts 3 transient error: Authentication error (auth.error): details = Account not found., accountId = 1, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
2 attempts 3 transient error: Authentication error (auth.error): details = Account not found., accountId = 2, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
Recent runs:
#3 incremental failed started 2026-10-26T19:25:11Z took 40s
accounts_failed=2, errors=2, issues=3
#2 incremental failed started 2026-10-26T19:22:54Z took 38s
accounts_failed=2, errors=2, issues=3
#1 incremental failed started 2026-10-26T19:18:45Z took 44s
accounts_failed=2, blob_bytes=4559409, blobs_copied=72, errors=17, global_records=34148, issues=93, registry_dropped=12, registry_written=4256
Reports in the latest run:
error failed 2
warning dropped 1
Reports in all runs:
error failed 20
error skipped 1
info changed 15
warning dropped 63
run severity category account object id message
2 error failed 1 - - transient error: Authentication error (auth.error): details = Account not found., accountId = 1, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
2 error failed 2 - - transient error: Authentication error (auth.error): details = Account not found., accountId = 2, causedBy = vendor/v1/crates/common/src/cache/principals.rs:381
2 rows
Migration logs:
info: x:AcmeProvider/iq23htewaaqa description: acme_description: v0.16 computed the description from the directory URL and the account; v1 stores it
warning: x:AcmeProvider/iq23htewaaqa maxRetries: dropped (no equivalent in the target version), was 10
1 info changed - AcmeProvider 307264283016692224 info: x:AcmeProvider/iq23htewaaqa description: acme_description: v0.16 computed t
he description from the directory URL and the account; v1 stores it
1 warning dropped - AcmeProvider 307264283016692224 warning: x:AcmeProvider/iq23htewaaqa maxRetries: dropped (no equivalent in the ta
rget version), was 10
1 error failed - x:Domain 1 rejected by v1: Invalid foreign key: AcmeProvider with id iq23htewaaqa
1 error failed - x:Domain 2 rejected by v1: Invalid foreign key: AcmeProvider with id iq23htewaaqa
1 error failed - x:Domain 3 rejected by v1: Invalid foreign key: AcmeProvider with id iq23htewaaqa
[root@mail opt]# sudo grep -i iq23htewaaqa $STATE/logs/run-1793042325-63450.log | head
Stalwart Version
v1.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
Additional Context
Sorry if I might mixed up some logs. I did troubleshoot quite a bit and haven’t sorted the saved output.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on