Project

General

Profile

Actions

Bug #747

open

When a website has no favorite icon, the favorite icon of the previous website is sometimes displayed

Added by Soren Stoutner over 1 year ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Next Release
Start date:
07/21/2021
Due date:
% Done:

0%

Estimated time:

Description

We had this problem several years ago and it was fixed, but it has recently started happening again. I am not sure what has changed. Perhaps it relates to the same WebView changes that are preventing domain font sizes from working properly.

https://redmine.stoutner.com/issues/739

Actions #1

Updated by Soren Stoutner over 1 year ago

This appears to only happen when a URL is loaded from a link in a website. To replicate, do a search for `Don't kill my app` and then click on the link to dontkillmyapp.com.

Actions #2

Updated by Soren Stoutner about 2 months ago

There is some additional information at #946.

Actions #3

Updated by Soren Stoutner about 2 months ago

This bug is intermittent, which means it probably relates to some sort of race condition.

Actions #4

Updated by Soren Stoutner about 2 months ago

  • Subject changed from When a website has no favorite icon, the favorite icon of the previous website is displayed to When a website has no favorite icon, the favorite icon of the previous website is sometimes displayed
Actions #5

Updated by Soren Stoutner about 2 months ago

The problem is caused because favorite icon requests are asynchronous. They are often (or perhaps always) not returned (or maybe even made) until after the webpage "finishes" loading. Sometimes, they can be significantly delayed.

If a website with a favorite icon is loaded and then another website without a favorite icon is loaded the favorite icon for the first website might be returned after the WebView has moved on to the second website. `onReceivedIcon` does not provide any mechanism to determine which URL requested the icon.

https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)

In the past, I was able to work around this a bit by discarding any icons received while a website is loading, as these will be from previous websites. However, sometimes a favorite icon is so delayed that it doesn't load until after the second website has finished loading, which leads to this bug.

There isn't really anything I can do to work around this in Privacy Browser, but I will submit an upstream bug to the Chromium project and see if they will address it there.

Actions #7

Updated by Soren Stoutner about 2 months ago

  • Status changed from New to In Progress
Actions

Also available in: Atom PDF