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

webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:63 can fail #6721

Closed
saw-jan opened this issue Apr 4, 2022 · 5 comments
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Apr 4, 2022

https://drone.owncloud.com/owncloud/web/24385/63/15

  Scenario Outline: share a folder with multiple users using role as advanced permissions role and different extra permissions # features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:15
- Connecting to selenium on port 4444...

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

    Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server
    And the administrator has set the default folder for received shares to "Shares" in the server
    And these users have been created with default attributes and without skeleton files in the server:
      │ username │
      │ Alice    │
      │ Brian    │
    Given these users have been created with default attributes and without skeleton files in the server:
      │ username │
      │ user0    │
      │ Carol    │
      │ David    │
    And user "Alice" has created folder "/simple-folder" in the server
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 711 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 173 milliseconds.
√ Element <#files-view> was visible after 584 milliseconds.
    When the user opens the share dialog for folder "simple-folder" using the webUI
√ Element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='simple-folder' or @data-test-resource-path='/simple-folder')]/ancestor::tr[contains(@class, "oc-tbody-tr")]> was visible after 30 milliseconds.
waiting for 500ms ...
Timeout waiting for Ajax calls to start
waiting for 500ms ...
√ Element <//*[@id="sidebar-panel-sharing-item"]//*[contains(@class, "sidebar-panel__body-content")]> was present after 13 milliseconds.
    And the user selects the following collaborators for the share as "Custom permissions" with "update, create" permissions:
      │ collaborator │ type │
      │ Regular User │ user │
      │ Brian Murphy │ user │
      │ Carol King   │ user │
      │ David Lopez  │ user │
√ Element <#files-share-invite-input> was visible after 37 milliseconds.
√ Element <#new-collaborators-form .vs__dropdown-menu .files-collaborators-autocomplete-user-text> was visible after 28 milliseconds.
√ Element <#files-share-invite-input> was visible after 21 milliseconds.
√ Element <#new-collaborators-form .vs__dropdown-menu .files-collaborators-autocomplete-user-text> was visible after 30 milliseconds.
√ Element <#files-share-invite-input> was visible after 21 milliseconds.
√ Element <#new-collaborators-form .vs__dropdown-menu .files-collaborators-autocomplete-user-text> was visible after 45 milliseconds.
√ Element <#files-share-invite-input> was visible after 25 milliseconds.
√ Element <#new-collaborators-form .vs__dropdown-menu .files-collaborators-autocomplete-user-text> was visible after 28 milliseconds.
√ Element <#files-collaborators-role-button-new> was visible after 35 milliseconds.
    And the user removes "David Lopez" as a collaborator from the share
    And the user removes "Regular User" as a collaborator from the share
    And the user shares with the selected collaborators
√ Element <#new-collaborators-form-create-button> was present after 15 milliseconds.
    And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server
    And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server
    ✖ failed
      Error: Error: Could not find the share to be accepted:
          at Object.acceptShare (/usr/src/app/src/helpers/sharingHelper.js:371:13)
          at runMicrotasks (<anonymous>)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async /usr/src/app/src/app.js:66:7
          at /var/www/owncloud/web/tests/acceptance/stepDefinitions/middlewareContext.js:38:15
          at runMicrotasks (<anonymous>)
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
    Then custom permissions "update, create" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI
    - skipped
    And custom permissions "update, create" should be set for user "Carol King" for folder "simple-folder" on the webUI
    - skipped
    And user "Brian Murphy" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI
    - skipped
    And user "Carol King" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI
    - skipped
    And user "Brian" should have received a share with these details in the server:
      │ field       │ value                 │
      │ uid_owner   │ Alice                 │
      │ share_with  │ Brian                 │
      │ file_target │ /Shares/simple-folder │
      │ item_type   │ folder                │
      │ permissions │ <actual-permissions>  │
    - skipped
    And user "Carol" should have received a share with these details in the server:
      │ field       │ value                 │
      │ uid_owner   │ Alice                 │
      │ share_with  │ Carol                 │
      │ file_target │ /Shares/simple-folder │
      │ item_type   │ folder                │
      │ permissions │ <actual-permissions>  │
    - skipped
    But user "Regular User" should not be listed in the collaborators list on the webUI
    - skipped
    And as "user0" folder "/Shares/simple-folder" should not exist in the server
    - skipped
    And user "David Lopez" should not be listed in the collaborators list on the webUI
    - skipped
    And as "David" folder "/Shares/simple-folder" should not exist in the server
    - skipped
