Android: [3.5.0 RC1] Loading of activities fails and an "Unexpected exception" is displayed

Created on 30 Jan 2019  路  25Comments  路  Source: nextcloud/android

Actual behavior

If you select the Activities tab a spinning wheel is shown for a moment and after some time an "Unexpected exception" message is shown on the screen.

Expected behavior

Load and display all available activities.

Steps to reproduce

  1. Open the Nextcloud app and select the Activities tab.
    -> An "Unexpected exception" is displayed.

Environment data

Android version: 8.0
Device model: Samsung Galaxy S7
Stock or customized system: Stock ROM
Nextcloud app version: 3.5.0 RC1
Nextcloud server version: 15.0.2

bug release candidate

Most helpful comment

Activities are back. :)

All 25 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/android/pull/3509 (3.5.0 RC1), https://github.com/nextcloud/android/pull/3310 (3.4.0 RC1), https://github.com/nextcloud/android/issues/2295 (0), https://github.com/nextcloud/android/issues/2968 ([3.3.0 RC1] Unlock with fingerprint not available), and https://github.com/nextcloud/android/pull/3519 ([stable-3.5] Fail if findbugs increased).

@tobiasKaminsky I can't reproduce this with the latest master which should be quite close to 3.5.0RC1 also running Nc15, Android 9.

I can confirm the Bug. I have a tablet, nextcloud installed with two Accounts. One is listing activities, other not but displaying Unexpected Exception.

  • [ ]

Can anybody experiencing this exception provide a stack trace or rather a logcat so we can find out what is actually causes this? :)

May not be relevant, but upon getting the update, it seems as if this is what I got as well.
I was getting SSL exception, and I tried a few things and I couldn't access the data on my server I knew where recently added. There was no "No internet Connection" dialog on top of the display, however, I couldn't see the quota on the menu setting area either.
I don't remember exactly what fixed it, but I closed Nextcloud app and restarted the phone. Either case, I was able to regain access to the server.

@AndyScherzinger Where has the trace function gone within the Nextcloud app? Unfortunately I haven't got a rooted phone to provide reliable logs. It might be of interest that the following lines are logged on my server if I access the activities tab on my phone:

..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/jquery-ui-fixes.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/server.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/css-variables.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/apps\/firstrunwizard\/css\/firstrunwizard.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/jquery.ocdialog.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/search\/css\/results.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/jquery-ui-fixes.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/server.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/css-variables.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/apps\/firstrunwizard\/css\/firstrunwizard.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/css\/jquery.ocdialog.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}
..,"user":"--","app":"core","method":"GET","url":"\/index.php\/avatar\/nctest\/384","message":"Scss is disabled for \/srv\/www\/nextcloud\/nextcloud\/core\/search\/css\/results.scss, ignoring","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.5.0 RC1","version":"15.0.2.0"}

Can you create us a test account, test if the problem occurs also there and if so send the credentials to tobias at nextcloud dot com with a reference to this issue?

@AndyScherzinger Where has the trace function gone within the Nextcloud app?

Logger will be enabled again for every RC version from now on.
Keeps disabled on final release.

@tobiasKaminsky I've just create a test account and checked the activities tab. Unfortunately I couldn't reproduce the problem with the newly created account. I think I have to wait for the next RC.

@tobiasKaminsky I've just installed Nextcloud on a different phone. If I use the same account which has the problem on that phone, it is instantly displayed too. So if you would send my an app version with the logger enabled, I could install it and try to fetch the information you need to get hold of the problem.

I "fear" that there is something in the activity that cannot be parsed and thus it just shows nothing. On a fresh account this then will not happen.
3.5.0RC2 will have logger enabled and will be available today.

Do you see any special activities when browsing on web?

I cannot find any "special" activities. There are e.g.

  • Calendar update change activities.
  • Document change activities.
  • File move activities.
  • Calendar event deletion activities.
    etc.

I think we have to wait for the RC2 app release.

2019/02/02 09:00:53
GetActivitiesRemoteOperation: Exception while getting remote activities Exception: [com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226), com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41), com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82), com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61), com.google.gson.Gson.fromJson(Gson.java:927), com.google.gson.Gson.fromJson(Gson.java:994), com.owncloud.android.lib.resources.activities.GetActivitiesRemoteOperation.parseResult(GetActivitiesRemoteOperation.java:197), com.owncloud.android.lib.resources.activities.GetActivitiesRemoteOperation.run(GetActivitiesRemoteOperation.java:154), com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:145), com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:149), com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApiImpl$GetActivityListTask.doInBackground(ActivitiesServiceApiImpl.java:87), com.owncloud.android.ui.activities.data.activities.ActivitiesServiceApiImpl$GetActivityListTask.doInBackground(ActivitiesServiceApiImpl.java:56), android.os.AsyncTask$2.call(AsyncTask.java:316), java.util.concurrent.FutureTask.run(FutureTask.java:237), android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607), java.lang.Thread.run(Thread.java:776)]

2019/02/02 09:00:53
ActivitiesServiceApiImpl: Unexpected exception

2019/02/02 09:00:57
ActivitiesActivity: onPause() ending

2019/02/02 09:00:57
BaseActivity: onNewIntent() start

2019/02/02 09:00:57
BaseActivity: onNewIntent() stop

2019/02/02 09:00:57
FileDisplayActivity: Unexpected intent Intent { flg=0x4000000 cmp=com.nextcloud.client/com.owncloud.android.ui.activity.FileDisplayActivity }

2019/02/02 09:00:57
BaseActivity: onRestart() start

The json of the activities seems to look ok on the first view. But it's not small.

@ne20002 according to your stack trace there is indeed an issue parsing your activities jason :/

I've sent my log trace to Tobias by email.

According to nglint the JSON is ok. I can't send the JSON without requesting permission as it is the account of a friend.
Btw, there has been no error with 3.4.0 and the list of activities has not changed these days.

I've sent my log trace to Tobias by email.

Hm. I did not received a mail. Can you send it again tobias at nextcloud dot com with a reference to this issue?

According to nglint the JSON is ok

While technically the json might be ok, it still can happen that parsing is not working, e.g. if you expect to have "name" as a string, but instead you have "name: ,", then it crashes.

However I thought that I did some enhancements so that only the failing activity is not shown, but in your cases no activity at all is shown :/

@tobiasKaminsky I've resent the email.

Exception occurs on a second account.
@Tobias, do you need another JSON?

It is fixed on server side via https://github.com/nextcloud/activity/pull/346 and on Android side via https://github.com/nextcloud/android-library/pull/236

@ne20002 can you maybe try out our dev version, there the fix should be included by tomorrow (version >= 20190703)

It will also be in next version (3.5.0) via new library 1.3.1.

Activities are back. :)

Thanks for reporting back!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  路  3Comments

ThaDaVos picture ThaDaVos  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

daywalk3r666 picture daywalk3r666  路  3Comments

Tie-fighter picture Tie-fighter  路  3Comments