Inkdrop crash after uninstalling vim plugin

Bug report

Hi, I install vim plugin, and then disabled it.
After that, I cannot launch inkdrop app.

I tried troubleshoot and below was the result.

  ~  $  /Applications/Inkdrop.app/Contents/MacOS/Inkdrop --enable-logging
[bugsnag] Loaded!
  app:info Initializing inkdrop app.. +0ms
  app:info Arguments: /Applications/Inkdrop.app/Contents/MacOS/Inkdrop +7ms
  app:info Arguments: --enable-logging +1ms
  app:info Starting inkdrop app.. +1m
  app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined } +123ms
  app:error Failed to init app: SyntaxError: Syntax error on line 1, column 5: Unexpected IdentifierLiteral

 +0ms
  app:info Unloading app +5s
(node:1805) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'dispose')


(Use `Inkdrop --trace-warnings ...` to show where the warning was created)
(node:1805) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[bugsnag] Unhandled rejection…
TypeError: Cannot read properties of undefined (reading 'dispose')


[1805:0314/071607.714919:INFO:CONSOLE(45256)] "[bugsnag] Loaded!", source: <embedded> (45256)
[1805:0314/071607.812514:INFO:CONSOLE(44199)] "The vm module of Node.js is deprecated in the renderer process and will be removed.", source: <embedded> (44199)
[1805:0314/071607.818010:INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read properties of undefined (reading 'onSync')", source: file:///Applications/Inkdrop.app/Contents/Resources/app.asar/browser-main.js (1)

Environment

  • Platform: Mac OS(M1 chip)
  • Platform version: Monterry 12.2.1
  • App Version: Downloaded last month, but perhaps not lastest. Cannot check.

How to reproduce

Install vim plugin, uninstall, and then reboot.
I restarted computer, and still has same issue.
I erased inkdrop app and deleted all files and directories under Applications/Inkdrop.app, redownloaded latest version from website, and still cannot launch inkdrop.

I think at this point, only option I can take is to clean up app and re-install, would be great if there is a way to do so.

Hi Takashi,

Thanks for the report. Looks like you have a syntax error in your config file:

  app:error Failed to init app: SyntaxError: Syntax error on line 1, column 5: Unexpected IdentifierLiteral

Please check your config.cson in ~/Library/Application Support/inkdrop/.

Hello, thank you for quick response.
I did many reboot / re-install and now it is working fine, as well as intalling / uninstalling vim plugin.

Please check your config.cson in ~/Library/Application Support/inkdrop

I see, config.cson is the go-to file when syntax error, will let you know if same issue happen again.

Good to hear that.
Yeah, also check your keymap.cson.

As of v5.5.1, it shows an error dialog when failed to load the config file :raised_hands:

1 Like

The unhandledRejection event is emitted whenever a promise rejection is not handled. “Rejection” is the canonical term for a promise reporting an error. As defined in ES6, a promise is a state machine representation of an asynchronous operation and can be in one of 3 states: “pending”, “fulfilled”, or “rejected”. Somebody decided that JavaScript programmers couldn’t be trusted with managing promise rejections properly and changed the HTML spec to require browsers to throw “unhandled promise rejection” errors if a rejected promise has no rejection handlers added before code returns to the event loop. The error usually happens in async await functions, and there’s an easy fix.

const functionName = async (arguments) => {
  try {
  // Your code here
  } catch (error) {
  // Handle rejection here
  }
};