Skip to content

Error when some apps try to share content #1529

Closed

Description

@jesmrec

Steps to reproduce

Some apps (at least Chrome, SpeedTest, List My Apps, FeedMe, GMail, Google+, Google Keep, Twitter, Moon+ Reader, GTasks) return an error when try to share with ownCloud (see attached)

Expected behaviour

No error

Actual behaviour

screenshot_20160317-101948

Environment data

Android version: 6

Device model: Nexus 5

Stock or customized system:

ownCloud app version: 1.9.1

ownCloud server version: 9

03-17 10:34:01.307 21861-21861/com.owncloud.android D/Uploader: onCreate(Bundle) starting
03-17 10:34:01.351 21861-21861/com.owncloud.android D/Uploader: onStart() starting
03-17 10:34:01.384 21861-21861/com.owncloud.android D/Uploader: Populating view with content of : /
03-17 10:34:01.397 21861-21861/com.owncloud.android D/Uploader: onResume() starting
03-17 10:34:01.479 21861-21861/com.owncloud.android D/cache_test_DISK_: image read from disk 84612081
03-17 10:34:01.487 21861-21861/com.owncloud.android D/FileActivity: Operations service connected
03-17 10:34:18.468 21861-21901/com.owncloud.android E/Surface: getSlotFromBufferLocked: unknown buffer: 0x9e687910

Activity

  1. jesmrec commented on Mar 17, 2016

    @jesmrec
    MemberAuthor

    @LukasReschke right, this is the same.

  2. tobiasKaminsky commented on Mar 17, 2016

    @tobiasKaminsky
    Contributor

    Picking chrome for example: what do you expect to happen?
    I guess that the current url is transferred to owncloud app. How should this text string be handled? Saved as a new file? That is the reason why it is not "accepted".

  3. tobiasKaminsky commented on Mar 17, 2016

    @tobiasKaminsky
    Contributor

    @LukeOwncloud What branch are you trying where uploading (share file from another app) is not working?

  4. tobiasKaminsky commented on Mar 17, 2016

    @tobiasKaminsky
    Contributor

    Then I guess, yes.
    Is there something in logcat? I experienced same behaviour in beta, which is due to a missing column "file size" in upload table. The current workaround is to uninstall and reinstall.
    Do you have tried it with a fresh version or use an "old" version which is upgraded?

  5. davivel commented on Mar 22, 2016

    @davivel
    Contributor

    I applied a fast patch ignoring data (as @LukeOwncloud suggested) in #1493. That should help, but I can't grant it's enough to fix all the problems detected for this feature (receive files sent from other apps). We have reports of problems for certain apps in version 1.9.1, where there is an else path for the condition if (data == null), that is missed at this point.

    So, we need a well-thought code rewrite, and specific QA time for this feature, what is out the scope of #1493.

    But nevertheless, should be fixed for 1.9.2, or the feature could be really broken in the new release. <<<<< cc @rperezb , @MTRichards , @cmonteroluque

  6. rperezb commented on Mar 22, 2016

    @rperezb

    👍

  7. davivel commented on Mar 22, 2016

    @davivel
    Contributor

    Some clarifications:

  8. added this to the milestone on Mar 22, 2016
  9. malkomich commented on Mar 29, 2016

    @malkomich
    Contributor

    The apps causing the error dialog that @jesmrec mentioned are sharing just text content instead of files, and the creation of new files with the shared text is a feature not implemented yet.
    In fact, there is already an issue covering this feature: #104

    Currently sending files from external apps is working better on Pull Request #1493 , but is still not working perfectly

  10. davivel commented on Mar 31, 2016

    @davivel
    Contributor

    With the current knowledge about this issue: all the apps listed in the description are sending text to the OC app, instead of files. The right issue to track the feature of uploading that text as a new file to OC is #104, and will not be fixed now, as said previously.

    What we can do in the context of this issue for release 2 is using a better error message so that the user knows exactly what happens.

    Another option we are exploring is prevent that other apps may send text to the OC app, but seems it's not possible without affecting the capability to send any type of files to the OC app.

    The other problems to send files to the OC app will be fixed for release 2 also, but in the context of issue #1514 .

  11. davivel commented on Apr 13, 2016

    @davivel
    Contributor

    Should be improved (this is: better error message) in #1595.

    We also tried to change the intent-filter of the Uploader Activity so that the OC app is not included by the system in the list of files that want to share a piece of text with other apps.

    But it's not possible, AFAIK. The only option to get it is filter by mime-type, preventing the text/plain is acceptable by our app. But that would prevent that file texts could be shared with the OC app also, and that's not acceptable.

    The key here is that the difference between both kind of shares-between-apps is in the usage of EXTRA_STREAM (for files) or EXTRA_TEXT (for raw text) in the Intent created by the sender app. But filtering upon EXTRAs in AndroidManifest.xml is not possible.

    For a better UX, the next step would be implementing #104. But that's another issue.

  12. davivel commented on Apr 14, 2016

    @davivel
    Contributor

    Merged and ready now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions