-
Notifications
You must be signed in to change notification settings - Fork 3
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]: Backends provided no user object for <id> #120
Comments
Another with user id:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Could you add the last commit I just pushed? It includes more debugging. Can you clone the repo to your Nextcloud instance and then send me your debug.log, please? Also, could you add me on Discord? My username is eldertek. |
Hi @eldertek ; I don't use discord, so I won't be able to communicate with you there, however I have dug into this issue deeper, with clues gathered from the commit you added last night. With that commit, it seems to actually be working. Its still throwing the no user object error into the log, but its continuing from that point rather than aborting. From the commandline, there is no error being thrown, probably because I haven't run it with verbose output yet, and its backed the issue down to a debug level rather than error. I think I'm understanding this problem now. It comes down to "Backends provided no user object for {something}". In my case, {something} is "bg69ur3o". I found tons of references to that in my database. oc_talk_rooms.token Most shares have oc_share.share_with set to the recipient uid, but not these ones with Talk. So what is going on, is that something is being shared with a TALK ROOM, rather than a user, which is why there is no user object for it! I believe that the correct handling for this situation is simply to not fatally bail out, just move on. |
Thanks for the detailed investigation! Your analysis is spot-on - the issue occurs when files are shared with Talk rooms (which have 8-character tokens like "bg69ur3o") rather than regular users. I've just pushed a commit that improves how we handle Talk room shares:
Could you please test this new commit to verify it resolves the issue for you? The logs will still show the "no user object" messages but at debug level, and the application should continue processing without problems. Let me know if you see any issues or if further adjustments are needed. |
I think this commit is not a good idea; Reason being.... what happens if someone has a UID that is 8 character alphanum, like "patricia"? Also, while I do have that commit in, I think your regex isn't quite right, because its not catching the talk room token at all on mine. I get "Checking access list", then "Access list retrieved", and then "Backends provided no user object for bg69ur3o". Its also NOT printing the "No user object found (possibly Talk room)" warning, but rather jumping straight to the "Failed to check access rights" error. I think a way better approach to this would be to use IUserManager->get($user) !== null to validate the user. That function returns null if the user doesn't exist. Edit.... Ah, I see what's going on.... the regex didn't catch it because the value of $user will never be a Talk room token. The issue isn't in the $user variable at all! Its in $shares[0]->getSharedWith() ----> ShareService.php:99 Solution: ShareService.php:95 Alternative, or in addition: ShareService.php:40 |
Hi, could you try this commit please :) bfee6c4 |
That commit seems to be working well. All that's left is a NotFoundException at line 107 from $node->getParent() which is making quite a mess in the logs. Presumably every time it is walking up to the root where it can't find a parent? |
What happened?
I see errors in log.
Relevant log output
Version
30.x
Installation Type
Standard Installation
Additional context
version 1.6.0
The text was updated successfully, but these errors were encountered: