Skip to content

[QA] Flaky wopi API tests #2110

Closed
Closed

Description

@saw-jan

CI Pipelines:

Server log:

# log 1
POST /app/open-with-web
QUERY: file_id=90d06148-05f0-4c05-b122-60b6db597512$6c58567a-3cda-44e3-8f43-6415f23576db!9f603e0c-df8a-424e-bf00-81a88f9e24aa&app_name=FakeOffice&view_mode=write
X-Request-ID: apiCollaboration/wopi.feature:495-474

<== RESPONSE
500 Internal Server Error
X-Xss-Protection: 1; mode=block
<== RES BODY
{
  "code": "SERVER_ERROR",
  "message": "Error contacting the requested application, please use a different one or try again later"
}

# log 2
POST /app/open
QUERY: app_name=OnlyOffice&file_id=d5186691-e359-437a-b3ca-3f04acd1ffb5$c4d0780f-99f8-413e-94ad-0d841cf27fbb!337384c5-f8fa-4eb5-a9fb-6ab39fad0569&view_mode=write
X-Request-ID: apiCollaboration/checkFileInfo.feature:400-308

<== RESPONSE
500 Internal Server Error
X-Xss-Protection: 1; mode=block
<== RES BODY
{
  "code": "SERVER_ERROR",
  "message": "Error contacting the requested application, please use a different one or try again later"
}

Scenarios:

  Scenario Outline: open file with .odt extension with different view mode (open-with-web) # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiCollaboration/wopi.feature:471
    Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"       # FeatureContext::userHasUploadedAFileTo()
    And we save it into "FILEID"                                                           # FeatureContext::saveItInto()
    When user "Alice" sends HTTP method "POST" to URL "<app-endpoint>"                     # FeatureContext::userSendsHTTPMethodToUrl()
    Then the HTTP status code should be "200"                                              # FeatureContext::thenTheHTTPStatusCodeShouldBe()
...
    Examples:
      | app-endpoint                                                              |
      | /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=view  |
      | /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=read  |
      | /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=write |
        Failed step: Then the HTTP status code should be "200"
        HTTP status code 500 is not the expected value 200
        Failed asserting that 500 matches expected '200'.
  Scenario: check file info with onlyOffice                                                                        # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiCollaboration/checkFileInfo.feature:214
    Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"                            # FeatureContext::userHasUploadedAFileWithContentTo()
    When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" # CollaborationContext::userChecksTheInformationOfFileOfSpaceUsingOffice()
      Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 107
  Scenario Outline: check file info with different mode (onlyOffice)                                                                       # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiCollaboration/checkFileInfo.feature:306
    Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"                                                    # FeatureContext::userHasUploadedAFileWithContentTo()
    When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with view mode "<mode>" # CollaborationContext::userChecksTheInformationOfFileOfSpaceUsingOffice()
    Then the HTTP status code should be "200"                                                                                              
  ...
    Examples:
      | mode  | disable-print | user-can-write | user-can-rename |
      | view  | true          | false          | false           |
        Failed step: When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with view mode "view"
        Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 107
      | read  | false         | false          | false           |
        Failed step: When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with view mode "read"
        Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 107
      | write | false         | true           | true            |
        Failed step: When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with view mode "write"
        Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 107
  Scenario Outline: try to get file info using invalid file id with office suites                                                                    # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiCollaboration/checkFileInfo.feature:617
    Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"                                                              # FeatureContext::userHasUploadedAFileWithContentTo()
    When user "Alice" tries to check the information of file "textfile0.txt" of space "Personal" using office "<office-suites>" with invalid file-id # CollaborationContext::userTriesToCheckTheInformationOfFileOfSpaceUsingOfficeWithInvalidFileId()
    Then the HTTP status code should be "401"                                                                                                        # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    Examples:
      | office-suites |
      | Collabora     |
      | FakeOffice    |
      | OnlyOffice    |
        Failed step: When user "Alice" tries to check the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with invalid file-id
        Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 260
  Scenario Outline: try to get file info of deleted file with office suites                    # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/apiCollaboration/checkFileInfo.feature:628
    Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt"        # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has sent the following app-open request:                                  # CollaborationContext::userHasSentTheFollowingAppOpenRequest()
      | resource | textfile0.txt   |
      | space    | Personal        |
      | app      | <office-suites> |
    And user "Alice" has deleted file "/textfile0.txt"                                         # FeatureContext::userHasDeletedResource()
    When user "Alice" tries to get the information of the last opened file using wopi endpoint # CollaborationContext::userGetsTheInformationOfTheLastOpenedFileUsingWopiEndpoint()
    Then the HTTP status code should be "404"                                                  # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    Examples:
      | office-suites |
      | Collabora     |
      | FakeOffice    |
      | OnlyOffice    |
        Failed step: And user "Alice" has sent the following app-open request:
        HTTP status code 500 is not the expected value 200
        Failed asserting that 500 matches expected 200.

