fix: 2FA Server Key setup — error toast and QR code fails to load on iOS#6941
Draft
Copilot wants to merge 3 commits into
Draft
fix: 2FA Server Key setup — error toast and QR code fails to load on iOS#6941Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/KeeperCommunity/bitcoin-keeper/sessions/0a65596c-2ca6-4e92-a53b-05950ffef0c2 Co-authored-by: Parsh <17980466+Parsh@users.noreply.github.com>
…load (iOS) closes # Agent-Logs-Url: https://github.com/KeeperCommunity/bitcoin-keeper/sessions/0a65596c-2ca6-4e92-a53b-05950ffef0c2 Co-authored-by: Parsh <17980466+Parsh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix 2FA setup for Server Key error toast and QR code issues
fix: 2FA Server Key setup — error toast and QR code fails to load on iOS
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On iOS, navigating to "Set up 2FA for Server Key" threw
Cannot read properties of undefined (reading 'model'), left the screen permanently spinning, and sometimes rendered only the manual key with no QR code.Root causes
SigningServer.ts— silent error swallowing (13 methods): The two-branch catch pattern skipped rethrowing whenerrhad neither.responsenor.code(network timeout, SSL failure on iOS).resstayedundefined; the nextres.dataaccess produced a secondary TypeError whose property name varied by path ("model", "data", etc.).SetupSigningServer.tsx— unsafe access + wrong guard:setupData.verification.verifierthrew on malformed server responses;validationKey === ''didn't catchundefined/null, allowing QR render with a falsy key.No error recovery UX: A failed registration left the screen stuck in a permanent spinner with no path to retry.
KeeperQRCode— no render-error escape hatch:react-native-qrcode-svgacceptsonError; without it, generation failures in the component'suseMemowere rethrown uncaught.Changes
SigningServer.ts— applied safe rethrow to all 13 axios catch blocks.KeeperQRCode.tsx— added optionalonError?: (error: Error) => voidprop, forwarded directly to<QRCode>.SetupSigningServer.tsxvalidationKey === ''→!validationKeysetupData?.verification?.verifier; explicitregistrationErrorstate set when verifier is missingonErroron<KeeperQRCode>surfaces render failures as a toastSetupAdditionalServerKey.tsx— same!validationKeyguard for parity.