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

Crash : cannot create crypto #7699

Open
NicolasBuquet opened this issue Oct 12, 2023 · 1 comment
Open

Crash : cannot create crypto #7699

NicolasBuquet opened this issue Oct 12, 2023 · 1 comment
Labels
O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@NicolasBuquet
Copy link

NicolasBuquet commented Oct 12, 2023

Steps to reproduce

Working on Tchap iOS Dev team.

Element 1.11.2 merged.

Sometimes, when running the app from Xcode directly on my device, I got this crash :

2023-10-12 10:27:26.923147+0200 Tchap[66397:6579610] [MXCryptoV2Factory] deprecateLegacyStoreIfNecessary(credentials:updateProgress:): Legacy crypto store does not exist
2023-10-12 10:27:27.150657+0200 Tchap[66397:6579358] [MXCryptoSDK] Starting logs
2023-10-12 10:27:27.160960+0200 Tchap[66397:6579358] [MXCryptoMachine] createMachine(userId:deviceId:log:): Opening crypto store at /private/var/mobile/Containers/Shared/AppGroup/E1CE41B9-DB85-496D-B85E-706B787AF3DA/MXCryptoStore/@<my-matrix-id-removed-from-log-by-myself>/matrix-sdk-crypto.sqlite3
2023-10-12 10:27:27.166001+0200 Tchap[66397:6579358] [MXCryptoSDK] DEBUG matrix_sdk_crypto_ffi::machine: new
2023-10-12 10:27:27.183901+0200 Tchap[66397:6579358] [MXCryptoSDK] DEBUG matrix_sdk_sqlite::crypto_store: Upgrading database version=4 new_version=8
2023-10-12 10:27:27.195206+0200 Tchap[66397:6579624] 🚨 [MXCryptoV2Factory] buildCrypto(session:migrationProgress:success:failure:): Cannot create crypto OpenStore(message: "Failed to open the store")
MatrixSDK/MXLog.swift:251: Fatal error: Cannot create crypto
2023-10-12 10:27:27.196813+0200 Tchap[66397:6579624] MatrixSDK/MXLog.swift:251: Fatal error: Cannot create crypto

It doesn't happen on Simulator. There's no DB upgrade in the log on simulator.

On my device, I install over an old version. That's why the database upgrade is fired I think.
But I suspect the DB upgrade could be the source of the problem.

Outcome

What did you expect?

The app to launch.

What happened instead?

The app crash in DEV mode (normal) because of an assert about "Cannot create crypto"

Your phone model

iPhone 12 mini

Operating system version

16.6.1

Application version

Element 1.11.2

Homeserver

No response

Will you send logs?

No

@NicolasBuquet NicolasBuquet added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Oct 12, 2023
@Velin92 Velin92 added S-Critical Prevents work, causes data loss and/or has no workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Oct 16, 2023
@imperiacorp
Copy link

The same issue. Who knows how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
Status: Triaged
Status: Important Issues & Topics (P1)
Development

No branches or pull requests

3 participants