owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
448 stars 156 forks source link

Investigate Acceptance test failure in nightly #6925

Closed SwikritiT closed 2 years ago

SwikritiT commented 2 years ago

A lot of tests are failing in getText() command in OCIS in build: https://drone.owncloud.com/owncloud/web/25449/57/15 Maybe they're all related , maybe we're accessing elements too early or too late.

webUIRenameFolders/renameFolders.feature:43

```feature Scenario: Rename a folder using special characters and check its existence after page reload # features/webUIRenameFolders/renameFolders.feature:43 - Connecting to selenium on port 4444... ℹ Connected to selenium on port 4444 (369ms). Using: chrome (94.0.4606.61) on Linux platform. Given user "Alice" has been created with default attributes and without skeleton files in the server And user "Alice" has created folder "simple-folder" in the server And user "Alice" has created folder "simple-empty-folder" in the server And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server And user "Alice" has logged in using the webUI √ Element was visible after 945 milliseconds. √ Element was not present after 177 milliseconds. √ Element <#files-view> was visible after 710 milliseconds. And the user has browsed to the personal page √ Element was visible after 187 milliseconds. When the user renames folder "simple-folder" to "लोरेम।तयक्स्त $%&" using the webUI √ Element was visible after 34 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element was present after 11 milliseconds. √ Element <.oc-modal> was visible after 27 milliseconds. waiting for 500ms ... √ Element <.oc-modal> was not present after 201 milliseconds. And the user reloads the current page of the webUI Then folder "लोरेम।तयक्स्त $%&" should be listed on the webUI √ Element was visible after 27 milliseconds. When the user renames folder "लोरेम।तयक्स्त $%&" to '"double"quotes' using the webUI √ Element was visible after 23 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element was present after 13 milliseconds. √ Element <.oc-modal> was visible after 28 milliseconds. waiting for 500ms ... √ Element <.oc-modal> was not present after 181 milliseconds. And the user reloads the current page of the webUI Then folder '"double"quotes' should be listed on the webUI √ Element was visible after 31 milliseconds. When the user renames folder '"double"quotes' to "no-double-quotes" using the webUI √ Element was visible after 34 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element was present after 11 milliseconds. √ Element <.oc-modal> was visible after 23 milliseconds. waiting for 500ms ... √ Element <.oc-modal> was not present after 147 milliseconds. And the user reloads the current page of the webUI Then folder "no-double-quotes" should be listed on the webUI √ Element was visible after 42 milliseconds. When the user renames folder 'no-double-quotes' to "hash#And&QuestionMark?At@FolderName" using the webUI √ Element was visible after 23 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element was present after 14 milliseconds. √ Element <.oc-modal> was visible after 28 milliseconds. waiting for 500ms ... √ Element <.oc-modal> was not present after 134 milliseconds. And the user reloads the current page of the webUI Then folder "hash#And&QuestionMark?At@FolderName" should be listed on the webUI NoSuchElementError: An error occurred while running .getText() command on : {"sessionId":"7cf35568234c6c87cdcc108153c3ce91","status":0,"value":[]} at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18) at World. (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:356:51) ✖ failed AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on : at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375:16) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:7) saving screenshot of failed test ```

webUIFilesSearch/search.feature:146

```feature Scenario: Search for files with difficult names and difficult search phrase # features/webUIFilesSearch/search.feature:146 ✔ 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 these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76 | username | | Alice | | user0 | ✔ And user "Alice" has created the following folders in the server # stepDefinitions/middlewareContext.js:76 | entry_name | | simple-folder | | simple-empty-folder | | strängé नेपाली folder | ✔ And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "zzzz-must-be-last-file-in-folder.txt" to "zzzz-must-be-last-file-in-folder.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "lorem.txt" to "simple-folder/lorem.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "lorem-big.txt" to "lorem-big.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "data.zip" to "data.zip" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:64 ✔ And the user has reloaded the current page of the webUI # stepDefinitions/filesContext.js:451 ✔ Given user "Alice" has uploaded file with content "does-not-matter" to "/strängéनेपालीloremfile.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And the user has reloaded the current page of the webUI # stepDefinitions/filesContext.js:451 ✔ When the user searches for "strängéनेपाली" using the webUI # stepDefinitions/searchContext.js:4 ✖ Then file "strängéनेपालीloremfile.txt" should be listed on the webUI # stepDefinitions/filesContext.js:351 AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on : at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375:16) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:7) ✔ 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 ```

webUISharingPublicManagement/publicLinkIndicator.feature:110

```feature Scenario: sharing indicator for link shares stays up to date # features/webUISharingPublicManagement/publicLinkIndicator.feature:110 ✔ 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/generalContext.js:249 ✔ 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 ✔ And user "Alice" has created folder "/simple-folder" 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 "Alice" has uploaded file "testavatar.png" to "simple-folder/testimage.png" in the server # stepDefinitions/middlewareContext.js:66 ✔ When user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:64 ✔ Then the following resources should not have share indicators on the webUI # stepDefinitions/filesContext.js:1176 | simple-folder | ✔ When the user shares folder "simple-folder" with user "Brian Murphy" as "Viewer" using the webUI # stepDefinitions/sharingContext.js:359 ✔ And the user creates a new public link for resource "simple-folder" using the webUI with # stepDefinitions/publicLinkContext.js:17 | field | value | | name | first | ✔ And the user creates a new public link for resource "simple-folder" using the webUI with # stepDefinitions/publicLinkContext.js:17 | field | value | | name | second | ✔ Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | simple-folder | user-direct,link-direct | ✔ When the user opens folder "simple-folder" using the webUI # stepDefinitions/filesContext.js:155 ✔ Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | testimage.png | user-indirect,link-indirect | ✔ When the user creates a new public link for resource "testimage.png" using the webUI with # stepDefinitions/publicLinkContext.js:17 | field | value | | name | third | ✔ Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | testimage.png | user-indirect,link-direct | ✔ When the user removes the public link named "third" of resource "testimage.png" using the webUI # stepDefinitions/publicLinkContext.js:224 ✔ Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | testimage.png | user-indirect,link-indirect | ✔ When the user opens folder "" directly on the webUI # stepDefinitions/filesContext.js:112 ✖ And the user removes the public link named "second" of resource "simple-folder" using the webUI # stepDefinitions/publicLinkContext.js:224 AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on : at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375:16) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:7) at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:282:7) at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:272:7) at Proxy.openPublicLinkDialog (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:33:7) at World. (/var/www/owncloud/web/tests/acceptance/stepDefinitions/publicLinkContext.js:227:5) - Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | simple-folder | user-direct,link-direct | - When the user removes the public link named "first" of resource "simple-folder" using the webUI # stepDefinitions/publicLinkContext.js:224 - Then the following resources should have share indicators on the webUI # stepDefinitions/filesContext.js:1153 | fileName | expectedIndicators | | simple-folder | user-direct | ✔ 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 ```

webUIMoveFilesFolders/moveFiles.feature:20

```feature Scenario: move a file into a folder # features/webUIMoveFilesFolders/moveFiles.feature:20 ✔ 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 ✔ And user "Alice" has created folder "simple-folder" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ Given user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:64 ✔ And user "Alice" has uploaded file "data.tar.gz" to "data.tar.gz" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has uploaded file "strängé filename (duplicate #2 &).txt" to "strängé filename (duplicate #2 &).txt" in the server # stepDefinitions/middlewareContext.js:66 ✔ And user "Alice" has created folder "strängé नेपाली folder empty" in the server # stepDefinitions/middlewareContext.js:66 ✔ And the user has reloaded the current page of the webUI # stepDefinitions/filesContext.js:451 ✔ When the user moves file "lorem.txt" into folder "simple-folder" using the webUI # stepDefinitions/filesContext.js:1212 ✔ Then breadcrumb for folder "simple-folder" should be displayed on the webUI # stepDefinitions/filesContext.js:202 ✔ And file "lorem.txt" should be listed on the webUI # stepDefinitions/filesContext.js:351 ✔ When the user browses to the files page # stepDefinitions/filesContext.js:22 ✖ And the user moves file "data.tar.gz" into folder "strängé नेपाली folder empty" using the webUI # stepDefinitions/filesContext.js:1212 AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on : at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375:16) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:7) at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:282:7) at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:272:7) at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:249:7) at Proxy.moveResource (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:598:7) - Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI # stepDefinitions/filesContext.js:202 - And file "data.tar.gz" should be listed on the webUI # stepDefinitions/filesContext.js:351 - When the user browses to the files page # stepDefinitions/filesContext.js:22 - And the user moves file "strängé filename (duplicate #2 &).txt" into folder "strängé नेपाली folder empty" using the webUI # stepDefinitions/filesContext.js:1212 - Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI # stepDefinitions/filesContext.js:202 - And file "strängé filename (duplicate #2 &).txt" should be listed on the webUI # stepDefinitions/filesContext.js:351 - When the user browses to the files page # stepDefinitions/filesContext.js:22 - Then file "lorem.txt" should not be listed on the webUI # stepDefinitions/filesContext.js:370 - And file "data.tar.gz" should not be listed on the webUI # stepDefinitions/filesContext.js:370 - And file "strängé filename (duplicate #2 &).txt" should not be listed on the webUI # stepDefinitions/filesContext.js:370 ✔ 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 ```

TODO

saw-jan commented 2 years ago

As per the initial investigation, the tests fail with following ui screen:

TO NOTE:

test-test_feature-L11

All above mentioned tests have same issue

pascalwengerter commented 2 years ago

Looks suspiciously like https://github.com/owncloud/ocis/issues/3749

saw-jan commented 2 years ago

I also think that's the reason behind failing tests.

saw-jan commented 2 years ago

I get this ocis log whenever that happens:

{
  "level":"error",
  "service":"storage-users",
  "pkg":"rgrpc",
  "traceid":"00000000000000000000000000000000",
  "error":"remove /home/sawjan/.ocis/storage/users/spacetypes/personal/7b425492-6b0f-43f3-9ded-247e279ac93f.flock: no such file or directory",
  "node":"marshaling error: json: unsupported value: encountered a cycle via *node.Node",
  "time":"2022-05-10T14:25:39+05:45",
  "message":"could not convert to storage space"
}

