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

Shared with me view: error on changing status of files #4946

Closed
elizavetaRa opened this issue Apr 9, 2021 · 12 comments
Closed

Shared with me view: error on changing status of files #4946

elizavetaRa opened this issue Apr 9, 2021 · 12 comments

Comments

@elizavetaRa
Copy link
Member

elizavetaRa commented Apr 9, 2021

Steps to reproduce

  1. Installing ocis from binary, installing web from source code
  2. Go to "Shared with me" section
  3. Click on "Accept" or "Decline"

Expected behaviour

Status of clicked file changes to selected

Actual behaviour

Error "Cannot read property "length" of undefined" appears, file status is only updated on page reload. Sometimes error "unexpected end of JSON input" appears

Console output: vendor.js:77546 POST https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/a327b315-e26f-4dd4-8325-4eb9e0fbd876?format=json 500 (Internal Server Error)

Web server: OCIS 1.4.0, also tested with OCIS 1.3.0-rc1

Updated from an older ownCloud or fresh install: Web: latest master commit (ddc72b5), commit from yesterday (33888cc), works in last release version (2.1.0)

Bildschirmfoto vom 2021-04-09 15-18-45

@individual-it
Copy link
Member

is this a duplicate of owncloud/product#276 ?

@kulmann
Copy link
Member

kulmann commented Apr 20, 2021

With recent changes in web we wanted to be clever and use the response of the accept/decline request for updating the respective row of the shared-with-me page. For oc10 this works fine, for oCIS the response is empty, so we cannot use it. As a quick fix we have two options:
a) go back to reloading the shared with me list (that's what we had in place in the past)
b) request the respective share and apply it to the row in the list

I prefer b) as it's less payload, but a) is the quickest solution. Looking into it right now.

@kulmann
Copy link
Member

kulmann commented Apr 20, 2021

IMO the best solution would be to actually return the share in the response, like we had it for oc10. But that's also the one that takes the most time to implement. Will work on a quick fix for now.

@kulmann
Copy link
Member

kulmann commented Apr 21, 2021

@butonic since you looked into it today, how much effort are we talking about with returning the share in the response in reva?

@butonic
Copy link
Member

butonic commented Apr 27, 2021

after changing a share the endpoints need to reread the share and do a stat to fill in all necessary data. quite a bit of logic and testing. rough estimation 3 days.

@kulmann
Copy link
Member

kulmann commented May 6, 2021

For now mitigated in web by fetching the share by id after accepting/declining if the response was empty: #4988

@kulmann
Copy link
Member

kulmann commented May 6, 2021

@elizavetaRa could you check if we can close this ticket for now? A fix in reva would be good and is in progress AFAIK. Web will be compatible with that out of the box, as the fix in reva will resemble the oc10 behaviour, which is already working.

@labkode
Copy link

labkode commented May 21, 2021

@kulmann the Reva PR is already there since some weeks but the behaviour is still wrong. We'll give you more details today in the go-live meeting.

@kulmann
Copy link
Member

kulmann commented May 21, 2021

I looked into this again after the meeting. The fix in reva is merged, but ocs.data in the response is not an array (like with oc10), but an object. Should ideally be fixed in reva. @C0rby is taking a look.

@kulmann
Copy link
Member

kulmann commented May 23, 2021

Thanks to the recent fixes from @C0rby this is fixed now. Tested with most recent reva master, works like a charm. Closing this issue.

@kulmann
Copy link
Member

kulmann commented Jun 19, 2021

For the record, there is an unrelated issue owncloud/ocis#2011 when accepting an already declined share in ocis.

@kulmann
Copy link
Member

kulmann commented Jul 2, 2021

For the record, there is an API issue in ocis when declining a previously accepted share owncloud/ocis#2128

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

No branches or pull requests

5 participants