-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[BUG] Shares in non-root are not displayed #4435
Conversation
...omLibrary/src/main/java/com/owncloud/android/lib/resources/shares/GetRemoteShareOperation.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my part the work is fine. Only one thing is missing, could you add the calens file? Here you have some information to do it: https://github.com/owncloud/android/blob/master/changelog/README.md
...omLibrary/src/main/java/com/owncloud/android/lib/resources/shares/GetRemoteShareOperation.kt
Outdated
Show resolved
Hide resolved
43bd17b
to
b99e464
Compare
@Aitorbp , Added the changelog 👍 |
b99e464
to
c9b2ddf
Compare
c9b2ddf
to
f10587e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parneet-guraya very good job! I will move to QA!
Let's QA this |
@parneet-guraya first, thanks for the contribution. I noticed that the fix applies to the public links, but for sharing with users and groups (also reproducible and reported in the issue as a note). Could you take a look? |
@jesmrec , you're right. However, I'm not able to add any shares, it seems the demo account does not have privileges? Record_2024-07-24-02-45-11.mp4This is what I get as a response (even on master) but I'm able to do the same from web just fine. Could you give it a look? |
@parneet-guraya this should not be a matter of permissions because web allows to share. Something is not correct in the app there. I will try to check. |
@parneet-guraya which server instance are you using to check it? |
I was able to reproduce the problem with |
Hi @jesmrec, I'm using demo instance at So, to run different version i.e 5.0.6, I guess I have to run it locally? |
You can use this instance with the stable version: |
@jesmrec, Would you mind directing me to the resource to how to do it? |
Sorry, what do you mean? you can access https://ocis.ocis.production.owncloud.works just with the URL, as any other instance. Is that right? if not, let me know. To clarify: https://ocis.ocis.production.owncloud.works -> production version, the current stable (5.0.6) The problem is not reproducible in production, and reproducible in rolling |
Okay, I get it now. Thanks 👍 |
@parneet-guraya were you able to finally reproduce the "share with users" problem? let us know if you need some extra help or clarification. thanks!! |
Hi, turns out the But, now in this case the only request that we make to share, returns the wrong path. So, it is a backend issue. I read from the issue created by @jesmrec comment that mobile clients are using deprecated API so could it be the bug exists in the deprecated api? A quick fix could be just to make a refresh call from remote after doing the Do let me know what you think? @JuancaG05 @Aitorbp |
Don't worry about this, ocs is not deprecrated yet. Problem in the oCIS issue finally comes from other side. |
Hello @parneet-guraya , very good research. As you know, we are using a deprecated API and we don't know if someone could change something in this API. So maybe the best way at the moment is try to do to refresh as you comment. So, yes, go for it 👍 |
Signed-off-by: parneet-guraya <[email protected]>
Signed-off-by: parneet-guraya <[email protected]>
f10587e
to
85108ef
Compare
Hi, pushed the fix 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parneet-guraya a few changes more and ready to go 💯
owncloudApp/src/main/java/com/owncloud/android/presentation/sharing/ShareActivity.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: parneet-guraya <[email protected]>
85108ef
to
c0f49a7
Compare
Now, everything is fixed. @Aitorbp please approve if you think this is OK as well and we can merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🥇 Good job!
Fixes: #4432
Demo -->
Record_2024-07-10-13-37-07.mp4
The reason for this issue was whenever we create/edit a link. After
POST
request we make aGET
call to retrieve the share info because it was mentioned here that the POST request does not return the response that we need.But the
GET
request is returning wrong path i.e for a file that exists at/Folder/file
it returns the path/file
. So, it always returns a path that a file exists in the root even though it is inside some folder.Above screenshot shows two responses. First one is the
POST
which has path /Fol/file and the second one isGET
response which has path /file (which is incorrect)Also the incorrect response from
GET
lead to duplicate entries in DB -->ShareView
is refreshed and upon sync (from remote), instead of getting replaced the new entry gets added because there's path ##difference.Solution -->
Turns out
POST
request does return same response asGET
does and also with correctfilePath
. So, now the need forGET
doesn't exist.