Summary
Inkdrop Canary crashes on startup when the last navigation state points to a deleted or missing tag.
I launched Codex in /Applications/Inkdrop.app, provided the stack trace, and asked it to investigate the cause and suggest a workaround. This report includes the findings from that investigation.
Reproducibility
I have not been able to reproduce the exact steps that create this invalid saved navigation state yet.
What I remember is that the Inkdrop error screen appeared while I was creating and editing a new note after switching the active notebook. After that, restarting Inkdrop only showed the same error screen, and the app was no longer operable.
Environment
- App: Inkdrop Canary
- Version: 6.0.0-canary.15
- OS: macOS
- User data dir:
~/Library/Application Support/inkdrop-canary/
Error
TypeError: Cannot read properties of undefined (reading 'color')
at file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:1021353
at Da (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:1021675)
at Ps (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:414602)
at La (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:441137)
at Ya (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:451549)
at Yc (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:488742)
at Gc (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:488671)
at qc (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:488513)
at Mc (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:485322)
at Tu (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:499758)
at xu (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:498284)
at Su (file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:498618)
at file:///Applications/Inkdrop%202.app/Contents/Resources/app.asar/browser-main.js:2:497914
Cause observed
config.json contained the following saved navigation state:
{
"queryContext": {
"mode": "tag",
"tagId": "tag:OhQ8pubQl"
}
}
However, state-cache/tags.json did not contain tag:OhQ8pubQl in either all or hash.
The renderer appears to restore the previous tag view on startup, then tries to render the tag header with something equivalent to:
const tag = tags.hash[queryContext.tagId]
tag.color
Since the tag is missing, tag is undefined, causing the startup crash.
Workaround
Manually editing ~/Library/Application Support/inkdrop-canary/config.json and changing the saved queryContext from mode: "tag" to mode: "all".