toeverything/AFFiNE · error · Error
Challenge failed
Error message
Challenge failed
What it means
The ValidatorProvider impl resolves a client-scheme challenge by asking the desktop UI for a challenge response token and throws 'Challenge failed' when none is returned, blocking resource validation from proceeding.
Source
Thrown at packages/frontend/apps/electron-renderer/src/app/effects/modules.ts:76
});
},
};
});
framework.impl(ClientSchemeProvider, p => {
const appInfo = p.get(DesktopApiService).appInfo;
return {
getClientScheme() {
return appInfo?.scheme;
},
};
});
framework.impl(ValidatorProvider, p => {
const apis = p.get(DesktopApiService).api;
return {
async validate(_challenge, resource) {
const token = await apis.handler.ui.getChallengeResponse(resource);
if (!token) {
throw new Error('Challenge failed');
}
return token;
},
};
});
framework.scope(ServerScope).override(AuthProvider, p => {
const apis = p.get(DesktopApiService).api;
const serverService = p.get(ServerService);
const endpoint = serverService.server.baseUrl;
return {
async signInMagicLink(email, token, clientNonce) {
const result = await apis.handler.auth.signInMagicLink(
endpoint,
email,
token,
clientNonce
);View on GitHub (pinned to b4c8548c09)
Solutions
- Retry the challenge flow; transient network or timing issues can cause failure.
- Verify the challenge parameters and that the native side is responding.
- Restart the app if the challenge state is stuck.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/frontend/apps/electron-renderer/src/app/effects/modules.ts:76 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/2bd49312c031cfac.
Report an issue: GitHub.