nextcloud / nextcloud/server

[Bug]: GenerateMetadataJob hang if folder/file missing but still in filecache

Open
#45,022 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 29-feedback bug feature: occ feature: previews and thumbnails
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

GenerateMetadataJob hang if folder/file already missing but still in filecache

Steps to reproduce
  1. create a new user
  2. login, let nextcloud create the user home folder, then logout
  3. remove the home folder from filesystem
  4. run 'occ maintenance:repair' to create GenerateMetadataJob
  5. run 'occ background-job:execute --force-execute xxxx' for GenerateMetadataJob's job id
  6. the above command will hang when processing the new user's file => 'Business model canvas.odg'
Expected behavior

bypass all missing folders/files, don't hang the job.

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

IMAP user-backend

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hang with occ maintenance:repair and occ background-job:execute --force-execute using the reported missing home folder and filecache state. Trace GenerateMetadataJob while it processes the missing file or folder; done means the job bypasses missing filesystem entries and completes instead of hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.