Jump to content

Missing thumbnails on homepage but visible in collection


Recommended Posts

Posted

I'm having some problems with thumbnails not being visible on the homepage but they are when I click inside the collection.

 

The URL that is being hit by the homepage is:

/Items/7711/Images/Primary?maxHeight=380&maxWidth=254&tag=<long-tag>&quality=90

The URL that is being hit by the collection is:

/Items/7711/Images/Primary?maxHeight=411&maxWidth=275&tag=<long-tag>&quality=90

<long-tag> is the same for both URLs. The only differences between the two links are the maxHeight and maxWidth variables.

 

Refreshing the metadata fixes this but seems like a bug? I've just upgraded to 4.1.1.0 but I think this was present on the previous version I was on (4.0.*.*).

 

In the failure case, the server still returns a 200 with only headers (no body and the content-length set to 0 in the headers).

 

When I click "Edit Images", I can see a "Primary" (1000x1500), "Logo" (800x310), and "Thumb" (1000x562) which all render correctly.

 

Is this a known issue?

Posted

Hi, no, this is not a known issue. have you tried clearing browsing data?

Posted

Hi Luke,

 

The browser cache is unrelated unfortunately. The problem is when the web browser has "image/webp" in the "Accept" header. If I remove that, I get an image back from the server.

 

Here are the requests:

$ diff -U0 <(curl -sS --fail -IX GET "https://<DOMAIN>/Items/5755/Images/Primary?maxHeight=380&maxWidth=254&tag=<long-tag>&quality=90" -H "Accept: image/webp,image/apng,image/*,*/*;q=0.8") <(curl -sS --fail -IX GET "https://<DOMAIN>/Items/5755/Images/Primary?maxHeight=380&maxWidth=254&tag=<long-tag>&quality=90" -H "Accept: image/apng,image/*,*/*;q=0.8")
--- /dev/fd/63  2019-06-02 10:16:41.879914191 +0000
+++ /dev/fd/62  2019-06-02 10:16:41.879914191 +0000
@@ -4,2 +4,2 @@
-Content-Type: image/webp
-Content-Length: 0
+Content-Type: image/jpeg
+Content-Length: 29503
@@ -11 +11 @@
-Age: 2376616
+Age: 1277
@@ -13 +13 @@
-Etag: "5ac3312de82db85f1e4ab87ce374e345"
+Etag: "32352c071f8e269f0f56082cd8db83ce"
@@ -15 +15 @@
-Last-Modified: Sun, 05 May 2019 22:06:26 GMT
+Last-Modified: Sun, 02 Jun 2019 09:55:25 GMT

Two things of note here:

 - image/webp is being returned for one and image/jpeg is being returned for the other. This implies that there is a corrupt/empty "image/webp" file stuck in the cache somewhere

 - Last-Modified is about a month ago for the bad image implying it is reading something from the cache.

 

Here's a search through my cache for empty files:

