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

Textarea in markdown text editor gets disable sometimes in OCIS #6798

Closed
SwikritiT opened this issue Apr 21, 2022 · 16 comments
Closed

Textarea in markdown text editor gets disable sometimes in OCIS #6798

SwikritiT opened this issue Apr 21, 2022 · 16 comments
Labels
Type:Bug Something isn't working

Comments

@SwikritiT
Copy link
Contributor

SwikritiT commented Apr 21, 2022

caught in: #6792

Seems like sometimes the text editor gets disabled.
This got reproduced in OCIS only, couldn't reproduce in OC10. Couldn't reproduce manually but only inside the test environment.
cannotWrite

log:

ocis_1             | {"level":"error","service":"storage","pkg":"rgrpc","traceid":"00000000000000000000000000000000","error":"remove /var/lib/ocis/storage/users/spacetypes/personal/eee9509e-e5f5-4825-83c4-703f7cc517ff.flock: no such file or directory","node":"marshaling error: json: unsupported value: encountered a cycle via *node.Node","time":"2022-04-25T07:24:24Z","message":"could not convert to storage space"}
ocis_1             | {"level":"error","service":"storage","pkg":"rgrpc","traceid":"00000000000000000000000000000000","error":"error: permission denied: user Alice is not allowed to Stat the space a49ed279-2ed7-419b-a438-4310848ef6a5","status":{"code":8,"message":"permission denied","trace":"00000000000000000000000000000000"},"filters":[{"type":2,"Term":{"Id":{"opaque_id":"ddc2004c-0977-11eb-9d3f-a793888cd0f8!a49ed279-2ed7-419b-a438-4310848ef6a5"}}},{"type":4,"Term":{"SpaceType":"+grant"}}],"time":"2022-04-25T07:24:26Z","message":"failed to list storage spaces"}
ocis_1             | {"level":"error","service":"storage","pkg":"rgrpc","traceid":"00000000000000000000000000000000","status":{"code":6,"message":"gateway could not find space for ref=resource_id:\u003cstorage_id:\"ddc2004c-0977-11eb-9d3f-a793888cd0f8\" opaque_id:\"a49ed279-2ed7-419b-a438-4310848ef6a5\" \u003e ","trace":"00000000000000000000000000000000"},"resource_id":{"storage_id":"ddc2004c-0977-11eb-9d3f-a793888cd0f8","opaque_id":"a49ed279-2ed7-419b-a438-4310848ef6a5"},"time":"2022-04-25T07:24:26Z","message":"ListShares: could not stat resource"}
@SwikritiT SwikritiT added the Type:Bug Something isn't working label Apr 21, 2022
@SwikritiT
Copy link
Contributor Author

recent failure: https://drone.owncloud.com/owncloud/web/25488/54/15

webUITextEditor/textFile.feature:84

@phil-davis
Copy link
Contributor

Happened in PR #4508
https://drone.owncloud.com/owncloud/ocis/15218/70/14

Scenario: update a markdown file with new content # features/webUITextEditor/textFile.feature:21
- Connecting to selenium on port 4444...

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

    Given user "Alice" has been created with default attributes and without skeleton files in the server
    And user "Alice" has uploaded file with content "simple markdown file" to "simple.md" in the server
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 622 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 185 milliseconds.
√ Element <#files-view> was visible after 599 milliseconds.
√ Element <//*[self::table[contains(@class, "files-table")] or self::div[contains(@class, "files-empty")] or self::div[contains(@class, "files-not-found")]]> was visible after 90 milliseconds.
    And the user has browsed to the personal page
√ Element <//nav[@id="files-breadcrumb"]//*[(self::a or self::button)]/span[contains(text(),'Personal')]> was visible after 39 milliseconds.
    Given the user has opened file "simple.md" in the text editor webUI
√ Element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='simple.md' or @data-test-resource-path='/simple.md') and @data-test-resource-type='file']/parent::*> was visible after 52 milliseconds.
√ Element <#text-editor-input> was visible after 66 milliseconds.
√ Element <.oc-resource-name> was visible after 35 milliseconds.
    When the user inputs the content "updated content" in the text editor webUI
√ Element <#text-editor-input> was visible after 20 milliseconds.
    And the user saves the file in the text editor webUI
√ Element <#text-editor-controls-save> was visible after 39 milliseconds.
    And the user closes the text editor using the webUI
√ Element <#app-top-bar-close> was visible after 57 milliseconds.
    Then as "Alice" the file "simple.md" should have the content "updated content" in the server
    ✖ failed
      Error: AssertionError [ERR_ASSERTION]: File should have content "updated content", but found "simple markdown file"
          at fileShouldHaveContent (/usr/src/app/src/stepDefinitions/webdavContext.js:35:17)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async /usr/src/app/src/app.js:61:7
          at /drone/src/webTestRunner/tests/acceptance/stepDefinitions/middlewareContext.js:38:15
          at processTicksAndRejections (internal/process/task_queues.js:95:5)

@phil-davis
Copy link
Contributor