@saw-jan saw-jan added the QA:team label Apr 4, 2022
@saw-jan saw-jan self-assigned this Apr 4, 2022
@saw-jan
Copy link
Member Author

saw-jan commented Apr 4, 2022

Sharing didn't succeed.
test-test_feature-L61

@saw-jan
Copy link
Member Author

saw-jan commented Apr 8, 2022

HTTP log:

Request URL: https://host.docker.internal:9200/ocs/v1.php/apps/files_sharing/api/v1/shares
Request Method: POST
Status Code: 200 OK
Remote Address: 172.17.0.1:9200
Referrer Policy: strict-origin-when-cross-origin
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
authorization: Bearer eyJhbGciOiJ...
Connection: keep-alive
Content-Length: 63
content-type: application/x-www-form-urlencoded
Host: host.docker.internal:9200
ocs-apirequest: true
Origin: https://host.docker.internal:9200
Referer: https://host.docker.internal:9200/files/spaces/personal/home?items-per-page=100
sec-ch-ua: "Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36
x-request-id: 0e0fe0d3-2edd-4569-bfd3-156c87e1fdb9
x-requested-with: XMLHttpRequest
# Form data
shareType: 0
shareWith: Brian
path: /simple-folder
permissions: 9

# Response
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location
Content-Length: 141
Content-Type: text/xml; charset=utf-8
Date: Fri, 08 Apr 2022 06:12:29 GMT
Ocs-Api-Version: 1
Vary: Origin

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>error</status>
    <statuscode>404</statuscode>
    <message>Not found</message>
  </meta>
</ocs>

oCIS Server log:

2022-04-08 05:03:58 ERR github.com/cs3org/reva/[email protected]/pkg/storage/utils/decomposedfs/upload.go:95
> Decomposedfs: could not write checksum
error="Decomposedfs: could not set extended attribute: xattr.Set /var/lib/ocis/storage/metadata/spaces/95/cb8724-03b2-11eb-a0a6-c33ef8ef53ad/nodes/cd/72/fb/51/-2e6a-431c-b6ce-636a4897b8f1 user.ocis.cs.sha1: no such file or directory"
binPath=/var/lib/ocis/storage/metadata/uploads/201e04ed-4702-4567-9797-6de8fdcc307d
csType=sha1
hash="�S�L�](Ɯ0���0�Q\x1c� �"
info={
  "ID":"201e04ed-4702-4567-9797-6de8fdcc307d",
  "IsFinal":false,
  "IsPartial":false,
  "MetaData":
    {
      "dir":"/groups",
      "filename":"509a9dcd-bb37-4f4f-a01a-19dca27d9cfa",
      "lockid":""
    },
  "Offset":372,
  "PartialUploads":null,
  "Size":0,
  "SizeIsDeferred":false,
  "Storage":
    {
      "BinPath":"/var/lib/ocis/storage/metadata/uploads/201e04ed-4702-4567-9797-6de8fdcc307d",
      "Idp":"",
      "LogLevel":"trace",
      "NodeId":"cd72fb51-2e6a-431c-b6ce-636a4897b8f1","NodeName":"509a9dcd-bb37-4f4f-a01a-19dca27d9cfa",
      "NodeParentId":"7f73a794-4dd6-4545-b865-cbd2ae58c4fd",
      "SpaceRoot":"95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
      "Type":"OCISStore","UserId":"95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
      "UserName":"",
      "UserType":"application"
    }
  }
