nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
4.63k stars 555 forks source link

occ metadata:get Command Fails with FilesMetadataNotFoundException for Existing File IDs in Nextcloud 28.0.5 #4938

Closed melbruki closed 4 days ago

melbruki commented 4 days ago

Summary: The occ metadata:get command fails to retrieve metadata for a specific file ID in Nextcloud, throwing an OCP\FilesMetadata\Exceptions\FilesMetadataNotFoundException error.

Steps to Reproduce:

Connect to the Nextcloud instance. Navigate to the Nextcloud directory. Run the occ metadata:get command with a valid file ID.

cd /var/www/html sudo -u www-data php occ metadata:get 702587 Expected Behavior: The command should return metadata for the specified file ID.

Actual Behavior: The command throws an exception:

In MetadataRequestService.php line 91:

[OCP\FilesMetadata\Exceptions\FilesMetadataNotFoundException]

metadata:get [--as-array] [--refresh] [--reset] [--] [] Environment:

Nextcloud Version: 28.0.5 Database: PostgreSQL Additional Context:

The file ID 702587 exists in the oc_filecache table as verified by running the following query: sql Copy code SELECT path FROM oc_filecache WHERE fileid = 702587; The query returns the correct path: bash Copy code files/cloudowner/New document (75).docx The occ command is being run with the correct user (www-data).

Please investigate why the metadata:get command fails to retrieve metadata for existing file IDs and whether there are any additional configurations or prerequisites required.

szaimen commented 4 days ago

Hi, please open an issue here if there shouldnt be one already: https://github.com/nextcloud/server