Desktop @ v2.5.1
Core @ v5.13.1
Flags: installed
OS: Archlinux
Buttercup install: From AppImage on the buttercup website.
I can not save new entries. I get this error message "Vault failed to save: Cannot read property 'createEntry' of null". This doesn't happen every time, but most.
I am using a single vault, which is on a google drive (if it makes a difference).
Terminal log gives:
[INF] 21:57:55: Update available: 2.5.2 (2021-05-25T18:50:16.516Z)
[INF] 21:57:57: (front-end) Unlocking source: bbc33435-da96-4696-80f4-8af2eae0770d
[INF] 21:57:58: Update search record for vault: bbc33435-da96-4696-80f4-8af2eae0770d
[INF] 21:57:58: Updated search records for 1 vaults
[INF] 21:57:58: Unlocked source: bbc33435-da96-4696-80f4-8af2eae0770d (took: 298.605207 ms)
[INF] 21:57:58: (front-end) Unlocked source: bbc33435-da96-4696-80f4-8af2eae0770d
[INF] 21:57:58: (front-end) Toggling auto-update for vault editing (editing=false, auto-update=true)
[INF] 21:57:58: Enabled auto-update
[INF] 21:58:16: (front-end) Saving vault facade: bbc33435-da96-4696-80f4-8af2eae0770d
[ERR] 21:58:16: Failed saving vault facade TypeError: Cannot read property 'createEntry' of null
at …s/app.asar/node_modules/buttercup/dist/facades/vault.js:176 const newEntry = targetGroup.createEntry();
at filter
at consumeVaultFacade …s/app.asar/node_modules/buttercup/dist/facades/vault.js:160 entriesLeft = entriesLeft.filter(entryRaw => {
at <anonymous> …ksW/resources/app.asar/build/main/services/buttercup.js:169 buttercup_1.consumeVaultFacade(source.vault, facade);
at next
at …7pksW/resources/app.asar/build/main/services/buttercup.js:8 step((generator = generator.apply(thisArg, _arguments || [])).next());
at new Promise
at __awaiter …7pksW/resources/app.asar/build/main/services/buttercup.js:4 return new (P || (P = Promise))(function (resolve, reject) {
at saveVaultFacade …ksW/resources/app.asar/build/main/services/buttercup.js:166 return __awaiter(this, void 0, void 0, function* () {
at ….mount_Buttert7pksW/resources/app.asar/build/main/ipc.js:93 yield buttercup_2.saveVaultFacade(sourceID, vaultFacade);
[INF] 22:02:14: Locking vaults on window close
[INF] 22:02:14: Updated search records for 0 vaults
EDIT (by @perry-mitchell): Original title: _"Vault failed to save: Cannot read property 'createEntry' of null when attempting to save new entry"_
Updated to 2.5.2, same issue.
Hi @frigaut - Sorry to hear you're having issues.
Is it reproducible in some repeatable manner if you perform some steps? This would really help me locate the issue. From the code that's failing it looks like the group in which the entry is being created could not be found by Buttercup's core. It's most certainly a bug, but I'm not sure as to the environment in which it's going to appear, just by that line of code alone.
Did you for example create a new group, and then a new entry inside that group? Or was it just a new entry by itself in an existing group?
Any further details here would help, and I'll try to get this patched asap.
Hi mate (I'm an aussie too),
Thansk for your pointers. I found out what was wrong. Problem is not on your side, although perhaps this will help you put some ring fences to avoir the same issue for others.
The issue was that I was trying to create a new entry right after starting up Buttercup, while no group was selected.
I guess the use case is:
@frigaut Haha awesome - cheers for taking the time to investigate and make an issue.
I've update the title - I'll make some adjustments to improve this behaviour.. perhaps auto-selecting a group (or last group) is a good idea. I'm surprised someone hasn't raised this earlier..
Yeah, either that or not allowing "new entry" (greying out/not selectable) unless a group is selected.
I let you close the issue at your leisure (I understand you may want to keep it alive as a reminder for a fix).
I can confirm that selecting a group first avoids the problem I reported in #1038.