pid=1
targetPath=/var/lib/ocis/storage/metadata/spaces/95/cb8724-03b2-11eb-a0a6-c33ef8ef53ad/nodes/cd/72/fb/51/-2e6a-431c-b6ce-636a4897b8f1
{
  "level":"error",
  "service":"storage",
  "pkg":"rgrpc","traceid":"00000000000000000000000000000000",
  "error":"remove /var/lib/ocis/storage/users/spacetypes/personal/4f4e0326-c7d1-4dc6-bf43-f0637d1c0516.flock: no such file or directory",
  "node":"marshaling error: json: unsupported value: encountered a cycle via *node.Node",
  "time":"2022-04-08T05:04:09Z",
  "message":"could not convert to storage space"}
{
  "level":"error",
  "service":"notifications",
  "error":"could not send mail: dial tcp 127.0.0.1:1025: connect: connection refused",
  "event":"ShareCreated",
  "time":"2022-04-08T05:04:09Z",
  "message":"failed to send a message"
}

CC @kulmann @pascalwengerter

@saw-jan
Copy link
Member Author

saw-jan commented Apr 19, 2022

@SwikritiT
Copy link
Contributor

SwikritiT commented Apr 25, 2022

reappeared: https://drone.owncloud.com/owncloud/web/24843/64/15

Scenario: share a folder with multiple users using role as advanced permissions role and different extra permissions # features/webUISharingFolderAdvancedPermissionMultipleUsers/sharedFolderWithMultipleUsersAdvancedPermissions.feature:50
    ✔ 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 the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server # stepDefinitions/middlewareContext.js:66
    ✔ And the administrator has set the default folder for received shares to "Shares" in the server # stepDefinitions/middlewareContext.js:66
    ✔ And these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76
        | username |
        | Alice    |
        | Brian    |
        | Carol    |
    ✔ Given user "Alice" has created folder "/simple-folder" in the server # stepDefinitions/middlewareContext.js:66
    ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:64
    ✔ When the user opens the share dialog for folder "simple-folder" using the webUI # stepDefinitions/sharingContext.js:588
    ✔ And the user selects the following collaborators for the share as "Custom permissions" with "delete, update" permissions: # stepDefinitions/sharingContext.js:371
        | collaborator | type |
        | Brian Murphy | user |
        | Carol King   | user |
    ✔ And the user shares with the selected collaborators # stepDefinitions/sharingContext.js:420
    ✖ And user "Brian" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server # stepDefinitions/middlewareContext.js:66
        Error: Error: Could not find the share to be accepted:
            at Object.acceptShare (/usr/src/app/src/helpers/sharingHelper.js:371:13)
            at runMicrotasks (<anonymous>)
            at processTicksAndRejections (node:internal/process/task_queues:96:5)
            at async /usr/src/app/src/app.js:66:7
            at /var/www/owncloud/web/tests/acceptance/stepDefinitions/middlewareContext.js:38:15
            at runMicrotasks (<anonymous>)
            at processTicksAndRejections (internal/process/task_queues.js:95:5)
    - And user "Carol" accepts the share "Shares/simple-folder" offered by user "Alice" using the sharing API in the server # stepDefinitions/middlewareContext.js:66
    - Then custom permissions "delete, update" should be set for user "Brian Murphy" for folder "simple-folder" on the webUI # stepDefinitions/sharingContext.js:312
    - And custom permissions "delete, update" should be set for user "Carol King" for folder "simple-folder" on the webUI # stepDefinitions/sharingContext.js:312
    - And user "Brian Murphy" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI # stepDefinitions/sharingContext.js:703
    - And user "Carol King" should be listed as "Custom permissions" in the collaborators list for folder "simple-folder" on the webUI # stepDefinitions/sharingContext.js:703
    - And user "Brian" should have received a share with these details in the server: # stepDefinitions/middlewareContext.js:76
        | field       | value                 |
        | uid_owner   | Alice                 |
        | share_with  | Brian                 |
        | file_target | /Shares/simple-folder |
        | item_type   | folder                |
        | permissions | read, delete, update  |
    - And user "Carol" should have received a share with these details in the server: # stepDefinitions/middlewareContext.js:76
        | field       | value                 |
        | uid_owner   | Alice                 |
        | share_with  | Carol                 |
        | file_target | /Shares/simple-folder |
        | item_type   | folder                |
        | permissions | read, delete, update  |
    ✔ 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

@saw-jan
Copy link
Member Author

saw-jan commented May 4, 2022

will be tracked in #6796
closing here

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

No branches or pull requests

2 participants