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

All entries disappeared on iPhone Ente Auth #4667

Open
agape-apps opened this issue Jan 11, 2025 · 2 comments
Open

All entries disappeared on iPhone Ente Auth #4667

agape-apps opened this issue Jan 11, 2025 · 2 comments
Labels
- auth Relates to Ente Auth --mobile Platform is mobile

Comments

@agape-apps
Copy link

agape-apps commented Jan 11, 2025

Description

Yesterday I backed up my data locally on my iPhone and all entries were visible. Today I opened the app on iOS. I was logged in to Ente Auth with my account, but I was greeted by: "Setup your first account..."

All my 25 or so entries had disappeared from the iOS app. Entries are synced via Ente Auth servers and were still visible in the Web app and on Android when checking.

Force-closing and restarting the app did not restore my entries. I considered re-installing, but then tried logging out and re-logging in. This seems to have restored access to my entries for now.

Having entries suddenly inaccessible has never happened to me in 2 years of using OTP Auth and Aegis. Now this happens after only a few weeks of using Ente Auth.

How can this be prevented in the future?


In the logs I found the following, which seems to coincide with the time of the disappeared entires:

[UserService] [FINEST] [2025-01-11 14:08:11.654329] Start deriving key
 [UserService] [FINEST] [2025-01-11 14:08:14.272648] keyDerivation done, derive LoginKey
 [UserService] [FINEST] [2025-01-11 14:08:14.273055] longinKey derivation done
 [Configuration] [INFO] [2025-01-11 14:08:15.841635] Start decryptAndSaveSecrets
 [Configuration] [INFO] [2025-01-11 14:08:15.841764] user-key done
 [Configuration] [INFO] [2025-01-11 14:08:15.842265] master-key done
 [Configuration] [INFO] [2025-01-11 14:08:15.858339] secret-key done
 [Configuration] [INFO] [2025-01-11 14:08:15.862596] appToken done
 [AuthenticatorService] [INFO] [2025-01-11 14:08:15.863516] Sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:15.863558] Initiating remote to local sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:15.863575] Current sync is 0
 [HomePage] [INFO] [2025-01-11 14:08:15.871205] No initial link received.
 [HomePage] [INFO] [2025-01-11 14:08:15.871274] No initial link received.
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.456699] 31 entries fetched from remote
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.456952] 2 entries deleted
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.473405] Setting synctime to 1736164778161637
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.473470] remote fetch completed
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.473486] Initiating local to remote sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.474261] 0 entries to be updated at remote
 [AuthenticatorService] [INFO] [2025-01-11 14:08:16.474295] local push completed
 [AuthenticatorService] [SEVERE] [2025-01-11 14:08:16.888964] Failed to getOrCreateAuthDataKey
⤷ type: PlatformException
⤷ error: PlatformException(Unexpected security result code, Code: -25299, Message: The specified item already exists in the keychain., -25299, null)
⤷ trace: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      FlutterSecureStorage.write (package:flutter_secure_storage/flutter_secure_storage.dart:114)
<asynchronous suspension>
#3      Configuration.setAuthSecretKey (package:ente_auth/core/configuration.dart:414)
<asynchronous suspension>
#4      AuthenticatorService.getOrCreateAuthDataKey (package:ente_auth/services/authenticator_service.dart:270)
<asynchronous suspension>
#5      AuthenticatorService.getEntities (package:ente_auth/services/authenticator_service.dart:74)
<asynchronous suspension>
#6      CodeStore.getAllCodes (package:ente_auth/store/code_store.dart:90)
<asynchronous suspension>
#7      _HomePageState._loadCodes.<anonymous closure> (package:ente_auth/ui/home_page.dart:150)
<asynchronous suspension>

 [HomePage] [SEVERE] [2025-01-11 14:08:16.889329] Error while loading codes
⤷ type: PlatformException
⤷ error: PlatformException(Unexpected security result code, Code: -25299, Message: The specified item already exists in the keychain., -25299, null)
⤷ trace: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      FlutterSecureStorage.write (package:flutter_secure_storage/flutter_secure_storage.dart:114)
<asynchronous suspension>
#3      Configuration.setAuthSecretKey (package:ente_auth/core/configuration.dart:414)
<asynchronous suspension>
#4      AuthenticatorService.getOrCreateAuthDataKey (package:ente_auth/services/authenticator_service.dart:270)
<asynchronous suspension>
#5      AuthenticatorService.getEntities (package:ente_auth/services/authenticator_service.dart:74)
<asynchronous suspension>
#6      CodeStore.getAllCodes (package:ente_auth/store/code_store.dart:90)
<asynchronous suspension>
#7      _HomePageState._loadCodes.<anonymous closure> (package:ente_auth/ui/home_page.dart:150)
<asynchronous suspension>

 [AuthUtil] [INFO] [2025-01-11 14:08:38.049758] Requesting authentication
 [AuthenticatorService] [INFO] [2025-01-11 14:08:39.694872] Sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:39.694968] Initiating remote to local sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:39.694981] Current sync is 1736164778161637
 [AuthenticatorService] [INFO] [2025-01-11 14:08:40.108530] 0 entries fetched from remote
 [AuthenticatorService] [INFO] [2025-01-11 14:08:40.108683] remote fetch completed
 [AuthenticatorService] [INFO] [2025-01-11 14:08:40.108722] Initiating local to remote sync
 [AuthenticatorService] [INFO] [2025-01-11 14:08:40.110425] 0 entries to be updated at remote
 [AuthenticatorService] [INFO] [2025-01-11 14:08:40.110488] local push completed
 [AuthUtil] [INFO] [2025-01-11 14:09:04.224108] Requesting authentication
 [AuthenticatorService] [INFO] [2025-01-11 14:09:05.981328] Sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:05.981416] Initiating remote to local sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:05.981429] Current sync is 1736164778161637
 [AuthenticatorService] [INFO] [2025-01-11 14:09:06.626634] 0 entries fetched from remote
 [AuthenticatorService] [INFO] [2025-01-11 14:09:06.626724] remote fetch completed
 [AuthenticatorService] [INFO] [2025-01-11 14:09:06.626740] Initiating local to remote sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:06.627987] 0 entries to be updated at remote
 [AuthenticatorService] [INFO] [2025-01-11 14:09:06.628048] local push completed
 [UserService] [WARNING] [2025-01-11 14:09:57.139213] Failed to fetch
⤷ type: DioException
⤷ error: DioException [connection timeout]: The request connection took longer than 0:00:15.000000 and it was aborted. To get rid of this exception, try raising the RequestOptions.connectTimeout above the duration of 0:00:15.000000 or improve the response time of the server.
 [AuthenticatorService] [INFO] [2025-01-11 14:09:57.421832] Sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:57.422] Initiating remote to local sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:57.422029] Current sync is 1736164778161637
 [AuthenticatorService] [INFO] [2025-01-11 14:09:58.029863] 0 entries fetched from remote
 [AuthenticatorService] [INFO] [2025-01-11 14:09:58.029981] remote fetch completed
 [AuthenticatorService] [INFO] [2025-01-11 14:09:58.030005] Initiating local to remote sync
 [AuthenticatorService] [INFO] [2025-01-11 14:09:58.031817] 0 entries to be updated at remote
 [AuthenticatorService] [INFO] [2025-01-11 14:09:58.031886] local push completed

Version

4.2.3

What product are you using?

Ente Auth

What platform are you using?

Mobile - iOS

@ua741
Copy link
Member

ua741 commented Jan 11, 2025

In the case of the Ente app, the encryption key stored in secure storage is not included in iCloud or device backups.
This means that restoring or transferring an iPhone will always require a re-login. Ideally, the app should gracefully handle this error by displaying a dialog prompting the user to log in again.

@ua741 ua741 added - auth Relates to Ente Auth --mobile Platform is mobile and removed triage labels Jan 11, 2025
@agape-apps
Copy link
Author

In the case of the Ente app, the encryption key stored in secure storage is not included in iCloud or device backups. This means that restoring or transferring an iPhone will always require a re-login. Ideally, the app should gracefully handle this error by displaying a dialog prompting the user to log in again.

Just to clarify my bug report: The bug occurred before I logged out. I was still logged in when all of my entries had disappeared. (Logging out and re-logging in somehow restored my entries)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- auth Relates to Ente Auth --mobile Platform is mobile
Projects
None yet
Development

No branches or pull requests

2 participants