Skip to content

fix(files_metadata): skip UpdateSingleMetadata silently for non-local owners#61066

Open
deic-cloud wants to merge 1 commit into
nextcloud:masterfrom
deic-dk:fix/files-metadata-federated-owner
Open

fix(files_metadata): skip UpdateSingleMetadata silently for non-local owners#61066
deic-cloud wants to merge 1 commit into
nextcloud:masterfrom
deic-dk:fix/files-metadata-federated-owner

Conversation

@deic-cloud

Copy link
Copy Markdown

Summary

When a federated share is accepted, FilesMetadataManager queues UpdateSingleMetadata with the share owner's cloud ID (e.g. alice@remote.host) as the userId. getUserFolder() then throws NoUserException because the cloud ID is not a local user account, producing a spurious warning on every cron run:

issue while running UpdateSingleMetadata
OC\User\NoUserException: Backends provided no user object

This catch is added to handle NoUserException separately and skip without logging — this is an expected condition for federated shares where the file owner lives on a remote instance, not a genuine error.

Test plan

  • Accept a federated share from a remote instance
  • Run cron (php cron.php)
  • Confirm no UpdateSingleMetadata warning appears in the log for the federated share owner
  • Confirm genuine errors (non-NoUserException) still log as warnings

AI assistance disclosure: fix authored with Claude Code assistance (claude-sonnet-4-6).

… owners

When a federated share is accepted, FilesMetadataManager queues
UpdateSingleMetadata with the share owner's cloud ID (e.g.
alice@remote.host) as the userId. getUserFolder() then throws
NoUserException because the cloud ID is not a local user account.

Catch NoUserException separately and skip without logging — this
is an expected condition for federated shares, not an error worth
warning about on every cron run.

Assisted-by: ClaudeCode:claude-sonnet-4-6
@deic-cloud deic-cloud requested a review from a team as a code owner June 8, 2026 10:05
@deic-cloud deic-cloud requested review from Altahrim, artonge, leftybournes and salmart-dev and removed request for a team June 8, 2026 10:05

@artonge artonge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense

@artonge

artonge commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

@deic-cloud have you checked that it is working? Psalm is complaining that the NoUserException is not existing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants