You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatic migration of entries to new version failed. #107
Describe the bug
After installation of new version 2.0.4 automatic migration of my password failed.
"Your items could not be imported. Nothing was lost, and KeyGo will try again the next time you open it."
Application open and it is empty.
To Reproduce
Steps to reproduce the behavior:
Info of migration
Entering password (biometrics was not possible to use)
Information of import error
App doesn't contain any entries.
Expected behavior
I hope that all passwords and login will be visible in new app version.
Environment information (please complete the following information):
Device: [Samsung A56]
OS: [Android 16]
App Version: [2.0.4]
Additional context
Perhaps the issue is that some individual entries contained longer texts? What can I do to help fix this error? Regaining access to my passwords is very important to me…
Unfortunately, I didn’t have any password backup created.
I asked Claude about this problem and received some suggestions. I’m pasting his reply — maybe it will be helpful in some way.
Best regards. Aside from that, thank you for creating such a fantastic app — I really appreciate it.
Suggested fix for the v1 import failure (IllegalArgumentException in IDN.toASCII)
Root cause (as far as I can tell from the stack trace)
The v1 import aborts with v1 import did not finish because java.net.IDN.toASCII throws IllegalArgumentException (The output exceed the max allowed length).
The input was not a domain at all, but a long multi-line text in the URL/website field of one legacy item (a list of numbered backup codes). The importer seems to derive a registrable domain from that field for autofill. As a result, one malformed entry stops the whole import.
Suggested changes
Isolate failures per item. Wrap the conversion of each legacy item in try/catch (or runCatching), so a bad row is skipped and reported instead of aborting everything. The PR description mentions per-row failure isolation, but this exception seems to escape it, possibly because it is thrown in a different stage (domain resolution) than the one being guarded.
Make the domain resolution itself safe, for example:
fun String.toAsciiDomainOrNull(): String? {
val candidate = trim()
// A valid DNS name is at most 253 chars, with labels of at most 63 chars.if (candidate.isEmpty() || candidate.length >253|| candidate.any { it.isWhitespace() }) returnnullreturntry {
IDN.toASCII(candidate)
} catch (_:IllegalArgumentException) {
null
}
}
If the result is null, keep the original text as-is and just skip the autofill domain association for that item.
Do not lose the data. If the field content is not a valid domain, import it unchanged into the note or website field of the new item.
Report skipped items. Add the item to the migration report as a partial failure (e.g. reason INVALID_DOMAIN), so the user can see what was affected.
Add a regression test with a legacy item whose URL field contains a very long, multi-line string, and assert that the import finishes and all other items are imported.
Thank you for reporting this! A fix will be merged as soon as the checks on PR #108 pass, and patch version 2.0.5 will be released to the Google Play Store shortly after.
Important
To ensure your login credentials remain accessible for the migration step in v2.0.5, please do NOT clear your app data or cache. Simply update the app via the Play Store once the new version is live.
I appreciate your patience, and apologies for any inconvenience this may have caused!
@profanek I am happy to announce that a patch has been released and you are now able to update. Once you open the app, you should see the migration steps in and all your logins will be recovered.
@OffRange First, everything works! Thank you! <3 I’m impressed by how quickly you were able to resolve the issue. Great job!
I use your app to safely store licenses for purchased software as well as two‑step authentication codes. In the new version I will put that information into notes instead of domains. Once again, I really appreciate your help.
@OffRange PS Don’t worry, I randomized some letters and digits in all authentication codes that were visible in the comment. Thank you for deleting the previous comment as a safety measure.
Activity
profanek commentedon Sep 29, 2026
I asked Claude about this problem and received some suggestions. I’m pasting his reply — maybe it will be helpful in some way.
Best regards. Aside from that, thank you for creating such a fantastic app — I really appreciate it.
Suggested fix for the v1 import failure (
IllegalArgumentExceptioninIDN.toASCII)Root cause (as far as I can tell from the stack trace)
The v1 import aborts with
v1 import did not finishbecausejava.net.IDN.toASCIIthrowsIllegalArgumentException(The output exceed the max allowed length).The input was not a domain at all, but a long multi-line text in the URL/website field of one legacy item (a list of numbered backup codes). The importer seems to derive a registrable domain from that field for autofill. As a result, one malformed entry stops the whole import.
Suggested changes
Isolate failures per item. Wrap the conversion of each legacy item in
try/catch(orrunCatching), so a bad row is skipped and reported instead of aborting everything. The PR description mentions per-row failure isolation, but this exception seems to escape it, possibly because it is thrown in a different stage (domain resolution) than the one being guarded.Make the domain resolution itself safe, for example:
If the result is
null, keep the original text as-is and just skip the autofill domain association for that item.Do not lose the data. If the field content is not a valid domain, import it unchanged into the note or website field of the new item.
Report skipped items. Add the item to the migration report as a partial failure (e.g. reason
INVALID_DOMAIN), so the user can see what was affected.Add a regression test with a legacy item whose URL field contains a very long, multi-line string, and assert that the import finishes and all other items are imported.
OffRange commentedon Sep 29, 2026
Hey, thanks for the kind words! I am looking into it, hopping to publish an fix asap
OffRange commentedon Sep 29, 2026
Thank you for reporting this! A fix will be merged as soon as the checks on PR #108 pass, and patch version 2.0.5 will be released to the Google Play Store shortly after.
Important
To ensure your login credentials remain accessible for the migration step in v2.0.5, please do NOT clear your app data or cache. Simply update the app via the Play Store once the new version is live.
I appreciate your patience, and apologies for any inconvenience this may have caused!
OffRange commentedon Sep 29, 2026
@profanek I am happy to announce that a patch has been released and you are now able to update. Once you open the app, you should see the migration steps in and all your logins will be recovered.
profanek commentedon Oct 2, 2026
@OffRange First, everything works! Thank you! <3 I’m impressed by how quickly you were able to resolve the issue. Great job!
I use your app to safely store licenses for purchased software as well as two‑step authentication codes. In the new version I will put that information into notes instead of domains. Once again, I really appreciate your help.
profanek commentedon Oct 2, 2026
@OffRange PS Don’t worry, I randomized some letters and digits in all authentication codes that were visible in the comment. Thank you for deleting the previous comment as a safety measure.