Closed white-gecko closed 8 years ago
Damn sorry... Do you have any information for me to try debugging? What's your phone? OS version? What was the last version of the app you had? Thanks for your help!
I'm on Android 5.1, Motorola Moto G. The last Version of PhotoBackup I had before the update, was 0.6.5 (F-Droid).
This should be the relevant log output:
E/AndroidRuntime(13399): FATAL EXCEPTION: main
E/AndroidRuntime(13399): Process: fr.s13d.photobackup, PID: 13399
E/AndroidRuntime(13399): java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.s13d.photobackup/fr.s13d.photobackup.PBActivity}: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
E/AndroidRuntime(13399): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
E/AndroidRuntime(13399): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
E/AndroidRuntime(13399): at android.app.ActivityThread.access$800(ActivityThread.java:155)
E/AndroidRuntime(13399): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
E/AndroidRuntime(13399): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(13399): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(13399): at android.app.ActivityThread.main(ActivityThread.java:5343)
E/AndroidRuntime(13399): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(13399): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(13399): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
E/AndroidRuntime(13399): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
E/AndroidRuntime(13399): Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
E/AndroidRuntime(13399): at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:223)
E/AndroidRuntime(13399): at android.preference.Preference.getPersistedString(Preference.java:1460)
E/AndroidRuntime(13399): at android.preference.ListPreference.onSetInitialValue(ListPreference.java:294)
E/AndroidRuntime(13399): at android.preference.Preference.dispatchSetInitialValue(Preference.java:1376)
E/AndroidRuntime(13399): at android.preference.Preference.onAttachedToHierarchy(Preference.java:1171)
E/AndroidRuntime(13399): at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:167)
E/AndroidRuntime(13399): at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:108)
E/AndroidRuntime(13399): at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:45)
E/AndroidRuntime(13399): at android.preference.GenericInflater.rInflate(GenericInflater.java:488)
E/AndroidRuntime(13399): at android.preference.GenericInflater.inflate(GenericInflater.java:326)
E/AndroidRuntime(13399): at android.preference.GenericInflater.inflate(GenericInflater.java:263)
E/AndroidRuntime(13399): at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:272)
E/AndroidRuntime(13399): at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:299)
E/AndroidRuntime(13399): at fr.s13d.photobackup.PBSettingsFragment.onCreate(PBSettingsFragment.java:121)
E/AndroidRuntime(13399): at android.app.Fragment.performCreate(Fragment.java:2031)
E/AndroidRuntime(13399): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:863)
E/AndroidRuntime(13399): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
E/AndroidRuntime(13399): at android.app.BackStackRecord.run(BackStackRecord.java:834)
E/AndroidRuntime(13399): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1454)
E/AndroidRuntime(13399): at android.app.Activity.performStart(Activity.java:6025)
E/AndroidRuntime(13399): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
E/AndroidRuntime(13399): ... 10 more
Please try version 0.7.1 that attempts to fix this bug. I couldn't really validate it properly, so I'll wait your feedback to close the bug. See 2080fc071357a496f7e2209028773557f8491bb1
Could you pleas provide me an .apk for testing? It should be possible that you add it here: https://github.com/PhotoBackup/client-android and mark it as "prerelease"
Hm sorry, this one can't be installed, it fails with:
W/InstallAppProgress( 9548): Replacing package:fr.s13d.photobackup
W/PackageManager( 820): Package fr.s13d.photobackup signatures do not match the previously installed version; ignoring!
D/InstallAppProgress( 9548): Installation error code: -7
I got the 0.6.5 before from the F-Droid store, don't know if you use the same key for everything.
Damn, I shouldn't put a signed APK for a prerelase, probably... Sorry for that, I'll put a debug-compiled APK tonight.
I added a debug APK for you.
I took the one from F-Droid now, but still fails. I'll see if a get a logcat tomorrow.
It still crashes and its still more or less the same debug output:
D/AndroidRuntime(29135): Shutting down VM
E/AndroidRuntime(29135): FATAL EXCEPTION: main
E/AndroidRuntime(29135): Process: fr.s13d.photobackup, PID: 29135
E/AndroidRuntime(29135): java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.s13d.photobackup/fr.s13d.photobackup.PBActivity}: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
E/AndroidRuntime(29135): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
E/AndroidRuntime(29135): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
E/AndroidRuntime(29135): at android.app.ActivityThread.access$800(ActivityThread.java:155)
E/AndroidRuntime(29135): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
E/AndroidRuntime(29135): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(29135): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(29135): at android.app.ActivityThread.main(ActivityThread.java:5343)
E/AndroidRuntime(29135): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29135): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(29135): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
E/AndroidRuntime(29135): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
E/AndroidRuntime(29135): Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
E/AndroidRuntime(29135): at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:223)
E/AndroidRuntime(29135): at android.preference.Preference.getPersistedString(Preference.java:1460)
E/AndroidRuntime(29135): at android.preference.ListPreference.onSetInitialValue(ListPreference.java:294)
E/AndroidRuntime(29135): at android.preference.Preference.dispatchSetInitialValue(Preference.java:1376)
E/AndroidRuntime(29135): at android.preference.Preference.onAttachedToHierarchy(Preference.java:1171)
E/AndroidRuntime(29135): at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:167)
E/AndroidRuntime(29135): at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:108)
E/AndroidRuntime(29135): at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:45)
E/AndroidRuntime(29135): at android.preference.GenericInflater.rInflate(GenericInflater.java:488)
E/AndroidRuntime(29135): at android.preference.GenericInflater.inflate(GenericInflater.java:326)
E/AndroidRuntime(29135): at android.preference.GenericInflater.inflate(GenericInflater.java:263)
E/AndroidRuntime(29135): at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:272)
E/AndroidRuntime(29135): at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:299)
E/AndroidRuntime(29135): at fr.s13d.photobackup.PBSettingsFragment.onCreate(PBSettingsFragment.java:123)
E/AndroidRuntime(29135): at android.app.Fragment.performCreate(Fragment.java:2031)
E/AndroidRuntime(29135): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:863)
E/AndroidRuntime(29135): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
E/AndroidRuntime(29135): at android.app.BackStackRecord.run(BackStackRecord.java:834)
E/AndroidRuntime(29135): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1454)
E/AndroidRuntime(29135): at android.app.Activity.performStart(Activity.java:6025)
E/AndroidRuntime(29135): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
E/AndroidRuntime(29135): ... 10 more
W/ActivityManager( 820): Force finishing activity 1 fr.s13d.photobackup/.PBActivity
As it says the problem is caused here in the code: https://github.com/PhotoBackup/client-android/blob/master/src/fr/s13d/photobackup/PBSettingsFragment.java#L123, which I guess is related to some boolean, which should be a String in this document: https://github.com/PhotoBackup/client-android/blob/master/res/xml/preferences.xml
Maybe it was this change, because the stack trace also says "ListPreference.java:294": https://github.com/PhotoBackup/client-android/commit/ac3f9285095bd2e404f21567d4659e3dd2979811#diff-3
Ok, I added the fix too late in the activity process. Can you please try the new PhotoBackup-0.7.1-debug.apk file at https://github.com/PhotoBackup/client-android/releases/tag/v0.7.1 Thanks and sorry for all this.
Sorry for all the hassle, I'm getting the signature error again …
I am also getting a crash on startup on 0.7.1 from f-droid. I'm not sure how to provide more info from that, and the debug apk will not install over the top.
Ok guys, really sorry for this. I wanted to simplify code on my end but got stuck with this bug.... The easy fix is to uninstall and reinstall the app to the last version. You will lose your configuration though... You won't have to reupload everything with the new option to only upload new photos, but you'll lose the upload journal history. Will try to get it tested and fixed properly as soon as I find the time...
No worries, its just that I thought, I might be able to help by reporting this issue. But there is no pressure for me, that it is fixed to soon … :-)
Thank you anyways so far
It's always useful to report issues, I'll always thank you for it :+1:
I think I'll go for the reinstall workaround. Thanks for being so responsive! On 5 Dec 2015 1:12 am, "Stéphane Péchard" notifications@github.com wrote:
It's always useful to report issues, I'll always thank you for it [image: :+1:]
— Reply to this email directly or view it on GitHub https://github.com/PhotoBackup/client-android/issues/11#issuecomment-161977216 .
This is strange. I managed to get the same bug (same output, same cause I identified) between version 0.6.5 and 0.7.0, but my last version (the debug apk I put in the release draft) corrects it. I will release this as the 0.7.2 and close this bug.
Fixed in version 0.7.2.
The 0.7 version crashes at start up since the update.