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

Sync org crashes on folder selection #31

Open
sokolgeo opened this issue Jan 9, 2017 · 12 comments
Open

Sync org crashes on folder selection #31

sokolgeo opened this issue Jan 9, 2017 · 12 comments
Labels

Comments

@sokolgeo
Copy link

sokolgeo commented Jan 9, 2017

Hello. The latest version of the app (2.0.5.2) crashed on Replicate Android ROM (based on Android 4.2).

Crash always happens when you click "select directory". On another device with Android 4.4 ROM "select directory" does not lead to any problems, but with Replicant/Android 4.2 it is always app crash.

Hope it helps.

@sokolgeo sokolgeo changed the title Sync org crashed on folder selection Sync org crashes on folder selection Jan 9, 2017
@wizmer
Copy link
Owner

wizmer commented Jan 24, 2017

Hi. It may have something to do with the app permission. Check if all permissions are enabled for the app.

@wizmer wizmer added the bug label Jan 25, 2017
@r-darwish
Copy link

Happens to me as well. Storage permissions are turned on for the application

@sokolgeo
Copy link
Author

sokolgeo commented Jan 29, 2017

Just re-tested with latest 2.0.5.3 app version.

With cyanogenmod 11 still no problem with folder selection.

With Android 4.2.2 (Replicant build) - still app crashes when I either try choosing directory in setup wizard or just try clicking OK without selecting any folder.

On next app start after the crash - app opens main window (Todos and Agenda empty lists). But when I try creating/adding new org file by using bottom-left icon - name of newly added file appears in the list under Todos and Agenda for a second and then name of newly added file disappears from the Todos and Agenda list.

Under 4.2.2 I checked permissions as good as I could. Nothing special. App properties say the app has:

  • add or modify calendar events and send email to guests without owner;s knowledge
    read calendar events plus confidential information
  • modify or delete the content of your sd card
  • full network access
    view network connections
  • test access to protected storage

The apps permissions seem like usual.

Still the app crashes on folder selection and fails to add new file.

Anything special I can do to force enabling all permissions for this app?

@FHulot
Copy link

FHulot commented Feb 7, 2017

Have this problem as well using 2.0.5.3 on Lineage 7.1.1(Nougat) installed from F-Droid. Doesn't crash but directory is empty and get "Failed to create folder" when I try to create one. Can't proceed from there. The app does have permission to do this.

Could you please tell me what folder this is in? Can I go in with file manager and create a parent directory? Tried this in some likely candidates but the folders I create don't show up in the app.

Thanks for all your work. Looking forward to using syncorg!!

@FHulot
Copy link

FHulot commented Feb 11, 2017

So this might be a workaround...

Using a file manager, create a folder in your home directory on the internal SD. For example SyncOrg.

When setting up the parent folder, select "create folder" and create a subfolder to the one you just created using the file manager. Use the full path. Mine was

/storage/emulated/0/SyncOrg/foo

Use the back button to go back one directory level. "foo" will be listed, indicating that what you think is happening is really happening.

Click "select folder", making /storage/emulated/0/SyncOrg the parent folder.

Using this, I was able to connect to a git repo on a local computer via SSH and get all the org files.

So far I have been able to see changes I make on the computer appear on the phone, but not vice versa.

@knezi
Copy link

knezi commented Feb 17, 2017

You don't have to use a file manager. All you need to do is to create a directory /storage/emulated/0/SyncOrg in this app and then select.

@sokolgeo
Copy link
Author

Creation of

/storage/emulated/0/SyncOrg

made no difference. App still crashes of folder selection attempt. Strange?

@knezi
Copy link

knezi commented Mar 10, 2017

@sokolgeo it was a reply to FHulot that you don't need a file manager.
If I get it correctly, you see the list of folders, but when you click the button "SELECT FOLDER," it crashes, is that right?
If so, can you post the corresponding part of logcat?
Simply connect your mobile do ADB, run adb logcat and then let the SyncOrg crash. The first line should contain something like: START u0 {cmp=com.coste.syncorg/.gui.wizard.wizards.NoSyncWizard}

@drwebb
Copy link

drwebb commented Apr 3, 2017

I get the same error. Just for the record, I do not see a list of folders. I created a SyncOrg folder in my home directory. Haven't set up an SDK on this computer so can't get a logcat at the moment. Looking forward to trying out the app!

@adeleglise
Copy link

Hi, I'm encoutering this issue as well.

Can't select a folder. I've allowed syncorg to access SD card.

Android 7 on Huawei Mate 8.

@shanemd
Copy link

shanemd commented Jun 14, 2017

Hi all,

I'm also experiencing this error. As soon as I press the "parent folder" button I get "Unfortunately, SyncOrg has stopped."

Here's a logcat dump of the crash. Hopefully this helps.

I/ActivityManager(  375): START u0 {cmp=com.coste.syncorg/.directory_chooser.FolderPickerActivity} from pid 15977
I/dalvikvm(15977): Could not find method com.coste.syncorg.directory_chooser.FolderPickerActivity.getExternalFilesDirs, referenced from method com.coste.syncorg.directory_chooser.FolderPickerActivity.populateRoots
W/dalvikvm(15977): VFY: unable to resolve virtual method 21407: Lcom/coste/syncorg/directory_chooser/FolderPickerActivity;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File;
D/dalvikvm(15977): VFY: replacing opcode 0x6e at 0x000d
D/dalvikvm(15977): DexOpt: couldn't find static field Landroid/os/Environment;.DIRECTORY_DOCUMENTS
W/dalvikvm(15977): VFY: unable to resolve static field 108 (DIRECTORY_DOCUMENTS) in Landroid/os/Environment;
D/dalvikvm(15977): VFY: replacing opcode 0x62 at 0x0053
I/dalvikvm(15977): Could not find method com.coste.syncorg.directory_chooser.FolderPickerActivity.checkSelfPermission, referenced from method com.coste.syncorg.directory_chooser.FolderPickerActivity.onCreate
W/dalvikvm(15977): VFY: unable to resolve virtual method 21400: Lcom/coste/syncorg/directory_chooser/FolderPickerActivity;.checkSelfPermission (Ljava/lang/String;)I
D/dalvikvm(15977): VFY: replacing opcode 0x6e at 0x004f
D/AndroidRuntime(15977): Shutting down VM
W/dalvikvm(15977): threadid=1: thread exiting with uncaught exception (group=0x41905700)
E/AndroidRuntime(15977): FATAL EXCEPTION: main
E/AndroidRuntime(15977): java.lang.NoSuchFieldError: android.os.Environment.DIRECTORY_DOCUMENTS
E/AndroidRuntime(15977): 	at com.coste.syncorg.directory_chooser.FolderPickerActivity.populateRoots(FolderPickerActivity.java:134)
E/AndroidRuntime(15977): 	at com.coste.syncorg.directory_chooser.FolderPickerActivity.populateAndDisplay(FolderPickerActivity.java:108)
E/AndroidRuntime(15977): 	at com.coste.syncorg.directory_chooser.FolderPickerActivity.onCreate(FolderPickerActivity.java:103)
E/AndroidRuntime(15977): 	at android.app.Activity.performCreate(Activity.java:5133)
E/AndroidRuntime(15977): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime(15977): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
E/AndroidRuntime(15977): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime(15977): 	at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime(15977): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime(15977): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(15977): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(15977): 	at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime(15977): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(15977): 	at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime(15977): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime(15977): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(15977): 	at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm(15977): GC_CONCURRENT freed 195K, 3% free 10327K/10560K, paused 2ms+6ms, total 32ms
W/ActivityManager(  375):   Force finishing activity com.coste.syncorg/.directory_chooser.FolderPickerActivity
W/ActivityManager(  375):   Force finishing activity com.coste.syncorg/.gui.wizard.wizards.SSHWizard
W/ActivityManager(  375): Activity pause timeout for ActivityRecord{42b59de8 u0 com.coste.syncorg/.directory_chooser.FolderPickerActivity}
I/Process (15977): Sending signal. PID: 15977 SIG: 9
I/WindowState(  375): WIN DEATH: Window{429b30d8 u0 com.coste.syncorg/com.coste.syncorg.OrgNodeListActivity}
I/ActivityManager(  375): Process com.coste.syncorg (pid 15977) has died.
W/ActivityManager(  375): Service crashed 2 times, stopping: ServiceRecord{430e93d8 u0 com.coste.syncorg/.services.SyncService}
W/InputDispatcher(  375): channel '4329b530 com.coste.syncorg/com.coste.syncorg.gui.wizard.WizardActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  375): channel '4329b530 com.coste.syncorg/com.coste.syncorg.gui.wizard.WizardActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher(  375): Attempted to unregister already unregistered input channel '4329b530 com.coste.syncorg/com.coste.syncorg.gui.wizard.WizardActivity (server)'
I/WindowState(  375): WIN DEATH: Window{4329b530 u0 com.coste.syncorg/com.coste.syncorg.gui.wizard.WizardActivity}
I/WindowState(  375): WIN DEATH: Window{42afe760 u0 com.coste.syncorg/com.coste.syncorg.gui.wizard.WizardActivity}
I/WindowState(  375): WIN DEATH: Window{42a05fe0 u0 com.coste.syncorg/com.coste.syncorg.settings.SettingsActivity}
I/WindowState(  375): WIN DEATH: Window{430e0f30 u0 com.coste.syncorg/com.coste.syncorg.gui.wizard.wizards.SSHWizard}
I/ActivityManager(  375): Start proc com.coste.syncorg for activity com.coste.syncorg/.gui.wizard.WizardActivity: pid=16047 uid=10076 gids={50076, 3003, 1015, 1028}

I'm running Android 4.2 on a Galaxy Nexus.

EDIT: Also, I'm running SyncOrg 2.0.5.3 from F-Droid

@rdiaz02
Copy link

rdiaz02 commented May 15, 2018

For what is worth, with stock Android 7.1.2, and version 2.0.5.3 from the play store I get the exact same problem. (And apks for previous versions I cannot install: I am told they are corrupted).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants