Emoji picker randomly fail to load emojis pictures #250

Closed
opened 2022-11-24 17:41:06 +00:00 by m33 · 10 comments

Hi,

in preview2: the emoji picker randomly fails to load one, or more emojis pictures.

IDK if it is on purpose, I fail to remember how it was going prior migration.

Kind regards
M33

Hi, in preview2: the emoji picker randomly fails to load one, or more emojis pictures. IDK if it is on purpose, I fail to remember how it was going prior migration. Kind regards M33
Author

I was told this happens in misskey too, that's correct.

Plus, it happens on mobile and desktop platforms.

On desktop, I can't see any error about instance's owned ressources in the browser's debug console when it happens.

I was told this happens in misskey too, that's correct. Plus, it happens on mobile and desktop platforms. On desktop, I can't see any error about instance's owned ressources in the browser's debug console when it happens.
Author

I think I have a clue, it seems emojis missing from the picker are not show in the admin/emoji panel.
That would explain why they don't show in the picker, and the ascii shortcut is shown instead of a nice image...

See the admin/emoji panel, no :=B: for instance.

Maybe a little cleanup in the database would help ?

I think I have a clue, it seems emojis missing from the picker are not show in the admin/emoji panel. That would explain why they don't show in the picker, and the ascii shortcut is shown instead of a nice image... See the admin/emoji panel, no :=B: for instance. Maybe a little cleanup in the database would help ?
Owner

Did you remove the emoji recently or modify the database directly? It might still be cached and should fix itself sooner or later.

Did you remove the emoji recently or modify the database directly? It might still be cached and should fix itself sooner or later.
Author

Did you remove the emoji recently or modify the database directly? It might still be cached and should fix itself sooner or later.

No recent emoji suppresion or modification, no direct database edit. But I guess that a database edit would fix this issue.

I don't think it will clear by itself over time, I am not aware of caching policy on emojis.

> Did you remove the emoji recently or modify the database directly? It might still be cached and should fix itself sooner or later. No recent emoji suppresion or modification, no direct database edit. But I guess that a database edit would fix this issue. I don't think it will clear by itself over time, I am not aware of caching policy on emojis.
Owner

Could you please run this SQL query in your database to check something:

SELECT COUNT(1) FROM "emoji" WHERE "host" IS NULL AND "originalUrl" NOT IN (SELECT "url" FROM "drive_file" WHERE "userHost" IS NULL);

The result should be a single row containing a zero.

Could you please run this SQL query in your database to check something: ```SQL SELECT COUNT(1) FROM "emoji" WHERE "host" IS NULL AND "originalUrl" NOT IN (SELECT "url" FROM "drive_file" WHERE "userHost" IS NULL); ``` The result should be a single row containing a zero.
Author

Could you please run this SQL query in your database to check something:

SELECT COUNT(1) FROM "emoji" WHERE "host" IS NULL AND "originalUrl" NOT IN (SELECT "url" FROM "drive_file" WHERE "userHost" IS NULL);

The result should be a single row containing a zero.

Well I'm just playing with dbeaver and my database, just in time...

It returns 0 rows. No error whatsoever.

The emoji table contains all 39 custom emojis I had loaded. I have a particular one that fails predictabily. But it really looks just fine. The URL do show the icon on a web browser.

> Could you please run this SQL query in your database to check something: > ```SQL > SELECT COUNT(1) FROM "emoji" WHERE "host" IS NULL AND "originalUrl" NOT IN (SELECT "url" FROM "drive_file" WHERE "userHost" IS NULL); > ``` > The result should be a single row containing a zero. Well I'm just playing with dbeaver and my database, just in time... It returns 0 rows. No error whatsoever. The emoji table contains all 39 custom emojis I had loaded. I have a particular one that fails predictabily. But it really looks just fine. The URL do show the icon on a web browser.
Author

I wonder where the emoji picker take its emoji list. It shows emojis text shortcuts that are missing from the emoji's table in the database, that must be wrong

I wonder where the emoji picker take its emoji list. It shows emojis text shortcuts that are missing from the emoji's table in the database, that must be wrong
Author

It's a browser caching issue.

I don't know the root cause, but missing emojis disapear when you actively clear all cached datas using the browsers developper console. Not only session cookies, but also the web app's local storage.
That explain why the problem is worse, or more frequently seen on mobile platform, where you can't clear all that stuff easily. For instance, I use PWA on mobile, that leaves no chances to clear anything.
On desktop, people would more often have "clear all on exit" enabled on their browsers, and probably don't use misskey/foundkey as PWA.

Unfortunately I didn't screenshot the app local storage before clearing datas, but here is a screenshot of a fresh app data, and one of the emojis that went missing. Now its definition on client side matches what I see in the server's database on emoji table.

By the way, the "refresh" or "clear cache" actions don't clear the app local storage. A new "really clear all cache and local storage" button would help.

It's a browser caching issue. I don't know the root cause, but missing emojis disapear when you actively clear all cached datas using the browsers developper console. Not only session cookies, but also the web app's local storage. That explain why the problem is worse, or more frequently seen on mobile platform, where you can't clear all that stuff easily. For instance, I use PWA on mobile, that leaves no chances to clear anything. On desktop, people would more often have "clear all on exit" enabled on their browsers, and probably don't use misskey/foundkey as PWA. Unfortunately I didn't screenshot the app local storage before clearing datas, but here is a screenshot of a fresh app data, and one of the emojis that went missing. Now its definition on client side matches what I see in the server's database on emoji table. By the way, the "refresh" or "clear cache" actions don't clear the app local storage. A new "really clear all cache and local storage" button would help.
Owner

By the way, the "refresh" or "clear cache" actions don't clear the app local storage. A new "really clear all cache and local storage" button would help.

see #98

> By the way, the "refresh" or "clear cache" actions don't clear the app local storage. A new "really clear all cache and local storage" button would help. see #98
Owner

If it is a browser caching issue I don't think we can do much about this. As for the list of emoji not being updated "live" is more or less intended. It should be updated on page reload.

If it is a browser caching issue I don't think we can do much about this. As for the list of emoji not being updated "live" is more or less intended. It should be updated on page reload.
Sign in to join this conversation.
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#250
No description provided.