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.
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.
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.