nerzhul / ncsms-android

repository for the ncsms on Android
95 stars 38 forks source link

crash on sync #57

Closed DJaeger closed 9 years ago

DJaeger commented 9 years ago

The app/service crashes on sync when using a design with app icons.

You could try for example with "Onze".

I think the most relevant part of the log is:

W/StatusBarIconView( 1192): No icon for slot fr.unix_experience.owncloud_sms/0x0

The full log:

E/AccessibilityNodeInfoCache( 1693): Node from: 201 not from:190 android.view.accessibility.AccessibilityNodeInfo@1780e; boundsInParent: Rect(0, 0 - 446, 73); boundsInScreen: Rect(72, 542 - 518, 615); packageName: fr.unix_experience.owncloud_sms; className: android.widget.TextView; text: Allg. Einstellungen; contentDescription: null; viewIdResName: android:id/title; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_SET_SELECTION]
E/AccessibilityNodeInfoCache( 1693): Node from: 201 not from:190 android.view.accessibility.AccessibilityNodeInfo@17bcf; boundsInParent: Rect(0, 0 - 358, 57); boundsInScreen: Rect(72, 615 - 430, 672); packageName: fr.unix_experience.owncloud_sms; className: android.widget.TextView; text: Sync-Einstellungen; contentDescription: null; viewIdResName: android:id/summary; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_SET_SELECTION]
E/AccessibilityNodeInfoCache( 1693): Node from: 201 not from:190 android.view.accessibility.AccessibilityNodeInfo@1b41e; boundsInParent: Rect(0, 0 - 984, 192); boundsInScreen: Rect(48, 511 - 1032, 703); packageName: fr.unix_experience.owncloud_sms; className: android.widget.LinearLayout; text: null; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: true; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_CLICK, ACTION_ACCESSIBILITY_FOCUS]
I/ActivityManager(  755): Start proc fr.unix_experience.owncloud_sms:sync for service fr.unix_experience.owncloud_sms/.sync_adapters.SmsSyncService: pid=4277 uid=10505 gids={50505, 3003}
D/ActivityThread( 4277): handleBindApplication:fr.unix_experience.owncloud_sms:sync
W/StatusBarIconView( 1192): No icon for slot fr.unix_experience.owncloud_sms/0x0
D/NotificationService(  755): onNotification error pkg=fr.unix_experience.owncloud_sms tag=null id=0; will crashApplication(uid=10505, pid=4277)
E/AndroidRuntime( 4277): Process: fr.unix_experience.owncloud_sms:sync, PID: 4277
E/AndroidRuntime( 4277): android.app.RemoteServiceException: Bad notification posted from package fr.unix_experience.owncloud_sms: Couldn't create icon: StatusBarIcon(pkg=fr.unix_experience.owncloud_smsuser=0 id=0x7f020057 level=0 visible=true num=0 )
D/NetworkUtils( 4277): Searching known-servers store at /data/data/fr.unix_experience.owncloud_sms/files/knownServers.bks
I/ActivityManager(  755): Process fr.unix_experience.owncloud_sms:sync (pid 4277) has died.
W/ActivityManager(  755): Scheduling restart of crashed service fr.unix_experience.owncloud_sms/.sync_adapters.SmsSyncService in 1000ms
nerzhul commented 9 years ago

What is your android version ?

DJaeger commented 9 years ago

Cyanogenmod 11 Android 4.4.4

nerzhul commented 9 years ago

Can you provide logcat logs ?

DJaeger commented 9 years ago

Currently I couldn't give you more logs. But I think, that these informations will help you: https://gitlab.com/xphnx/twelf_cm12_theme/issues/47

nerzhul commented 9 years ago

He replace the png icon with another icon. How can that fix the problem ?

DJaeger commented 9 years ago

He discovered that adding a proper (smaller, all-white) notification icon seems to fix crashing syncthing with themed icon. I don't know why, but it works. https://github.com/syncthing/syncthing-android/pull/332#issue-66275201

And for OSMonitor it seems to also work: https://github.com/eolwral/OSMonitor/issues/63 https://github.com/eolwral/OSMonitor/commit/e8482f6f16862b5706bb37c4198cda3ca8300e7b https://github.com/eolwral/OSMonitor/commit/af668a788fbcaa8fda9cc6c2865042124fab4dc8 https://github.com/eolwral/OSMonitor/commit/a2fb2c60e3e1ca5ab38e50663d303b45d09c519e

nerzhul commented 9 years ago

Thanks for the precisions, will look at this this week-end, but i cannot reproduce it easily.

nerzhul commented 9 years ago

Maybe the default ic_launcher can be overrided and can cause problems with apps. I can duplicate it then and release a new version

DJaeger commented 9 years ago

Thanks

nerzhul commented 9 years ago

It's merged now. The fix will be available on next google play store release. I don't know when i need to add one more functionality

ghost commented 9 years ago

Hi! I'm the mantainer of Onze/TwelF. I built Owncloud-SMS with the las commit and as I've tried tested the problem is fixed. Regards. PD: I can share the apk if needed.

nerzhul commented 9 years ago

@DJaeger can you confirm ? @xphnx thanks for your report

DJaeger commented 9 years ago

As I currently doesn't have a Android Development Environment ready to build, I would test, if you give me an APK. I'm currently only waiting for this fix to reenable Onze.

ghost commented 9 years ago

Here is an apk with the last commit. https://my.owndrive.com/public.php?service=files&t=0b2e115fbcd7c9581ee7ce3b2f5b2ae1

DJaeger commented 9 years ago

It works for me too. Thank you two.

P.S.: Is it expected, that there is no contact, when I choose my account from remote account, because not ready yet or should I open a new issue?

nerzhul commented 9 years ago

The remote account is not ready yet, it's empty atm because i need to develop it. But sssh, this is the next feature permitting to restore messages :p

This issue is fixed thanks @DJaeger for your help