Repository navigation
Fix manual Drive/Dropbox/OneDrive backup (getEncryptionStatus is not a function) - #1614
Open
soaresnetoh wants to merge 1 commit into
Open
soaresnetoh wants to merge 1 commit into
soaresnetoh wants to merge 1 commit into
Conversation
…on#1477) The Drive, Dropbox and OneDrive pages passed the whole `accounts.encryption` Map to `upload()`, which expects a single Encryption instance. `backupGetExport` then called `encryption.getEncryptionStatus()` on the Map and threw "e.getEncryptionStatus is not a function", so manual backups failed silently. Pass the default encryption, as `runScheduledBackup` in popup.ts already does, and fall back to an empty Encryption when no password is set.
soaresnetoh
force-pushed
the
fix/manual-backup-encryption
branch
from
November 25, 2026 18:26
fef3525 to
f2fe287
Compare
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.
Fixes #1477
Problem
Clicking the manual backup button on the Google Drive, Dropbox or OneDrive page does nothing. The popup console shows:
DrivePage.vue,DropboxPage.vueandOneDrivePage.vuepassthis.$store.state.accounts.encryptiontoupload(). Since v8 that store field is aMap<string, EncryptionInterface>keyed by key id, butupload(encryption: Encryption)forwards it toEntryStorage.backupGetExport(), which callsencryption.getEncryptionStatus(). AMaphas no such method, so the call throws.backupUpload()has no try/catch, so the user gets no alert either.Fix
Pass the default encryption instance, the same way
runScheduledBackupinsrc/popup.tsalready does:The
?? new Encryption("", "")fallback covers users without a password. In that casedefaultEncryptionis empty,Map.getreturnsundefined, andbackupGetExportwould throw again. AnEncryptionwith an empty password reportsgetEncryptionStatus() === false, which matches the existing unencrypted export behavior.Testing
npm run chromebuilds cleanly, including the project's Prettier check and ESLint run (.js,.ts).keyin the manifest gave it the store extension ID, so Drive sign-in worked. Test data only.Authenticator Backups/YYYYMMDD.jsonwith theEncOTPStorageentry and itsKey.?? new Encryption("", "")fallback): manual Drive backup succeeds and uploads a plainOTPStorageentry with"encrypted": false.Notes (out of scope)
runScheduledBackupinpopup.tshas the sameundefinedcase when no password is set. I left it unchanged to keep this PR focused, and can add the same fallback there if you prefer.EncOTPStorageentries are still exported encrypted, becausebackupGetExportskips them (// TODO: fix thisinstorage.ts). The result fails safe, but it does not match the warning the UI shows. This is a separate pre-existing issue.