Activity

  1. self-assigned this
    on Jan 12, 2026
  2. saw-jan commented on Jan 26, 2026

    @saw-jan
    ContributorAuthor

    As per the logs, most of the failures were with OnlyOffice

    apiCollaboration/checkFileInfo.feature:214
    apiCollaboration/checkFileInfo.feature:398
    apiCollaboration/checkFileInfo.feature:399
    apiCollaboration/checkFileInfo.feature:400
    apiCollaboration/checkFileInfo.feature:625
    apiCollaboration/checkFileInfo.feature:641
    
    Scenario: check file info with onlyOffice
    Scenario Outline: check file info with different mode (onlyOffice)
      Failed step: When user "Alice" checks the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with view mode "write"
      Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 107
    
    Scenario Outline: try to get file info using invalid file id with office suites
      Examples:
        | office-suites |
        | OnlyOffice    |
      Failed step: When user "Alice" tries to check the information of file "textfile0.txt" of space "Personal" using office "OnlyOffice" with invalid file-id
      Warning: Undefined property: stdClass::$form_parameters in /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/bootstrap/CollaborationContext.php line 260
    
    Scenario Outline: try to get file info of deleted file with office suites
      Examples:
        | office-suites |
        | OnlyOffice    |
      Failed step: And user "Alice" has sent the following app-open request:
      HTTP status code 500 is not the expected value 200
      Failed asserting that 500 matches expected 200.

    Looks like the OnlyOffice was not ready to accept the requests

    collaboration (onlyoffice) server logs:

    {"level":"error","service":"collboration-onlyoffice","WopiAppUrl":"[https://onlyoffice/hosting/discovery","HttpCode":502,"time":"2026-01-21T04:26:28Z","line":"/go/src/github.com/opencloud-eu/opencloud/services/collaboration/pkg/helpers/discovery.go:104","message":"WopiDiscovery:](https://onlyoffice/hosting/discovery%22,%22HttpCode%22:502,%22time%22:%222026-01-21T04:26:28Z%22,%22line%22:%22/go/src/github.com/opencloud-eu/opencloud/services/collaboration/pkg/helpers/discovery.go:104%22,%22message%22:%22WopiDiscovery:) wopi app url failed with unexpected code"}
    {"level":"warn","service":"collboration-onlyoffice","error":"status code was not 200","time":"2026-01-21T04:26:28Z","line":"/go/src/github.com/opencloud-eu/opencloud/services/collaboration/pkg/command/server.go:83","message":"Failed to get app URLs"}

    onlyoffice server logs:

    2026/01/21 04:26:28 [error] 723#723: *2 connect() failed (111: Unknown error) while connecting to upstream, client: 172.22.0.8, server: , request: "GET /hosting/discovery HTTP/1.1", upstream: "[http://[::1]:8000/hosting/discovery",](http://[::1]:8000/hosting/discovery%22,) host: "onlyoffice"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions