Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] Downloading file preview can sometimes fail with 500 error #7338

Closed
saw-jan opened this issue Sep 22, 2023 · 6 comments · Fixed by #7507
Closed

[QA] Downloading file preview can sometimes fail with 500 error #7338

saw-jan opened this issue Sep 22, 2023 · 6 comments · Fixed by #7507
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Sep 22, 2023

During the tests run, downloading preview steps sometimes fail with 500 server error.

Example:

Scenario Outline: download previews of files inside sub-folders                                                           # /drone/src/tests/acceptance/features/coreApiWebdavPreviews/previews.feature:75
    Given using <dav-path-version> DAV path                                                                                 # FeatureContext::usingOldOrNewDavPath()
    And user "Alice" has created folder "subfolder"                                                                         # FeatureContext::userHasCreatedFolder()
    And user "Alice" has uploaded file "filesForUpload/example.gif" to "subfolder/example.gif"                              # FeatureContext::userHasUploadedAFileTo()
    When user "Alice" downloads the preview of "subfolder/example.gif" with width "32" and height "32" using the WebDAV API # FeatureContext::downloadPreviewOfFiles()
    Then the HTTP status code should be "200"                                                                               # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the downloaded image should be "32" pixels wide and "32" pixels high                                                # FeatureContext::imageDimensionsShouldBe()

    Examples:
      | dav-path-version |
      | old              |
      | new              |
        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'.

Failed step:

When user "Alice" downloads the preview of "<file>" with width "32" and height "32" using the WebDAV API
And as user "Alice" the preview of "/FOLDER/lorem.txt" with width "32" and height "32" should have been changed

NOTE: If you see similar failure then please report to the frequency below


[UPDATED REQUEST LOG]

And as user "Alice" the preview of "/FOLDER/lorem.txt" with width "32" and height "32" should have been changed
_______________________________________________________________________

==> REQUEST
GET /remote.php/dav/files/Alice/FOLDER/lorem.txt
X-Request-ID: coreApiWebdavPreviews/previews.feature:296-285

<== RESPONSE
500 Internal Server Error
X-Request-Id: coreApiWebdavPreviews/previews.feature:296-285
<== RES BODY
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
    <s:exception></s:exception>
    <s:message>
        {&#34;id&#34;:&#34;com.owncloud.api.thumbnails&#34;,&#34;code&#34;:425,&#34;detail&#34;:&#34;File Processing&#34;,&#34;status&#34;:&#34;Too Early&#34;}
    </s:message>
</d:error>
@SagarGi
Copy link
Member

SagarGi commented Oct 16, 2023

This issue can be reproduced locally:
The server error logs looks something like this:

{"level":"error","service":"webdav","error":"{\"id\":\"com.owncloud.api.thumbnails\",\"code\":425,\"detail\":\"FileProcessing\",\"status\":\"Too Early\"}","time":"2023-10-16T12:49:39+05:45","message":"could not get thumbnail"}

@saw-jan
Copy link
Member Author

saw-jan commented Oct 16, 2023

This issue can be reproduced locally: The server error logs looks something like this:

{"level":"error","service":"webdav","error":"{\"id\":\"com.owncloud.api.thumbnails\",\"code\":425,\"detail\":\"FileProcessing\",\"status\":\"Too Early\"}","time":"2023-10-16T12:49:39+05:45","message":"could not get thumbnail"}

That looks like we can wait until 425 is resolved in the tests (which we have done for other requests if I remember correctly)

@SagarGi
Copy link
Member

SagarGi commented Oct 16, 2023

This issue can be reproduced locally: The server error logs looks something like this:

{"level":"error","service":"webdav","error":"{\"id\":\"com.owncloud.api.thumbnails\",\"code\":425,\"detail\":\"FileProcessing\",\"status\":\"Too Early\"}","time":"2023-10-16T12:49:39+05:45","message":"could not get thumbnail"}

That looks like we can wait until 425 is resolved in the tests (which we have done for other requests if I remember correctly)

We have retry implemented in the test code for status code 425 but here the server it self gives status 500. Its the server log that gives code 425.

@saw-jan
Copy link
Member Author

saw-jan commented Oct 16, 2023

Then need an issue for that. Try to reproduce with POSTPROCESSING_DELAY, it would be easier

@SagarGi
Copy link
Member

SagarGi commented Oct 16, 2023

Issue has been created for this failure in ocis #7502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants