App crashes when opening imported `.md` file

Bug report

I imported a markdown file which I previously exported from Bear (another note taking application). When opening that imported note, the app crashes. Inkdrop is up to date, all plugins are up to date. I also tried cleaning up the whole markdown file, so there isn’t anything unsupported in it, like document links. The note mainly consists of website links in lists. This is the error:

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at Typo.check (/Users/fabio/Library/Application Support/inkdrop/packages/spell-checker/node_modules/typo-js/typo.js:656:42)
    at Object.token (/Users/fabio/Library/Application Support/inkdrop/packages/spell-checker/node_modules/@inkdropapp/codemirror-spell-checker/spell-checker.js:72:53)
    at Object.token (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/codemirror/addon/mode/overlay.js:56:42)
    at readToken (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/codemirror/lib/codemirror.js:1202:30)
    at takeToken (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/codemirror/lib/codemirror.js:1224:21)
    at CodeMirror.getLineTokens (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/codemirror/lib/codemirror.js:8395:22)
    at t.default (file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js:1:519958)
    at O (file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js:1:256963)
    at M.updateInlineImageWidgetsNow (file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js:1:259231)
    at M.componentDidUpdate (file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js:1:264200)
    at Ji (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:212:237)
    at Sj (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:255:235)
    at exports.unstable_runWithPriority (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/scheduler/cjs/scheduler.production.min.js:19:473)
    at cg (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:122:331)
    at Jj (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:248:376)
    at yj (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:239:388)
    at /Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:123:121
    at exports.unstable_runWithPriority (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/scheduler/cjs/scheduler.production.min.js:19:473)
    at cg (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:122:331)
    at fg (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:123:67)
    at gg (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:122:502)
    at Mj (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-dom/cjs/react-dom.production.min.js:240:72)
    at Object.notify (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-redux/lib/utils/Subscription.js:21:13)
    at Object.notifyNestedSubs (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-redux/lib/utils/Subscription.js:92:21)
    at handleChangeWrapper (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/react-redux/lib/utils/Subscription.js:97:26)
    at dispatch (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/redux/lib/redux.js:305:13)
    at /Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/redux-thunk/lib/index.js:27:22
    at file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js:1:514168
    at dispatch (/Applications/Inkdrop.app/Contents/Resources/app.asar/app/static/node_modules/redux/lib/redux.js:667:34)
    at file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-commons.js:1:66807

Environment

  • Platform: macOS
  • Platform version: Monterey 12.6
  • App Version: 5.5.2

How to reproduce

Import a .md file with lots of website links in it and open the imported note.

Hi FM,

Thanks for the report.
Looks like the error occurs from the spell-checker plugin.
I’ll look into it

Can you try spell-checker@2.2.1?

Hi, thanks for the reply and update! It still crashes after updating to spell-checker@2.2.1. I now did some more testing, and: it doesn’t crash on my M1 Mac Mini, even with spell-checker 2.2.0. So it only crashes on my 2014 MacBook Pro. Both devices are running macOS Monterey. It also doesn’t crash on my Windows machine, where I use the portable version of Inkdrop.

It looks like it’s a problem that only affects my older MacBook Pro, but not the new M1 Mac Mini. If I find a possible reason or something that is significantly different on those machines, I’ll let you know!

My MacBook Pro is on Monetery 12.6, my Mac Mini on 12.6.1. So I’ll first update my MacBook Pro to 12.6.1, and then I’ll try reinstalling Inkdrop to see if the app then still crashes with that note. Also worth noting: the 2014 MacBook Pro doesn’t officially support Monterey, I installed it using OpenCore-Patcher. But I don’t think that should be an issue for Inkdrop.

After deleting/uninstalling Inkdrop and reinstalling it, the problem is resolved! :smiley:

1 Like

Great to hear it’s been resolved! Cheers