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

Preview from share-with-others page doesn't work in oc10 #7049

Closed
SwikritiT opened this issue May 24, 2022 · 4 comments · Fixed by #7228
Closed

Preview from share-with-others page doesn't work in oc10 #7049

SwikritiT opened this issue May 24, 2022 · 4 comments · Fixed by #7228
Assignees
Labels
Type:Bug Something isn't working

Comments

@SwikritiT
Copy link
Contributor

Steps to reproduce

  1. As user "Alice" upload a picture test.jpeg
  2. Share the picture with user Brian
  3. Go to shares -> shared with others
  4. There's no option to preview the image while on ocis there is

Expected behaviour

It should be possible to preview the image like in OCIS
ocisPreview

Actual behaviour

It's not possible to preview the image
OC10Preview

@SwikritiT SwikritiT added the Type:Bug Something isn't working label May 24, 2022
@pascalwengerter
Copy link
Contributor

@SwikritiT could you disclose the config.json's for both backends / how you have started them? This could be an issue of not having activated the mediaviewer (now 'preview') extension

@SwikritiT
Copy link
Contributor Author

@SwikritiT could you disclose the config.json's for both backends / how you have started them? This could be an issue of not having activated the mediaviewer (now 'preview') extension

I ran both backends from docker docker-compose up oc10 docker-compose up ocis . The preview is not working only in shared-with-others page in OC10, it works in other pages. The related test also fails in CI https://drone.owncloud.com/owncloud/web/25817/20/20

1) Scenario: Open jpeg file with preview app in shared-with-others page (attempt 1, retried) # features/webUIPreview/mediaPreview.feature:143
   ✔ Before # setup.js:41
   ✔ Before # setup.js:45
   ✔ Before # setup.js:49
   ✔ Before # setup.js:66
   ✔ Before # setup.js:73
   ✔ Before # setup.js:84
   ✔ Before # stepDefinitions/filesContext.js:17
   ✔ Before # stepDefinitions/generalContext.js:199
   ✔ Before # stepDefinitions/generalContext.js:237
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Brian" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has uploaded file "testavatar.png" to "testavatar.png" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has shared file "testavatar.png" with user "Alice" with "all" permissions in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has logged in using the webUI # stepDefinitions/loginContext.js:64
   ✔ And the user browses to the shared-with-others page # stepDefinitions/filesContext.js:58
   ✔ When the user views the file "testavatar.png" in the preview app by clicking on the file name using the webUI # stepDefinitions/previewContext.js:51
   ✖ Then the file "testavatar.png" should be displayed in the preview app webUI # stepDefinitions/previewContext.js:39
       Timed out while waiting for element <//p[contains(@class, "preview-file-name") and contains(text(),"testavatar.png")]> to be present for 10000 milliseconds. - expected "visible" but got: "not found" (10001ms)
           at Proxy.waitForPreviewLoaded (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/previewPage.js:16:30)
           at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/previewContext.js:40:22)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:255
   ✔ After # stepDefinitions/generalContext.js:224
   ✔ After # stepDefinitions/generalContext.js:165
   ✔ After # setup.js:117
   ✔ After # setup.js:113
   ✔ After # setup.js:109
   ✔ After # setup.js:102
   ✔ After # setup.js:93

@pascalwengerter
Copy link
Contributor

@SwikritiT could you disclose the config.json's for both backends / how you have started them? This could be an issue of not having activated the mediaviewer (now 'preview') extension

I ran both backends from docker docker-compose up oc10 docker-compose up ocis . The preview is not working only in shared-with-others page in OC10, it works in other pages. The related test also fails in CI https://drone.owncloud.com/owncloud/web/25817/20/20

1) Scenario: Open jpeg file with preview app in shared-with-others page (attempt 1, retried) # features/webUIPreview/mediaPreview.feature:143
   ✔ Before # setup.js:41
   ✔ Before # setup.js:45
   ✔ Before # setup.js:49
   ✔ Before # setup.js:66
   ✔ Before # setup.js:73
   ✔ Before # setup.js:84
   ✔ Before # stepDefinitions/filesContext.js:17
   ✔ Before # stepDefinitions/generalContext.js:199
   ✔ Before # stepDefinitions/generalContext.js:237
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Brian" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has uploaded file "testavatar.png" to "testavatar.png" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has shared file "testavatar.png" with user "Alice" with "all" permissions in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has logged in using the webUI # stepDefinitions/loginContext.js:64
   ✔ And the user browses to the shared-with-others page # stepDefinitions/filesContext.js:58
   ✔ When the user views the file "testavatar.png" in the preview app by clicking on the file name using the webUI # stepDefinitions/previewContext.js:51
   ✖ Then the file "testavatar.png" should be displayed in the preview app webUI # stepDefinitions/previewContext.js:39
       Timed out while waiting for element <//p[contains(@class, "preview-file-name") and contains(text(),"testavatar.png")]> to be present for 10000 milliseconds. - expected "visible" but got: "not found" (10001ms)
           at Proxy.waitForPreviewLoaded (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/previewPage.js:16:30)
           at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/previewContext.js:40:22)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:255
   ✔ After # stepDefinitions/generalContext.js:224
   ✔ After # stepDefinitions/generalContext.js:165
   ✔ After # setup.js:117
   ✔ After # setup.js:113
   ✔ After # setup.js:109
   ✔ After # setup.js:102
   ✔ After # setup.js:93

Thanks for the details, I'll investigate! :)

@AlexAndBear
Copy link
Contributor

Note this also happened to other apps like: pdf-viewer and text-editor as the mimeType was missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants