android icon indicating copy to clipboard operation
android copied to clipboard

Unable to share files

Open mcastroSG opened this issue 10 years ago • 11 comments

Actual behaviour

  • After select share option on a file or folder , we are not able to find any user to share. Does not matter local users or fed share.

Expected behaviour

  • After select share option on a file or folder, we should be able to find users and share the item with them.

Steps to reproduce

  1. Long touch on a file or folder
  2. Select Share option
  3. Type a user or user@remote

Can this problem be reproduced with the official owncloud server? yes

Environment data

Android version: 5.0.1

Device model: Nexus 5

ownCloud app version: 2.0.1

ownCloud server version: 9.1.0 RC1

Logs

07-07 08:47:20.636 29948-30634/com.owncloud.android E/ActivityThread: Failed to find provider info for com.owncloud.android.providers.UsersAndGroupsSearchProvider


BUGS & IMPROVEMENTS

  • [ ] No results returned https://github.com/owncloud/android/issues/1734#issuecomment-235635822 [READY_TO_TEST]

mcastroSG avatar Jul 07 '16 07:07 mcastroSG

I have the same issue with the same log on android version: 6.0 App version: 2.01 owncloud server: 8.2

togglecode avatar Jul 08 '16 14:07 togglecode

Ooooh, right. Probably because of #1735 . Makes sense.

I'll go for this ASAP.

davivel avatar Jul 13 '16 16:07 davivel

Wait, no... but that shouldn't happen with 2.0.1 version...

davivel avatar Jul 13 '16 16:07 davivel

@davivel I changed the android:authorities=".providers.UsersAndGroupsSearchProvider" to android:authorities="com.owncloud.android.providers.UsersAndGroupsSearchProvider" in the manifestand it's working for me now.

togglecode avatar Jul 13 '16 17:07 togglecode

Thanks, @payam-huemer , I expected that. I was doubting because the 2.0.1 version in Play Store should have the full authority string. I guess you built the app by yourself, right?

davivel avatar Jul 14 '16 08:07 davivel

@davivel Yes, I am building it myself based on the master branch.

togglecode avatar Jul 14 '16 18:07 togglecode

@davivel

When i try to search for users, no result is returned. This stack trace is output:

07-27 17:49:05.398 19776-21835/com.owncloud.android W/SuggestionsAdapter: Search suggestions query threw an exception. java.lang.NullPointerException at com.owncloud.android.providers.UsersAndGroupsSearchProvider.query(UsersAndGroupsSearchProvider.java:157) at android.content.ContentProvider.query(ContentProvider.java:857) at android.content.ContentProvider$Transport.query(ContentProvider.java:200) at android.content.ContentResolver.query(ContentResolver.java:461) at android.content.ContentResolver.query(ContentResolver.java:404) at android.support.v7.widget.SuggestionsAdapter.getSearchManagerSuggestions(SuggestionsAdapter.java:754) at android.support.v7.widget.SuggestionsAdapter.runQueryOnBackgroundThread(SuggestionsAdapter.java:157) at android.support.v4.widget.CursorFilter.performFiltering(CursorFilter.java:50) at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.os.HandlerThread.run(HandlerThread.java:61)

Branch customizable_users_search_provder Tested with MotoE v4.4. Nexus5 v5.0.1 Server 9.1

jesmrec avatar Jul 27 '16 16:07 jesmrec

Bug on the bug; I'll check it tomorrow.

davivel avatar Jul 27 '16 16:07 davivel

Instant Run is breaking the initialization.

07-28 09:14:39.357 8849-8849/com.owncloud.android E/TAG: Fail creating provider
                                                         java.lang.ClassCastException: com.android.tools.fd.runtime.BootstrapApplication cannot be cast to com.owncloud.android.MainApp
                                                             at com.owncloud.android.providers.UsersAndGroupsSearchProvider.onCreate(UsersAndGroupsSearchProvider.java:112)
...

I'll rewrite so that it works with or without it

davivel avatar Jul 28 '16 07:07 davivel

@jesmrec , bug ready to test.

davivel avatar Jul 28 '16 07:07 davivel

Approved in PR #1749

cc @davivel

jesmrec avatar Jul 28 '16 11:07 jesmrec