Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android File System Sync Error: Attempt to get length of null array. #538

Closed
technicalguy opened this issue May 19, 2018 · 5 comments
Closed
Labels
bug It's a bug

Comments

@technicalguy
Copy link

Operating system

  • Android

Application

  • Mobile
Date,Level,Message
05-19T11:39:30,30,"""Settings have been saved.""
05-19T11:39:29,30,"""Saving settings...""
05-19T11:39:29,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:39:24,30,"""Reducer action", "NAV_GO, Config""
05-19T11:39:21,30,"""Reducer action", "SIDE_MENU_CLOSE""
05-19T11:39:19,30,"""Reducer action", "SIDE_MENU_OPEN""
05-19T11:39:19,30,"""Reducer action", "SIDE_MENU_TOGGLE""
05-19T11:39:19,30,"""Reducer action", "NAV_BACK""
05-19T11:39:17,30,"""Reducer action", "NAV_GO, Search""
05-19T11:39:11,30,"""Reducer action", "SIDE_MENU_CLOSE""
05-19T11:39:10,30,"""Reducer action", "SIDE_MENU_OPEN""
05-19T11:39:08,30,"""Reducer action", "FOLDER_UPDATE_ALL""
05-19T11:39:08,30,"""Reducer action", "SYNC_COMPLETED""
05-19T11:39:08,20,"""There was some errors:""
05-19T11:39:08,20,"""Error: Error: Attempt to get length of null array. Path: /storage/emulated/0/phone-sync/joplin
Code: EUNSPECIFIED
[email protected]:895:380
index.android.bundle:895:2170
[email protected]:63:3834
index.android.bundle:63:4873
index.android.bundle:63:4016
[email protected]:63:3834
[email protected]:63:4066
index.android.bundle:63:4244
[email protected]:61:151
index.android.bundle:61:878
index.android.bundle:25:1787
[email protected]:25:643
[email protected]:25:1007
[email protected]:25:3188
[email protected]:20:3183
index.android.bundle:20:1516
[email protected]:20:3009
[email protected]:20:1486
[native code]
[email protected]:20:1421
[native code]""
05-19T11:39:08,30,"""Total notes: 0""
05-19T11:39:08,30,"""Total resources: 0""
05-19T11:39:08,30,"""Total folders: 0""
05-19T11:39:08,30,"""Operations completed: ""
05-19T11:39:08,10,"""Error: Error: Attempt to get length of null array. Path: /storage/emulated/0/phone-sync/joplin
Code: EUNSPECIFIED
[email protected]:895:380
index.android.bundle:895:2170
[email protected]:63:3834
index.android.bundle:63:4873
index.android.bundle:63:4016
[email protected]:63:3834
[email protected]:63:4066
index.android.bundle:63:4244
[email protected]:61:151
index.android.bundle:61:878
index.android.bundle:25:1787
[email protected]:25:643
[email protected]:25:1007
[email protected]:25:3188
[email protected]:20:3183
index.android.bundle:20:1516
[email protected]:20:3009
[email protected]:20:1486
[native code]
[email protected]:20:1421
[native code]""
05-19T11:39:08,30,"""Reducer action", "SYNC_STARTED""
05-19T11:39:08,30,"""Starting scheduled sync""
05-19T11:39:08,30,"""Preparing scheduled sync""
05-19T11:39:08,30,"""Scheduling sync operation...""
05-19T11:39:07,30,"""Reducer action", "SIDE_MENU_OPEN""
05-19T11:39:07,30,"""Reducer action", "SIDE_MENU_TOGGLE""
05-19T11:39:04,30,"""Reducer action", "NAV_BACK""
05-19T11:39:01,30,"""Reducer action", "NAV_GO, Search""
05-19T11:39:00,30,"""Reducer action", "SIDE_MENU_CLOSE""
05-19T11:38:57,30,"""Settings have been saved.""
05-19T11:38:57,30,"""Saving settings...""
05-19T11:38:57,30,"""Reducer action", "FOLDER_UPDATE_ALL""
05-19T11:38:57,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:38:57,30,"""Reducer action", "SYNC_COMPLETED""
05-19T11:38:57,20,"""Error: Error: Attempt to get length of null array. Path: /storage/emulated/0/phone-sync/joplin
Code: EUNSPECIFIED
[email protected]:895:380
index.android.bundle:895:2170
[email protected]:63:3834
index.android.bundle:63:4873
index.android.bundle:63:4016
[email protected]:63:3834
[email protected]:63:4066
index.android.bundle:63:4244
[email protected]:61:151
index.android.bundle:61:878
index.android.bundle:25:1787
[email protected]:25:643
[email protected]:25:1007
[email protected]:25:3188
[email protected]:20:3183
index.android.bundle:20:1516
[email protected]:20:3009
[email protected]:20:1486
[native code]
[email protected]:20:1421
[native code]""
05-19T11:38:57,30,"""Total resources: 0""
05-19T11:38:57,20,"""There was some errors:""
05-19T11:38:57,30,"""Total folders: 0""
05-19T11:38:57,30,"""Total notes: 0""
05-19T11:38:57,30,"""Operations completed: ""
05-19T11:38:57,10,"""Error: Error: Attempt to get length of null array. Path: /storage/emulated/0/phone-sync/joplin
Code: EUNSPECIFIED
[email protected]:895:380
index.android.bundle:895:2170
[email protected]:63:3834
index.android.bundle:63:4873
index.android.bundle:63:4016
[email protected]:63:3834
[email protected]:63:4066
index.android.bundle:63:4244
[email protected]:61:151
index.android.bundle:61:878
index.android.bundle:25:1787
[email protected]:25:643
[email protected]:25:1007
[email protected]:25:3188
[email protected]:20:3183
index.android.bundle:20:1516
[email protected]:20:3009
[email protected]:20:1486
[native code]
[email protected]:20:1421
[native code]""
05-19T11:38:56,30,"""Reducer action", "SYNC_STARTED""
05-19T11:38:56,30,"""Starting scheduled sync""
05-19T11:38:56,30,"""Preparing scheduled sync""
05-19T11:38:56,30,"""Scheduling sync operation...""
05-19T11:38:55,30,"""Reducer action", "SIDE_MENU_OPEN""
05-19T11:38:55,30,"""Reducer action", "SIDE_MENU_TOGGLE""
05-19T11:38:55,30,"""Reducer action", "NAV_BACK""
05-19T11:38:54,30,"""Settings have been saved.""
05-19T11:38:54,30,"""Saving settings...""
05-19T11:38:54,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:38:54,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:38:54,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:38:54,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:37:42,30,"""ResourceService::deleteOrphanResources:", "[]""
05-19T11:37:42,30,"""ResourceService::indexNoteResources: Completed""
05-19T11:37:42,30,"""ResourceService::indexNoteResources: Start""
05-19T11:37:23,30,"""DecryptionWorker: completed decryption.""
05-19T11:37:23,30,"""DecryptionWorker: starting decryption...""
05-19T11:37:22,30,"""Settings have been saved.""
05-19T11:37:22,30,"""Saving settings...""
05-19T11:37:22,30,"""Garbage collecting alarms...""
05-19T11:37:22,30,"""Updading all notifications...""
05-19T11:37:22,30,"""Synchroniser is missing credentials - manual sync required to authenticate.""
05-19T11:37:22,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:37:22,30,"""Saving updated OneDrive auth.""
05-19T11:37:22,30,"""Preparing scheduled sync""
05-19T11:37:17,30,"""Reducer action", "NAV_GO, Config""
05-19T11:37:13,30,"""DecryptionWorker: completed decryption.""
05-19T11:37:13,30,"""DecryptionWorker: starting decryption...""
05-19T11:37:12,30,"""Settings have been saved.""
05-19T11:37:12,30,"""Saving settings...""
05-19T11:37:12,30,"""Reducer action", "APP_STATE_SET""
05-19T11:37:12,30,"""Application initialized""
05-19T11:37:12,30,"""Scheduling sync operation...""
05-19T11:37:12,30,"""Reducer action", "NAV_GO, Welcome""
05-19T11:37:12,30,"""Reducer action", "FOLDER_SET_COLLAPSED_ALL""
05-19T11:37:12,30,"""Reducer action", "MASTERKEY_UPDATE_ALL""
05-19T11:37:12,30,"""Reducer action", "TAG_UPDATE_ALL""
05-19T11:37:12,30,"""Reducer action", "FOLDER_UPDATE_ALL""
05-19T11:37:12,30,"""Loading folders...""
05-19T11:37:12,30,"""Loaded master keys: 0""
05-19T11:37:12,30,"""Trying to load 0 master keys...""
05-19T11:37:12,30,"""Scheduling sync operation...""
05-19T11:37:12,30,"""Reducer action", "MASTERKEY_REMOVE_NOT_LOADED""
05-19T11:37:12,30,"""Loaded master keys: 0""
05-19T11:37:12,30,"""Trying to load 0 master keys...""
05-19T11:37:12,30,"""Sync target: 7""
05-19T11:37:12,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:37:12,30,"""Reducer action", "SETTING_UPDATE_ONE""
05-19T11:37:12,30,"""Reducer action", "SETTING_UPDATE_ALL""
05-19T11:37:11,30,"""Loading settings...""
05-19T11:37:11,30,"""Database is ready.""
05-19T11:37:10,30,"""Initializing tables...""
05-19T11:37:10,30,"""Converting database to version 12""
05-19T11:37:10,30,"""Converting database to version 11""
05-19T11:37:10,30,"""Converting database to version 10""
05-19T11:37:10,30,"""Converting database to version 9""
05-19T11:37:10,30,"""Converting database to version 8""
05-19T11:37:10,30,"""Converting database to version 7""
05-19T11:37:10,30,"""Converting database to version 6""
05-19T11:37:09,30,"""Converting database to version 5""
05-19T11:37:09,30,"""Converting database to version 4""
05-19T11:37:09,30,"""Converting database to version 3""
05-19T11:37:09,30,"""Converting database to version 2""
05-19T11:37:09,30,"""Converting database to version 1""
05-19T11:37:09,30,"""Current database version", "0""
05-19T11:37:09,30,"""Checking for database schema update...""
05-19T11:37:09,30,"""Database was open successfully""
05-19T11:37:09,30,"""Starting application net.cozic.joplin-mobile (prod)""
05-19T11:37:09,30,"""====================================""
================================================================================
type,id,updated_time,sync_time,is_conflict
@laurent22 laurent22 added the bug It's a bug label May 19, 2018
@laurent22
Copy link
Owner

Is that with OneDrive? And if so is it regular OneDrive or OneDrive for Business?

@technicalguy
Copy link
Author

This is with File System sync, path set to /storage/emulated/0/phone-sync/joplin, the directory does exist.

@laurent22
Copy link
Owner

I think this error happens when the app doesn't have permissions to read/write the local storage. Could you check and see if the "Storage" permission is granted? It's in App > Joplin > Permissions

@technicalguy
Copy link
Author

Yes!

  1. Attempt to sync
  2. Error: Attempt to get length of null array. Path: /storage/emulated/0/phone-sync/joplin
  3. Settings > Apps > Joplin > Permissions > Storage (allow)
  4. Sync works perfectly

So I guess there should be a way to check if the app has storage permissions and prompt the user for permission if it does not?

@laurent22
Copy link
Owner

So I guess there should be a way to check if the app has storage permissions and prompt the user for permission if it does not?

Ideally yes, but the API to do that in React Native is buggy at the moment, so maybe some other time. For now, I have added a message about it in the config screen.

@lock lock bot locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

2 participants