Android: Sharing via other apps cause crash

Created on 21 Apr 2016  路  5Comments  路  Source: owncloud/android

The latest beta version crashes when trying to share files from other apps. In the previous version sharing did not seem to work. By sharing I mean sending files from other apps to OWncloud app for uploading. I am not sure if this is not a supported feature at all.

Expected behaviour

Tell us what should happen
WHen I share an image or a file to upload from another app, I expect it to upload to the selected folder

Actual behaviour

Tell us what happens instead
Owncloud crashes when a file is sent to OC app via share menu from other apps

Steps to reproduce

  1. select an image from gallery in gallery app
  2. share it with Owncloud
  3. 3.

Can this problem be reproduced with the official owncloud server?
(url: https://demo.owncloud.org, user: test, password: test)
No idea

Environment data

Android version:

Device model:

Stock or customized system:

ownCloud app version:
beta-20160419

ownCloud server version:
ownCloud 8.2.2 (stable)

Logs

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.owncloud.android.beta/com.owncloud.android.ui.activity.Uploader}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:198)
at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:99)
at com.owncloud.android.ui.activity.ToolbarActivity.setupToolbar(ToolbarActivity.java:52)
at com.owncloud.android.ui.activity.Uploader.populateDirectoryList(Uploader.java:433)
at com.owncloud.android.ui.activity.Uploader.onAccountSet(Uploader.java:201)
at com.owncloud.android.ui.activity.BaseActivity.onStart(BaseActivity.java:189)
at com.owncloud.android.ui.activity.FileActivity.onStart(FileActivity.java:173)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1265)
at android.app.Activity.performStart(Activity.java:6915)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)
... 9 more

*** DEVICE INFORMATION **
Brand: samsung
Model: SAMSUNG-SM-G930A

Beta bug

Most helpful comment

Yes that is related to beta and my toolbar refactoring. I'll take care of it on the weekend! :+1:
Sorry for the inconvenience!
Fix to be done for #1559 / beta

All 5 comments

@AndyScherzinger this is ActionBar AppCompat related.
Can you have a look, please? :)

Yes that is related to beta and my toolbar refactoring. I'll take care of it on the weekend! :+1:
Sorry for the inconvenience!
Fix to be done for #1559 / beta

I'm just starting with owncloud and also hit this issue, looking forward to your fix @AndyScherzinger, thanks a lot !

@tobiasKaminsky and @strk I pushed a fix to the repo: https://github.com/owncloud/android/commit/be52cd79728ba335a41adca4ed2a06c092933c96

So this will be fixed with the next beta release :)

I missed this in the beta merge, the bug isn't present on the feature branch itself.

will be in next beta

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesmrec picture jesmrec  路  7Comments

davivel picture davivel  路  4Comments

lefherz picture lefherz  路  6Comments

Emil-G picture Emil-G  路  7Comments

sd1998 picture sd1998  路  6Comments