Scenario: append new content in a markdown file # features/webUITextEditor/textFile.feature:29
- Connecting to selenium on port 4444...

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

    Given user "Alice" has been created with default attributes and without skeleton files in the server
    And user "Alice" has uploaded file with content "simple markdown file" to "simple.md" in the server
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 635 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 147 milliseconds.
√ Element <#files-view> was visible after 714 milliseconds.
√ Element <//*[self::table[contains(@class, "files-table")] or self::div[contains(@class, "files-empty")] or self::div[contains(@class, "files-not-found")]]> was visible after 40 milliseconds.
    And the user has browsed to the personal page
√ Element <//nav[@id="files-breadcrumb"]//*[(self::a or self::button)]/span[contains(text(),'Personal')]> was visible after 34 milliseconds.
    Given the user has opened file "simple.md" in the text editor webUI
√ Element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='simple.md' or @data-test-resource-path='/simple.md') and @data-test-resource-type='file']/parent::*> was visible after 58 milliseconds.
√ Element <#text-editor-input> was visible after 67 milliseconds.
√ Element <.oc-resource-name> was visible after 32 milliseconds.
    When the user appends the content " new content added" in the text editor webUI
√ Element <#text-editor-input> was visible after 21 milliseconds.
    And the user saves the file in the text editor webUI
√ Element <#text-editor-controls-save> was visible after 35 milliseconds.
    And the user closes the text editor using the webUI
√ Element <#app-top-bar-close> was visible after 66 milliseconds.
    Then as "Alice" the file "simple.md" should have the content "simple markdown file new content added" in the server
    ✖ failed
      Error: AssertionError [ERR_ASSERTION]: File should have content "simple markdown file new content added", but found "simple markdown file"
          at fileShouldHaveContent (/usr/src/app/src/stepDefinitions/webdavContext.js:35:17)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async /usr/src/app/src/app.js:61:7
          at /drone/src/webTestRunner/tests/acceptance/stepDefinitions/middlewareContext.js:38:15
          at processTicksAndRejections (internal/process/task_queues.js:95:5)

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/ocis/15219/70/14

Checking expected failures in //drone/src/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md
Error: Scenario webUITextEditor/textFile.feature:21 failed but was not expected to fail.
Error: Scenario webUITextEditor/textFile.feature:29 failed but was not expected to fail.
runsh: Total unexpected failed scenarios throughout the test run:
webUITextEditor/textFile.feature:21
webUITextEditor/textFile.feature:29

These failed again - why is that?

@phil-davis
Copy link
Contributor

Also failed the same in nightly CI https://drone.owncloud.com/owncloud/ocis/15221/69/14

I put this back in the QA project. It will be good for someone to try again to reproduce this locally. Maybe it will fail often enough that we can find some clue about what conditions make it fail?

@SwikritiT SwikritiT self-assigned this Sep 6, 2022
@SwikritiT
Copy link
Contributor Author

Also failed the same in nightly CI https://drone.owncloud.com/owncloud/ocis/15221/69/14

I put this back in the QA project. It will be good for someone to try again to reproduce this locally. Maybe it will fail often enough that we can find some clue about what conditions make it fail?

I'll take a look

@SwikritiT
Copy link
Contributor Author

Hard failure locally seems like there's a new issue. The content in the text editor is not saved at all

simplescreenrecorder-2022-09-06_10.13.33.mp4

@phil-davis
Copy link
Contributor

It will be useful to try a full-ci run in web, and in ocis, in a test PR to confirm which CI this happens in. Then we can try to see what commit in web or ocis has made this break again.

@SwikritiT
Copy link
Contributor Author

It will be useful to try a full-ci run in web, and in ocis, in a test PR to confirm which CI this happens in. Then we can try to see what commit in web or ocis has made this break again.

I'll do that!

@SwikritiT
Copy link
Contributor Author

SwikritiT commented Sep 6, 2022

trying to write any content to a text editor and saving it gives 409

text

@SwikritiT
Copy link
Contributor Author

CI passes in web https://drone.owncloud.com/owncloud/web/28099 but fails on OCIS https://drone.owncloud.com/owncloud/ocis/15223
I'll git bisect and find out which ocis commit introduced the bug

@SwikritiT
Copy link
Contributor Author

SwikritiT commented Sep 6, 2022

upon git bisect, it shows that this is a first bad commit

c5bde43ba1ce99e052e053c5ed288a59a71ff7c0 is the first bad commit
commit c5bde43ba1ce99e052e053c5ed288a59a71ff7c0
Author: Jörn Friedrich Dreyer <[email protected]>
Date:   Wed Aug 31 10:32:55 2022 +0000

    update reva
    
    Signed-off-by: Jörn Friedrich Dreyer <[email protected]>

 go.mod | 4 +---
 go.sum | 2 ++
 2 files changed, 3 insertions(+), 3 deletions(-)

cc: @phil-davis

@SwikritiT
Copy link
Contributor Author

Points to this PR owncloud/ocis#4436

@kulmann
Copy link
Member

kulmann commented Sep 6, 2022

@micbar and @butonic found the underlying issue of the 409 in github.com/cs3org/reva - PR incoming.

@JammingBen
Copy link
Collaborator

I assume this has been fixed meanwhile, hence I'm closing here.

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
None yet
Development

No branches or pull requests

4 participants