Can't see my Inkdrop notes on second MacBook that should be sync'd behind corporate proxy

Bug report

I have InkDrop installed on one of my Macbook’s. It has notes on it. I installed Inkdrop on another macbook just now, and logged in. I expected to see my notes I created that should be sync’d, however , its completely empty. What’s going on here?

Info

  • Platform: macOS
  • Platform version: Catalina 10.15.7
  • App Version: latest

Reproduce

Hi Alberto,

Thank you for the report.
That’s weird.
Can you please make sure if you are using the regular version (not the demo version) on both macs?

https://my.inkdrop.app/download

Hi, I am in the “free trial mode” for this account. “57 days left”. Do I need to pay to get the ability to sync notes? :thinking:

I’m behind a proxy but I added that proxy information to the cson configuraiton and was able to log in and connect , so I figured that would allow me to synchronize. I wonder if the corporate firewall is blocking my ability to sync with the server…

No, you can use the sync feature during the free trial.
So, you are using the regular version on both macs.
It looks like your corporate proxy is blocking the sync.
But it’s hard to investigate from my side because it depends on your network.
Please try the following steps to investigate:

  1. stop Inkdrop
  2. Launch it from terminal with /Applications/Inkdrop.app/Contents/MacOS/Inkdrop

You might get some helpful information.

I tried it. I see the boot up is successful and it outputs the JSON of the http and https proxy, which all look correct. I don’t see any error messages (log at the bottom, filled with dummy info).

I wasn’t able to connect initially at all, and got an error. I had to edit the .cson file per the InkDrop directions to even be able to connect. How does the sync work at a high-level? Does it send the local notes file and upload to a central server? I’m assuming this mechanism works differently then when I connect, because if they were the same mechanism, than it should work yes (because I can connect now)?

/Applications/Inkdrop.app/Contents/MacOS/Inkdrop
[bugsnag] Loaded!
  app:info Initializing inkdrop app.. +0ms
  app:info Arguments: /Applications/Inkdrop.app/Contents/MacOS/Inkdrop +2ms
  app:info Starting inkdrop app.. +70ms
  app:info http proxy enabled: http://user:@url:1234 +128ms
  app:info https proxy enabled: http://user:@url:1234  +0ms
  app:info axios default config: {
  proxy: false,
  httpAgent: HttpProxyAgent {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    _promisifiedCallback: false,
    timeout: null,
    options: Url {
      protocol: 'http:',
      slashes: true,
      auth: 'user:',
      host: 'url:1234',
      port: '1234',
      hostname: 'url',
      hash: null,
      search: null,
      query: null,
      pathname: '/',
      path: '/',
      href: 'http://user:@url:1234/'
    },
    secureProxy: false,
    proxy: {
      protocol: 'http:',
      slashes: true,
      auth: 'user:',
      host: 'url',
      port: 1234,
      hostname: 'url',
      hash: null,
      search: null,
      query: null,
      href: 'http://user:@url:1234/'
    }
  },
  httpsAgent: HttpsProxyAgent {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    _promisifiedCallback: false,
    timeout: null,
    options: Url {
      protocol: 'http:',
      slashes: true,
      auth: 'user:
      port: '1234',
      hostname: 'url',
      hash: null,
      search: null,
      query: null,
      pathname: '/',
      path: '/',
      href: 'http://user:@url:port/'
    },
    secureProxy: false,
    proxy: {
      protocol: 'http:',
      slashes: true,
      auth: 'user:',
      host: '',
      port: 1234,
      hostname: '',
      hash: null,
      search: null,
      query: null,
      href: 'http://user:@url:1234/'
    },
    defaultPort: 443
  }
} +2ms
(node:35990) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:35990) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information

Inkdrop uses CouchDB on the server and PouchDB on the client to provide the data sync.
PouchDB uses node-fetch to communicate with CouchDB, and Inkdrop itself uses axios to call the APIs on the other hand.

Since you masked the proxy URL but http://user:@url:1234 is incorrect URL format. You should specify like:

http://user:password@hostname:port/

If your username has “@” character, it should be replaced with %40.
You can reproduce the sync networking logic by running the following code on NodeJS:

const fetch = require('node-fetch');
const HttpsProxyAgent = require('https-proxy-agent');
const options = {
  agent: new HttpsProxyAgent('http://PROXY_SERVER_URL/')
}

fetch('https://store.inkdrop.app/', options)
    .then(function (response) {
        console.log('Response with node-fetch was ok: ' + response.status);
    })
    .catch(function (error) {
        console.error(error);
    });

If it worked fine, there may be another issue.