Does not work `@electron/remote` in the plugin

Bug report

I am in the process of fixing require('electron').remote from the latest version of Inkdrop as it no longer works.

require('electron').remote is no longer available for plugins. Use require('@electron/remote') instead.

Related issue:

I am working on replacing @electron/remote in this branch, but when I switch notes several times, I get the following error and the app crashes.
Do you know what causes this?

Error: Cannot get property '_id' on missing remote object 591
    at throwRPCError (/Applications/
    at /Applications/
    at IpcMainImpl.<anonymous> (/Applications/
    at IpcMainImpl.emit (node:events:394:28)
    at IpcMainImpl.emit (node:domain:475:12)
    at Object.<anonymous> (node:electron/js2c/browser_init:161:10774)
    at Object.emit (node:events:394:28)
    at Object.emit (node:domain:475:12)


  • Platform: macOS
  • Platform version: Monterey
  • App Version:5.5.0

How to reproduce

  1. git clone -b issue7-wip
  2. cd inkdrop-pomodoro-edit
  3. ipm link --dev
  4. Switch the note about 5 times
  5. An error occurs

Hi Seito-san,

Thanks for the report. That’s weird. I’ll look into it!

Oh, it looks like you’ve added @electron/remote as a dependency to your plugin. It’s unnecessary because Inkdrop provides it out of the box. Can you try removing it?

1 Like

Wow! Thank you Takuya.
I removed the dependencies and it worked.

1 Like