TypeError: null is not an object (evaluating 'n.stat.size') -- Android 9, Nextcloud file-system back-end

Hello everyone,

  • Android version: 9
  • Joplin: 1.0.316
  • Backend: file system + Nextcloud to sync folder
  • Nextcloud version: 3.10.1 (client on Android)

I'm having issues with android sync with the file-system back-end:

Last error: TypeError: null is not an object (evaluating 'n.stat.size')

The closest topics to my issue are those:

I checked and there are no 0B objects in my folder that Nextcloud/Joplin use. I double checked on Linux with the file browser. I can't find the culprit, because in Joplin's logs there are no UUIDs mentioned for this error in the Android logs from within Joplin.

I used this:

~/Applications/Joplin-1.0.179_00000000000000000000000000000000.appimage --profile ~/joplin/temp --stack-trace-enabled --log-level debug --open-dev-tools

to run Joplin in debug mode and I had no sync errors. The performance is awesome and all files get synced from the file-system back-end and decrypted.*

*I had to rename my profile in ~/.config because despite the --profile flag Joplin would attach to the existing profile. Or maybe this is how it's supposed to work?

Please tell me, what;s the preferred method of wiping local data for Joplin on Android? On Linux I just rename the profile folder in ~/.config and start Joplin again. On Android I used the built in "wipe application data" button to manage space. Could this be the cause?

One more thing: I used the Nextcloud back-end on Android previously, because Nextcloud had some issues with sync. But without any reasons they normalized. I then (without wiping data) switched to the File System back-end. Could this be the source of the issue?

Thank you for creating and supporting Joplin!


I reinstalled Joplin for Android and reconfigured the back-end. The issue disappeared, so I have no idea what was causing it. I even checked again but there were no 0B notes. I had however issues with Nextcloud sync, so maybe Nextcloud left something corrupted and Joplin caught fire trying to parse it?

Anyway, I seem to be the only person who had this error, so maybe it’s not worth investigating. I assume there are better things to fix and upgrade.

This error occurs when you read a property or call a method on a null object . That’s because the DOM API returns null for object references that are blank. An object is expected somewhere and wasn’t provided. So, you will get null is not an object error if the DOM elements have not been created before loading the script. In JavaScript , null is not an object; and won’t work. You must provide a proper object in the given situation.

We can resolve this type of issues by adding an event listener that will notify us when the page is ready. Once the addEventListener is fired, the init() method can make use of the DOM elements.

  document.addEventListener('readystatechange', function() {
    if (document.readyState === "complete") {