Photo app - /remote.php/dav returning nothing on image/jpeg

Nextcloud version (eg, 20.0.5): 26.0.1
Operating system and version (eg, Ubuntu 20.04): Debian 5.10.162-1
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): php8.1

In the photos app all media and photos stay empty after enabling the Recognize app. Disabling does not fix this. Checked response awnser/remote.php/dav/ with request

<?xml version="1.0" encoding="UTF-8"?>
<d:searchrequest xmlns:d="DAV:"
                 xmlns:oc="http://owncloud.org/ns"
                 xmlns:nc="http://nextcloud.org/ns"
                 xmlns:ns="https://github.com/icewind1991/SearchDAV/ns"
                 xmlns:ocs="http://open-collaboration-services.org/ns">
	<d:basicsearch>
		<d:select>
			<d:prop>
				<d:getcontentlength/>
				<d:getcontenttype/>
				<d:getetag/>
				<d:getlastmodified/>
				<d:resourcetype/>
				<nc:face-detections/>
				<nc:file-metadata-size/>
				<nc:has-preview/>
				<nc:realpath/>
				<oc:favorite/>
				<oc:fileid/>
				<oc:permissions/>
				<nc:nbItems/>
			</d:prop>
		</d:select>
		<d:from>
			<d:scope>
				<d:href>/files/USERNAME/</d:href>
				<d:depth>infinity</d:depth>
			</d:scope>
		</d:from>
		<d:where>
			<d:and>
				<d:or>
					<d:eq>
						<d:prop>
							<d:getcontenttype/>
						</d:prop>
						<d:literal>image/png</d:literal>
					</d:eq>
					<d:eq>
						<d:prop>
							<d:getcontenttype/>
						</d:prop>
						<d:literal>image/jpeg</d:literal>
					</d:eq>
					<d:eq>
						<d:prop>
							<d:getcontenttype/>
						</d:prop>
						<d:literal>image/heic</d:literal>
					</d:eq>
				</d:or>
			</d:and>
		</d:where>
		<d:orderby>
			<d:order>
				<d:prop>
					<d:getlastmodified/>
				</d:prop>
				<d:descending/>
			</d:order>
		</d:orderby>
		<d:limit>
			<d:nresults>200</d:nresults>
			<ns:firstresult>0</ns:firstresult>
		</d:limit>
	</d:basicsearch>
</d:searchrequest>

returns

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:"
               xmlns:s="http://sabredav.org/ns"
               xmlns:oc="http://owncloud.org/ns"
               xmlns:nc="http://nextcloud.org/ns">
	<d:response>
		<d:href>/remote.php/dav/files/USERNAME/Photos/2023/04/IMG_20230423_122410.jpg</d:href>
		<d:propstat>
			<d:prop>
				<d:getcontentlength>6106747</d:getcontentlength>
				<d:getcontenttype>image/jpeg</d:getcontenttype>
				<d:getetag>&quot;0bd699c28a6e7ab26f32d3e1de8b9c12&quot;</d:getetag>
				<d:getlastmodified>Sun, 23 Apr 2023 10:24:14 GMT</d:getlastmodified>
				<d:resourcetype/>
				<nc:face-detections>[]</nc:face-detections>
				<nc:file-metadata-size>{&quot;width&quot;:4080,&quot;height&quot;:3060}</nc:file-metadata-size>
				<nc:has-preview>true</nc:has-preview>
				<oc:favorite>0</oc:favorite>
				<oc:fileid>5110049</oc:fileid>
				<oc:permissions>RGDNVW</oc:permissions>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
		<d:propstat>
			<d:prop>
				<nc:realpath/>
				<nc:nbItems/>
			</d:prop>
			<d:status>HTTP/1.1 404 Not Found</d:status>
		</d:propstat>
	</d:response>
	<d:response>
		<d:href>/remote.php/dav/files/USERNAME/Photos/2023/04/IMG_20230423_122402.jpg</d:href>
		<d:propstat>
			<d:prop>
				<d:getcontentlength>6293352</d:getcontentlength>
				<d:getcontenttype>image/jpeg</d:getcontenttype>
				<d:getetag>&quot;e590c3af951de5d5520e197a0d8e6cc0&quot;</d:getetag>
				<d:getlastmodified>Sun, 23 Apr 2023 10:24:04 GMT</d:getlastmodified>
				<d:resourcetype/>
				<nc:face-detections>[]</nc:face-detections>
				<nc:file-metadata-size>{&quot;width&quot;:4080,&quot;height&quot;:3060}</nc:file-metadata-size>
				<nc:has-preview>true</nc:has-preview>
				<oc:favorite>0</oc:favorite>
				<oc:fileid>5110094</oc:fileid>
				<oc:permissions>RGDNVW</oc:permissions>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
		<d:propstat>
			<d:prop>
				<nc:realpath/>
				<nc:nbItems/>
			</d:prop>
			<d:status>HTTP/1.1 404 Not Found</d:status>
		</d:propstat>
	</d:response>
