Skip to content

[BUG] Confusing behaviour when creating new files using apps provider #4560

@jesmrec

Description

@jesmrec

Steps to reproduce

  1. Add to the Android app an oCIS server with support to apps provider
  2. Open FAB and select New Document
  3. Enter a correct name for the new document

Actual behaviour

Snackbar error There are no apps that support this file type

This is the observed behaviour when creating new file with apps provider:

Screenrecorder-2025-03-21-09-22-42-916.mp4

the /app/open-with-web call returns a 500 with the following body:

{
    "code": "SERVER_ERROR",
    "message": "Error contacting the requested application, please use a different one or try again later"
}

Expected behaviour

File created (without refreshing?) and opened in web

Context

Time ago, the following issue was created:

owncloud/ocis#6141

the server retrieved a default app to open, whereas that provider was not in the list. That caused a problem.

Now, the /app/list endpoint retrieves the right list of providers, so, that problem could be fixed.

Another clue: the request to /app/open-with-web is sent with app_name: collabora in the body. When a file is straight opened (without creation), the request to /app/open-with-web is sent with app_name: CollaboraOnline

This is the involved response from the /app/list endpoint:

{
            "allow_creation": true,
            "app_providers": [
                {
                    "address": "...",
                    "description": "Open office documents with Collabora",
                    "icon": "...",
                    "name": "CollaboraOnline",
                    "product_name": "collabora",
                    "secure_view": false
                },
                {
                    ...
                },
                {
                   ...
                }
            ],
            "default_application": "collabora",
            "description": "OpenDocument spreadsheet document",
            "ext": "ods",
            "mime_type": "application/vnd.oasis.opendocument.spreadsheet",
            "name": "OpenSpreadsheet"
        }

in every case, it is sent either the product_name or the name

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions