theSoenke / Paperwork-Android

[Not Maintained] Paperwork App for Android
MIT License
67 stars 8 forks source link

Fatal Exception while loading/refreshing notes #8

Closed tobiasneidig closed 9 years ago

tobiasneidig commented 9 years ago

Tested on Android 5.1 and 6.0 (dev. preview). The app dies while loading/refreshing the notes by pulling down the main view.

FATAL EXCEPTION: SyncAdapterThread-2
Process: rocks.paperwork.android, PID: 11753
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
    at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6556)
    at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:942)
    at android.view.ViewGroup.invalidateChild(ViewGroup.java:5081)
    at android.view.View.invalidateInternal(View.java:12713)
    at android.view.View.invalidate(View.java:12677)
    at android.view.View.invalidateParentIfNeeded(View.java:12866)
    at android.view.View.clearAnimation(View.java:19115)
    at android.support.v4.widget.SwipeRefreshLayout.startScaleDownAnimation(SwipeRefreshLayout.java:416)
    at android.support.v4.widget.SwipeRefreshLayout.setRefreshing(SwipeRefreshLayout.java:402)
    at android.support.v4.widget.SwipeRefreshLayout.setRefreshing(SwipeRefreshLayout.java:355)
    at rocks.paperwork.android.sync.SyncAdapter.onPerformSync(SyncAdapter.java:148)
    at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
daeavelwyn commented 9 years ago

Is your server side configuration right ? Can you connect from a desktop browser ?I got this issue while I tried to connect on port 80 and haven't the right apache virtualhost enabled.

theSoenke commented 9 years ago

@saibot2013 I was not able to reproduce this exception, but i changed a few things which should prevent this from happening in every case