...
	<d:response>
		<d:href>/remote.php/dav/files/USERNAME/Photos/2023/02/IMG_20230222_125713.jpg</d:href>
		<d:propstat>
			<d:prop>
				<d:getcontentlength>1783005</d:getcontentlength>
				<d:getcontenttype>image/jpeg</d:getcontenttype>
				<d:getetag>&quot;ee7638ce5bc61f7ddb350ff593dc5eb9&quot;</d:getetag>
				<d:getlastmodified>Wed, 22 Feb 2023 11:57:14 GMT</d:getlastmodified>
				<d:resourcetype/>
				<nc:face-detections>[]</nc:face-detections>
				<nc:file-metadata-size>{&quot;width&quot;:3264,&quot;height&quot;:2448}</nc:file-metadata-size>
				<nc:has-preview>true</nc:has-preview>
				<oc:favorite>0</oc:favorite>
				<oc:fileid>5054371</oc:fileid>
				<oc:permissions>RGDNVW</oc:permissions>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
		<d:propstat>
			<d:prop>
				<nc:realpath/>
				<nc:nbItems/>
			</d:prop>
			<d:status>HTTP/1.1 404 Not Found</d:status>
		</d:propstat>
	</d:response>
</d:multistatus>

responses with 200 OK: 205
responses with 404 Not Found: 200

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Open photo App
  2. Click on Photos

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'passwordsalt' => 'SECRET',
  'secret' => 'SECRET',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'SECRET',
    3 => 'SECRET',
  ),
  'datadirectory' => '/srv/nextcloud',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '26.0.1.1',
  'dbname' => 'SECRETnextcloudDB',
  'dbhost' => 'SECRETIP',
  'dbport' => '',
  'dbtableprefix' => 'SECRETPrefix',
  'dbuser' => 'nextclouddbuser',
  'dbpassword' => 'SECRET',
  'installed' => true,
  'instanceid' => 'SECRET',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'SECRET',
  'mail_domain' => 'SECRET',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => '0',
    'dbindex' => 1,
    'password' => 'SECRET',
    'timeout' => 1.5,
  ),
  'theme' => '',
  'loglevel' => 0,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'SECRET',
  'mail_smtpport' => '465',
  'mail_smtpname' => SECRET',
  'mail_smtppassword' => 'SECRET',
  'mail_smtpsecure' => 'ssl',
  'maintenance' => false,
  'updater.release.channel' => 'stable',
  'mysql.utf8mb4' => true,
  'app_install_overwrite' =>
  array (
    0 => 'files_reader',
    1 => 'files_texteditor',
    2 => 'dashboard',
    3 => 'proxy',
    4 => 'flowupload',
    5 => 'twofactor_yubikey',
    6 => 'ldap_write_support',
    7 => 'apporder',
    8 => 'riotchat',
    9 => 'extract',
    10 => 'ransomware_protection',
  ),
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'default_phone_region' => 'be',
  'preview_max_memory' => 512,
  'mail_sendmailmode' => 'smtp',
);

Possibly related to All Media and Photos views are blank after upgrade to 26.0.1 · Issue #1753 · nextcloud/photos · GitHub

1 Like