$ (echo "Size Date Time Path"; find /volumes/emby-config/cache/images -size 0 | xargs ls -lha | awk '{print $5 " " $7 "-" $6 " " $8 " " $9}') | column -t
Size  Date   Time   Path
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/0/00c0199c-ef80-5add-8060-96f59e496d73.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/0/04dc08a5-b90b-6f71-ce90-9923f898e833.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/0/09a80169-16fd-bbca-773f-6f079caa5c20.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/0/0ae72fbd-fa2b-40f8-378d-7b198ee6b9f8.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/0/0d3fda9d-cb62-82e5-5512-1d5c16a91373.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/0/0de50405-bdd3-f479-028c-b167dfac24de.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/1/1b5699ce-d79f-fba1-a04a-43f289cccd53.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/2/2aeda2d8-7698-5963-fec1-069a3efc56f8.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/2/2e20077f-3aec-747f-7910-2a76be4c4820.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/3/378df359-f5a1-a845-bf77-d455035517e4.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/3/3d5c0772-f46d-29be-d639-81cb1d0be817.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/4/470a8ced-356e-76b2-4c78-41970bfc0939.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/4/489e3a08-e5f4-86be-f0a8-97666bce5b1b.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/4/48f96d71-ee93-a82b-89d4-d042a807553d.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/5/57b320a0-dde7-899c-56aa-6b851d734b4d.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/6/638f38c6-78bd-ed91-a091-629371101e14.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/6/641be8b8-e3cc-eec1-ab2d-5e1c80655daf.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/6/67172529-a42c-63fb-c918-145cda68dde2.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/6/6741d077-dd1f-518e-52d7-d6c03905d1d2.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/6/6d8ec4d6-31da-1640-981b-387b553ddefb.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/7/71ca52d2-93b1-0dee-6f40-2b95f67a3a5e.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/7/72111a05-6a9d-2447-0a6d-af665bbe8045.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/7/77b5f805-06c8-5b8a-c33a-f1927ba29ded.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/7/79d1ee8d-24e8-2a01-ccd8-1e245b38c87b.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/7/7a81aa16-37a7-64e3-af62-065bc1f377ad.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/7/7c8cee35-1ae4-767a-8561-4595f1831cab.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/8/8f90fcfe-15f7-85da-afdf-421814337099.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/8/8fa8677e-03a5-6d8d-cc7e-ba83a676d25d.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/9/9b889f73-1339-99a1-420d-55c286d8005e.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/9/9d15162c-c25b-8231-0331-44aeee01eb6c.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/a/adefc722-831c-9fbf-190e-5d33c2e112ca.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/a/aea846cd-e653-37c1-562c-e28e8235672e.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/b/bb4460b3-b47f-c4d3-726b-68e1200f0804.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/c/c00dfaa7-8ce9-75e4-6058-20d7cdc1e1dd.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/c/c02929f6-8c43-b8d9-f1a6-f131170639a0.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/c/c07294b3-efb8-009c-2363-a0ba4dd69efe.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/c/cb93fd88-7418-172b-04e1-a8499ee5f44b.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/c/cde4990c-0c51-61be-5fc0-51f06bec39aa.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/c/cf5adda8-f72a-66a0-ce9c-c21351380819.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/d/d61789e7-2221-cf20-8bb3-0c1dbdb5d8f2.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/d/db837a42-8429-b5cb-294e-c54d0792a9f1.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/e/e386bbc6-e7bd-8221-3bbf-86017bc11662.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/e/e8519abd-87be-b052-b10a-bfe57a16bf1b.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/e/e9f1e3d9-5292-8758-14e9-412d43c0256e.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/e/eb50d36a-c4cf-54a6-d114-abdf9194ce51.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/f/f44bd7dd-6577-cf27-8eda-4f20a213af4a.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/f/f67dcf4c-6dbe-c499-2708-b1585317b584.webp
0     5-May  22:06  /volumes/emby-config/cache/images/resized-images/f/fa19e68c-25cd-0b70-1e70-d337c80368ca.webp
0     4-May  21:31  /volumes/emby-config/cache/images/resized-images/f/fff63afc-2128-b643-3e5a-092b53a30968.webp

It looks like something went wrong while Emby was writing files to disk. I think you may have to write these files to another place and then, only if you get exit code 0, move them atomically to the correct place?

 

From looking at some host metrics, this happened when I was out of disk space, so that is the error case that isn't being handled properly. When you are out of space, you can usually (but not always) create files but you cannot put any data in them.

Posted

 

 

 - image/webp is being returned for one and image/jpeg is being returned for the other. This implies that there is a corrupt/empty "image/webp" file stuck in the cache somewhere

 

Hi, no, this just means the original file met all of the requested criteria so we were able to send that back without having to do any conversion.

Posted

 

 

From looking at some host metrics, this happened when I was out of disk space, so that is the error case that isn't being handled properly.

 

Hi, yes, we'll look at improving this. Thanks for reporting.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...