Error: Could not call remote method 'setPosition'. Check that the method signature is correct

Bug report

Inkdrop fails to load sometimes after upgrading to 5.2.0. The following error is in the console:

browser-main.js:1 Uncaught (in promise) Error: Could not call remote method 'setPosition'. Check that the method signature is correct. Underlying error: Error processing argument at index 1, conversion failure from 11.5
Underlying stack: TypeError: Error processing argument at index 1, conversion failure from 11.5
    at electron/js2c/browser_init.js:6732:63
    at EventEmitter.<anonymous> (electron/js2c/browser_init.js:6585:21)
    at EventEmitter.emit (events.js:203:13)
    at EventEmitter.emit (domain.js:476:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:3904:23)
    at WebContents.emit (events.js:203:13)
    at WebContents.EventEmitter.emit (domain.js:476:20)
    at WebContents.topLevelDomainCallback (domain.js:131:23)


    at electron/js2c/browser_init.js:6734:17
    at EventEmitter.<anonymous> (electron/js2c/browser_init.js:6585:21)
    at EventEmitter.emit (events.js:203:13)
    at EventEmitter.emit (domain.js:476:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:3904:23)
    at WebContents.emit (events.js:203:13)
    at WebContents.EventEmitter.emit (domain.js:476:20)
    at WebContents.topLevelDomainCallback (domain.js:131:23)

Info

  • Platform: Windows
  • Platform version: 10
  • App Version: 5.2.0

Reproduce

It may be some kind of race condition, because if I close and reopen the app, eventually it goes away.

Hi Ryan,

Thanks for reporting.
That’s weird. Maybe it looks like a kind of race condition but I can’t reproduce that at the moment.
The callstack doesn’t help in this case.
Maybe a third-party plugin is causing this?

I am in development mode. I thought it might be the plugin I am developing, but that wasn’t it. I don’t have any third party plugins otherwise.

Interesting. I’ll check my code calling setPosition.

1 Like

Not sure this helps, but I could not reproduce this on Mac OS 10.15.x.

Okay, I’ll make it validate the parameters for setPosition more strictly in the next release just in case.

1 Like

Thanks. Is that coming soon or is there a way to get the old version in the meantime?

Why? Is it still not working?

Still an issue on Windows, not an issue on Mac OS.

Can you please show me your config.cson?
Particularly, I’d like to see these fields:

"*":
  core:
    mainWindow:
      fullscreen: false
      hiddenComponents:
        "sidebar-menu": [
          "SideBarMenuStatusList"
        ]
      maximized: false
      noteListBar:
        w: 298
      position:
        x: 760
        y: 425
      sideBar:
        w: 186
      size:
        h: 668
        w: 1198

Here it is!

"*":
  core:
    db:
      machineId: ""
    devMode: true
    mainWindow:
      fullscreen: false
      maximized: false
      position:
        x: 360
        y: 225
      sideBar:
        w: 200
      size:
        h: 1057
        w: 974
    themes: [
      "default-light-ui"
      "papercolor-syntax"
      "source-baseline-preview"
    ]
  editor:
    indentUnit: 4
    viewMode: "edit"

hmm, couldn’t reproduce it.
Can you please try:

  1. Quit Inkdrop
  2. Remove position and size configs
  3. Launch it again

If it still doesn’t work, I will make a patch build for debugging.

1 Like

Still getting it, new config with different positioning:

"*":
  core:
    db:
      machineId: ""
    lastNavigationState:
      editingNoteId: "note:ADgVccpxB"
      queryContext:
        mode: "all"
      sidebar:
        workspace:
          bookId: ""
          visible: false
    mainWindow:
      fullscreen: false
      maximized: false
      position:
        x: -7
        y: 0
      sideBar:
        w: 200
      size:
        h: 1057
        w: 974
    themes: [
      "default-light-ui"
      "papercolor-syntax"
      "source-baseline-preview"
    ]
  editor:
    indentUnit: 4
    viewMode: "preview"

Built a patch here, can you please try it?

https://inkdrop-dist.s3-ap-northeast-1.amazonaws.com/tmp/Inkdrop-5.2.0-Windows-patch-1.zip

Thank you! Hitting that one a lot tonight, so happy to try it. :slight_smile:

1 Like

Still hitting it unfortunately. Definitely seems to be a ‘development mode’ only problem (or at least it happens a lot more there). Here is the error log:

browser-main.js:1 Uncaught (in promise) Error: Could not call remote method 'setPosition'. Check that the method signature is correct. Underlying error: Error processing argument at index 1, conversion failure from 11.5
Underlying stack: TypeError: Error processing argument at index 1, conversion failure from 11.5
    at electron/js2c/browser_init.js:6732:63
    at EventEmitter.<anonymous> (electron/js2c/browser_init.js:6585:21)
    at EventEmitter.emit (events.js:203:13)
    at EventEmitter.emit (domain.js:476:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:3904:23)
    at WebContents.emit (events.js:203:13)
    at WebContents.EventEmitter.emit (domain.js:476:20)
    at WebContents.topLevelDomainCallback (domain.js:131:23)


    at electron/js2c/browser_init.js:6734:17
    at EventEmitter.<anonymous> (electron/js2c/browser_init.js:6585:21)
    at EventEmitter.emit (events.js:203:13)
    at EventEmitter.emit (domain.js:476:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:3904:23)
    at WebContents.emit (events.js:203:13)
    at WebContents.EventEmitter.emit (domain.js:476:20)
    at WebContents.topLevelDomainCallback (domain.js:131:23)

deserialize @ error-utils.ts:14
exception @ remote.js:226
metaToValue @ remote.js:230
remoteMemberFunction @ remote.js:129
t.restoreWindowPositionAndSize @ browser-main.js:1
start @ browser-main.js:1
26151 @ browser-main.js:1
r @ browser-main.js:4
84303 @ browser-main.js:1
r @ browser-main.js:4
a @ browser-main.js:4
r.x @ browser-main.js:4
(anonymous) @ browser-main.js:4
(anonymous) @ browser-main.js:4

I think I got it! How about this?

https://inkdrop-dist.s3-ap-northeast-1.amazonaws.com/tmp/Inkdrop-5.2.0-Windows-patch-2.zip

1 Like

By jove, I think you have done it! I am not able to repro yet, and I am really trying. Was it a fun bug to find??

Haha, yeah. This error message helped me solve it:

Error processing argument at index 1, conversion failure from 11.5

The parameters must be an integer value, so I fixed my code like so:

    x = Math.round((primaryScreenBounds.width - w) / 2)

Thanks again for your report!

1 Like

Landed in v5.2.1:raised_hands:
Thanks again for reporting!

1 Like