element-hq / element-hq/element-web

safeStorage.getSecret() errors during getPickleKey() are indistinguishable from absent pickle key to the renderer process

Open
#34,951 0 comments 0 reactions 0 assignees View on GitHub
A-Electron A-Storage O-Uncommon S-Minor T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

When looking into errors such as https://github.com/element-hq/element-web/issues/32521 I noticed that for Desktop calls to `getPickleKey()` do not distinguish between an error accessing safe storage and a missing entry.

On Web the error is at least logged and so is visible in rageshakes. However, on Electron the error is not returned across the IPC boundary and so is effectively lost and only visible in stderr of the Electron process.

Proposed fixes:

- on Electron pass the error back to the rendered via IPC
- consistently handle and log the error between Web and Desktop

Contributor guide

Open the contributing guide

Research direction

Trace getPickleKey() through the Electron safeStorage call and its IPC boundary, then compare it with the Web error handling and logging path. Done means safe-storage failures are distinguishable from a missing pickle key and are returned or logged consistently where the issue describes.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.