# Cannot syncronize on Android 10. "Attempt to get length of null array" error

**URL:** <https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325>\
**Category:** Support\
**Created:** [9 November 2020 17:57 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325 "2020-11-09T17:57:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewbagel423](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@drewbagel423](https://discourse.joplinapp.org/u/drewbagel423)\
**Post date:** [9 November 2020 17:57 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/1 "2020-11-09T17:57:38Z")

</div>

Joplin 1.3.13, database v34  
LG G8 Thinq, Android 10 G820TM20e

I have a Joplin notebook on my Win10 PC that I'm trying to sync to my phone. I use Syncthing to copy the folder across devices. I just switched phones today and now I can't sync on the new phone in Joplin. It was working previously on my Moto G6 running Android 9.

So what I do is sync my notebook on my PC to a local directory using the "File system" option. Then I connect Syncthing between the PC and phone and point to said director. That all works fine and now I have all the .md files on both devices. Then I try to sync Joplin on my phone and I get an error:

`Could not read directory: /storage/emulated/0/1 Syncthing Share/Joplin Notebooks/locks: Attempt to get length of null array. Path: /storage/emulated/0/1 Syncthing Share/Joplin Notebooks/locks`

I've granted all three permissions Joplin asks for. I'm not sure what could be causing this. My debug report is attached.

[syncReport-1604944165079.txt](https://discourse.joplinapp.org/uploads/short-url/swybeq8ZGX9GsQoRIc0c8SQYGfN.txt) (51.7 KB)

---

<div class="post-metadata">

**Author:** ![QL568A6](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ql568a6/32/6137_2.png) [@QL568A6](https://discourse.joplinapp.org/u/QL568A6)\
**Post date:** [15 December 2020 18:35 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/2 "2020-12-15T18:35:15Z")

</div>

I'm also having this problem. The Locks folder is empty on my computer and adding a blank text document didn't help.

I tried re-installing the app to get whatever should be in the Locks folder, but it didn't even create the directory structure, let alone populate it.

---

<div class="post-metadata">

**Author:** ![gcalfin](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gcalfin/32/6160_2.png) [@gcalfin](https://discourse.joplinapp.org/u/gcalfin)\
**Post date:** [16 December 2020 23:49 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/3 "2020-12-16T23:49:49Z")

</div>

I have the same problem. Lock folder is empty on my computer.

I use the Windows 10 version of Joplin and use the file synchronization to a local directory that is subsequently copied to my QNAP storage platform (Using their Qsync app). My Android phone also uses Qsync to pull the latest copy into a local directory which I am attempting to file-sync via the Android Joplin app. This results in the same error message that others have shared here.

---

<div class="post-metadata">

**Author:** ![alias\_azerty](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@alias\_azerty](https://discourse.joplinapp.org/u/alias_azerty)\
**Post date:** [22 December 2020 17:43 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/4 "2020-12-22T17:43:34Z")

</div>

I am also having the same issue syncing my notes from my Mac to my Android using Syncthing. The `locks` folder exists on the Android, and is empty (as on the Mac).

Same error message as the others.

---

<div class="post-metadata">

**Author:** ![Rabioli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rabioli/32/6268_2.png) [@Rabioli](https://discourse.joplinapp.org/u/Rabioli)\
**Post date:** [26 December 2020 05:42 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/5 "2020-12-26T05:42:18Z")

</div>

I have the exact same problem, [here](https://discourse.joplinapp.org/t/solution-cant-sync-error-directory-could-not-be-created/13323) is the informaton I could gather, also [this](https://discourse.joplinapp.org/t/access-sdcard-with-api-level-30/13301) is somewhat related, good luck managing the permissions.

---

<div class="post-metadata">

**Author:** ![gcalfin](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gcalfin/32/6160_2.png) [@gcalfin](https://discourse.joplinapp.org/u/gcalfin)\
**Post date:** [5 January 2021 14:08 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/6 "2021-01-05T14:08:00Z")

</div>

I could not resolve the issue. I was able to setup a webdav server on my NAS box and now use that to sync Joplin between handheld and desktop without using public cloud.

---

<div class="post-metadata">

**Author:** ![CyBuzz](https://avatars.discourse-cdn.com/v4/letter/c/eada6e/32.png) [@CyBuzz](https://discourse.joplinapp.org/u/CyBuzz)\
**Post date:** [7 January 2021 17:13 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/7 "2021-01-07T17:13:12Z")

</div>

I have this problem also. It is not the first time. I found a while ago a post online that said to use a different version and I did and it worked....but then it auto updated and I cant remember what i did. I tried old versions, new versions and pre-release versions. No luck yet. if i find a solution i will post.

---

<div class="post-metadata">

**Author:** ![CyBuzz](https://avatars.discourse-cdn.com/v4/letter/c/eada6e/32.png) [@CyBuzz](https://discourse.joplinapp.org/u/CyBuzz)\
**Post date:** [7 January 2021 17:27 UTC](https://discourse.joplinapp.org/t/cannot-syncronize-on-android-10-attempt-to-get-length-of-null-array-error/12325/8 "2021-01-07T17:27:16Z")

</div>

so i uninstalled the current version, 1.5.x and then tried starting with 1.3.10, 1.3.11, 1.3.13, 1.4.6, 1.4.11 and none of them worked. i installed the 1.6.4 and all of a sudden....it is syncing. hopefully that version sticks around and works. it is a pre-release so i dont know what that might bring to the table but syncing is a good thing.