And there are plenty of such errors in the failing pipeline

saw-jan commented 2 years ago

@pascalwengerter So, what can be done here?

pascalwengerter commented 2 years ago

@pascalwengerter So, what can be done here?

Nothing on the web/qa side. Skipping the tests would be inacceptable, as well as endless retries/page reloads. We need a fix in oCIS and then an oCIS commit ID bump. Let's keep this issue open

saw-jan commented 2 years ago

oCIS lock issue: https://github.com/owncloud/ocis/issues/3757

SwikritiT commented 2 years ago

test failure in nightly probably because of this:

saw-jan commented 2 years ago

Tests look pretty stable with the latest oCIS. The culprit issue in oCIS has been fixed (https://github.com/owncloud/ocis/issues/3757). Bumping is on the way (https://github.com/owncloud/web/pull/6946). CI should be stable after bumping.

IMO, this issue can be closed alongside the bump PR merge.

pascalwengerter commented 2 years ago

Closing via https://github.com/owncloud/web/pull/6946, thanks for the efforts!

kiranparajuli589 commented 2 years ago

failed again on last nightly build: https://drone.owncloud.com/owncloud/web/25589/54/15

More Details
 @smokeTest @ocisSmokeTest
  Scenario: move a file into a folder # features/webUIMoveFilesFolders/moveFiles.feature:20
- Connecting to selenium on port 4444...

ℹ Connected to selenium on port 4444 (247ms).
  Using: chrome (94.0.4606.61) on Linux platform.

    Given user "Alice" has been created with default attributes and without skeleton files in the server
    And user "Alice" has created folder "simple-folder" in the server
    And user "Alice" has uploaded file "lorem.txt" to "lorem.txt" in the server
    Given user "Alice" has logged in using the webUI
√ Element  was visible after 766 milliseconds.
√ Element  was not present after 161 milliseconds.
√ Element <#files-view> was visible after 580 milliseconds.
    And user "Alice" has uploaded file "data.tar.gz" to "data.tar.gz" in the server
    And user "Alice" has uploaded file "strängé filename (duplicate #2 &).txt" to "strängé filename (duplicate #2 &).txt" in the server
    And user "Alice" has created folder "strängé नेपाली folder empty" in the server
    And the user has reloaded the current page of the webUI
    When the user moves file "lorem.txt" into folder "simple-folder" using the webUI
√ Element  was visible after 26 milliseconds.
waiting for 500ms ...
Timeout waiting for Ajax calls to start
waiting for 500ms ...
√ Element  was present after 15 milliseconds.
√ Element  was visible after 21 milliseconds.
√ Element  was visible after 50 milliseconds.
√ Element  was visible after 22 milliseconds.
√ Element  was not present after 8 milliseconds.
    Then breadcrumb for folder "simple-folder" should be displayed on the webUI
√ Element  was visible after 26 milliseconds.
√ Passed [strictEqual]: Resource //nav[@id="files-breadcrumb"]//*[(self::a or self::button)]/span[contains(text(),'simple-folder')] expected to be visible but is not visible .
    And file "lorem.txt" should be listed on the webUI
√ Element  was visible after 23 milliseconds.
    When the user browses to the files page
√ Element  was present after 415 milliseconds.
    And the user moves file "data.tar.gz" into folder "strängé नेपाली folder empty" using the webUI
   NoSuchElementError: An error occurred while running .getText() command on : 
   {"sessionId":"7afe84585e6b1ae4df46fddd2a0828d2","status":0,"value":[]}
       at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18)
       at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18)
       at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:282:18)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:272:18)
       at runMicrotasks ()
       at processTicksAndRejections (internal/process/task_queues.js:95:5)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:249:7)
       at Proxy.moveResource (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:598:7)
    ✖ failed
      AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on :
          at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375:16)
          at runMicrotasks ()
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
          at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:7)
          at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:282:7)
          at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:272:7)
          at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:249:7)
          at Proxy.moveResource (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:598:7)
    Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI
    - skipped
    And file "data.tar.gz" should be listed on the webUI
    - skipped
    When the user browses to the files page
    - skipped
    And the user moves file "strängé filename (duplicate #2 &).txt" into folder "strängé नेपाली folder empty" using the webUI
    - skipped
    Then breadcrumb for folder "strängé नेपाली folder empty" should be displayed on the webUI
    - skipped
    And file "strängé filename (duplicate #2 &).txt" should be listed on the webUI
    - skipped
    When the user browses to the files page
    - skipped
    Then file "lorem.txt" should not be listed on the webUI
    - skipped
    And file "data.tar.gz" should not be listed on the webUI
    - skipped
    And file "strängé filename (duplicate #2 &).txt" should not be listed on the webUI
    - skipped
kiranparajuli589 commented 2 years ago

sorry, the error was with .getText but the issue seems to be different, i'll open a separate issue for this.