Opened 9 months ago

Closed 8 months ago

#7223 closed defect (fixed)

First run page with data corruption message shows each time Edge starts

Reported by: jparedes Assignee: geo
Priority: P1 Milestone:
Module: Platform Keywords:
Cc: sebastian, geo, kzar, Ross, ukacar, greiner Blocked By:
Blocking: Platform: Edge
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://gitlab.com/eyeo/adblockplus/adblockpluschrome/merge_requests/32

Description (last modified by kzar)

Environment

Microsoft Edge versions 42.17134.1.0 & 44.17763.1.0
Adblock Plus version 9.12

How to reproduce

  1. Go back in time, install 9.11.
  2. Get upgraded to 9.12
  3. Disable AA
  4. Restart Edge

Observed behaviour

The first run page is displayed, along with the warning about data corruption.
Subscriptions, AA and other preferences are all lost.

Expected behaviour

The first run page isn't displayed and the subscriptions + settings persist.

Notes

  • Uninstalling and reinstalling Adblock Plus does not fix the issue.
  • Unchecking "clear all cookies and website data" does not fix the issue.

Hints for testers

This change is to the code which handles storage of settings, subscriptions etc for Edge users. Please test anything storage related, for example that AA settings remain, as thoroughly as possible on Edge. You don't need to test at all on other platforms, since this code is not used elsewhere.

Attachments (2)

image001.png (57.9 KB) - added by jparedes 9 months ago.
Dev Console Entry of affected user1
image002.png (171.3 KB) - added by jparedes 9 months ago.
Dev Console Entry of affected user2

Download all attachments as: .zip

Change History (33)

comment:1 Changed 9 months ago by jparedes

  • Description modified (diff)

comment:2 Changed 9 months ago by Ross

The first run page will appear every time if they leave it open in a tab after install and don't close it.

But I guess this is the first run page re-opening on browser start after being closed in a previous browser sesssion.

Does the first run page have the message about reset filters on it?

Clearing "Cached data and files" might help (although not sure).

comment:3 Changed 9 months ago by ukacar

I am also not able to reproduce it, and I've noticed that a simple reinstall of the extension in Edge does not equal the first install - all of the settings are remembered (like whitelisted websites, custom filters, etc.).
I've managed to get a 'fresh install' by uninstalling, clearing cookies and website data, and reinstalling the extension, maybe this can be suggested as a workaround.

Last edited 9 months ago by ukacar (previous) (diff)

comment:4 Changed 9 months ago by kzar

  • Cc sebastian geo kzar Ross ukacar added
  • Description modified (diff)

The issue description talks about the first run page opening every time that Edge starts, but the title talks about the user's filters being lost. Is the title wrong, or is that another symptom?

comment:5 Changed 9 months ago by geo

I'm only able to reproduce it if I have the clear cookies and website data enabled on each browser close and if I close the browser/ turn the extension on/off without waiting at least one minute after starting the browser/turning the extension on.

This is because the backup that is not affected by the clear cookies and website data is created only after one minute. We could create a backup as soon as the extension starts, but that might impact start up times.

comment:6 Changed 9 months ago by kzar

  • Description modified (diff)
  • Summary changed from Microsoft Edge, first run page - all filters removed to First run page with data corruption shows each time Edge starts

comment:7 Changed 9 months ago by kzar

  • Summary changed from First run page with data corruption shows each time Edge starts to First run page with data corruption message shows each time Edge starts

Changed 9 months ago by jparedes

Dev Console Entry of affected user1

Changed 9 months ago by jparedes

Dev Console Entry of affected user2

comment:8 follow-ups: Changed 9 months ago by kzar

We discussed this in IRC, but for completeness here are some questions for affected users:

  • Do you have "..." -> "Settings" -> "Clear browsing data" -> "Always clear this when I close the browser" toggle enabled? (See Geo's comment.)
  • How often are you restarting Edge?
  • What configuration is getting lost? Just the AA setting, or other preferences, custom subscriptions or custom filters?

Also, I'm curious roughly how many people have reported this problem so far?

comment:9 in reply to: ↑ 8 ; follow-up: Changed 9 months ago by jparedes

Replying to kzar:

We discussed this in IRC, but for completeness here are some questions for affected users:

  • Do you have "..." -> "Settings" -> "Clear browsing data" -> "Always clear this when I close the browser" toggle enabled? (See Geo's comment.)
  • How often are you restarting Edge?
  • What configuration is getting lost? Just the AA setting, or other preferences, custom subscriptions or custom filters?

Also, I'm curious roughly how many people have reported this problem so far?

We're still awaiting responses for the "Always clear this when I close the browser" toggle.
Edge restart answers have ranged from 10-50 times a day.
We've received notice that AA settings, other preferences and custom "My filter list" entries are being removed.

Roughly 80 Individual Users have reported this issue via Email in the past 30 hours.

comment:10 Changed 9 months ago by kzar

  • Description modified (diff)

I see, so we're not sure if AA or any other settings get reverted, just that the message on the first run page mentions to check AA settings.

comment:11 in reply to: ↑ 9 Changed 9 months ago by geo

Replying to jparedes:

We're still awaiting responses for the "Always clear this when I close the browser" toggle.
Edge restart answers have ranged from 10-50 times a day.

Do we know if they do anything immediately after seeing the first run page (browser/extension restart) or do they wait for a bit?

Last edited 9 months ago by geo (previous) (diff)

comment:12 in reply to: ↑ 8 Changed 9 months ago by sebastian

Replying to geo:

I'm only able to reproduce it if I have the clear cookies and website data enabled on each browser close and if I close the browser/ turn the extension on/off without waiting at least one minute after starting the browser/turning the extension on.

This is because the backup that is not affected by the clear cookies and website data is created only after one minute. We could create a backup as soon as the extension starts, but that might impact start up times.

That is expected, and an improvement to the previous release, where that would happen when browsing data are cleared, regardless how long you kept Microsoft Edge open previously.

Replying to kzar:

Also, I'm curious roughly how many people have reported this problem so far?

FWIW, there were 3 reviews on the Windows Store after we released 0.9.12, related to this issue. At least 2 of them indicate they updated from a previous version, one is saying that it doesn't block any ads either which might indicate that the initialization failed, rather than the data getting lost later on.

Last edited 9 months ago by sebastian (previous) (diff)

comment:13 Changed 9 months ago by geo

  • Owner set to geo
  • Review URL(s) modified (diff)

comment:14 Changed 9 months ago by sebastian

We identified two inconsistencies in the code that are likely related to this issue. We have a potential fix that we plan to release after the 3.4.3 release for Chrome/Firefox. However, since we cannot reproduce the issue, we don't know for sure whether this change will effectively resolve it.

comment:15 Changed 9 months ago by imowom

Hello..

Mine is doing this. I don't have clear cookies checked.

Tried a re-install of ABP.. No luck.

Microsoft Edge 44.17763.1.0

OS Build 17763.253

Mo

Version 0, edited 9 months ago by imowom (next)

comment:16 Changed 9 months ago by jparedes

Users confirm that AA preferences are being lost, same to Custom Filters and other preferences.
We have now received over 400 reports on this issue since update.

Work-around with uninstalling and re-installing is generally not successful.
We do have 3 users who reported that it's solved their issue.

comment:17 follow-up: Changed 9 months ago by philll

Could we create an experimental build to have some affected users try out the suggested fix?

comment:18 Changed 9 months ago by kzar

  • Description modified (diff)
  • Priority changed from Unknown to P1
  • Ready set

comment:19 in reply to: ↑ 17 Changed 9 months ago by kzar

Replying to philll:

Could we create an experimental build to have some affected users try out the suggested fix?

Sounds like a good idea to me, I started a discussion about how we could possibly do that on the codereview. We'll keep you posted.

comment:20 Changed 9 months ago by kzar

  • Description modified (diff)

comment:21 follow-up: Changed 9 months ago by sebastian

I already prepared a custom build, including this fix (as well as #7222) and manually submitted it to the development build channel, two days ago, but with the usual delay of the Windows Store it took until now to get published. Please ask users to try it out.

However, note that if this issue is caused by corrupted data, it will no longer occur after switching to the devbuild regardless of this change, even if the issue persisted after reinstallation since uninstalling an extension on Microsoft Edge doesn't wipe all it's data.

Last edited 9 months ago by sebastian (previous) (diff)

comment:22 in reply to: ↑ 21 Changed 9 months ago by kzar

Replying to sebastian:

I already prepared a custom build, including this fix (as well as #7222) and manually submitted it to the development build channel, two days ago...

Nice one.

However, note that if this issue is caused by corrupted data, it will no longer occur after switching to the devbuild regardless of this change, even if the issue persisted after reinstallation since uninstalling an extension on Microsoft Edge doesn't wipe all it's data.

Hmm, so I wonder what the best way to have users test is. I suppose something like this:

  1. Have them uninstall Adblock Plus, and somehow fully clear the extension's data from the registry or wherever it's stored.
  2. Have them reinstall Adblock Plus, restart Edge a few times and confirm if the problem has gone away or not.
  3. Have them uninstall Adblock Plus again, and install the Adblock Plus development build.
  4. Have them restart Edge a few times and confirm if the problem has gone away or not.

That way, supposing clearing the extension data was enough to fix the problem, we'll know that the development build test doesn't prove anything. But, if clearing the data wasn't enough and the problem goes away with the development build, it would be a good sign we fixed the bug. Likewise, if the problem doesn't go away with either test, we'll know we need to make another attempt at a fix.

Thing is, I don't know how to clear the extension data. Anyone have any idea?

comment:23 Changed 9 months ago by jparedes

From the data we've gathered so far, could this issue be caused for two similar reasons?
More users have the feature "always clear this when I close my browser" toggled off. With most users, simply clearing the cache from "Browsing history", "Cookies and saved website data", "Cached data and files", "Tabs I've set aside or recently closed" helps to stop the pop up.

However we do have a small subset of users who do have the feature "always clear this when I close my browser" enabled. In addition, some users report that clearing their cache does not solve the issue.
Due to the nature of users feedback, it's not possible to make a clear correlation of the feature and cache clearance failure yet.

comment:24 Changed 9 months ago by greiner

  • Cc greiner added

comment:26 follow-up: Changed 9 months ago by annacrispeta

Tried solutions proposed by jparedes and installed the developer version. Did not work, problem persists. Any other suggestions, please?

comment:27 in reply to: ↑ 26 Changed 9 months ago by geo

Replying to annacrispeta:

Tried solutions proposed by jparedes and installed the developer version. Did not work, problem persists. Any other suggestions, please?

Hi annacrispeta,
Would you be willing to help us out with some information?

First, I would need to know your Adblock Plus version (this might be redundant, but it's just to make sure that you have the latest version).

Second, I would need to know your Edge browser version.

Third, I would need a printscreen.

  1. Navigate to about:flags and check the box Enable extension developer features.
  2. Go to Extensions -> Adblock Plus -> Background page (you may have to scroll a bit to see it)

A small pop up should open.

  1. Press Ctrl+2
  2. Check if there is any red text displayed; If yes take a print screen and post it here.
  3. Don't forget to disable Enable extension developer features in the about:flags page as you won't need it anymore.

comment:28 follow-ups: Changed 8 months ago by aquaya

With Adblock Plus development build 0.9.13.2252
With Edge 42.17134.1.0 Microsoft EdgeHTML 17.17134
Following errors appear following this procedure :

[object Event]

SCRIPT5007: SCRIPT5007: Unable to get property 'hostname' of undefined or null reference

adblockplus.js (5089,7)

SCRIPT5022: SCRIPT5022: Error: Invocation of form browserAction.setBadgeText(object, function) doesn't match definition browserAction.setBadgeText(object details).

adblockplus.js (12866,5)

6 [object Event]

3 SCRIPT5022: SCRIPT5022: Error: Invocation of form browserAction.setBadgeText(object, function) doesn't match definition browserAction.setBadgeText(object details).
adblockplus.js (12866,5)

2 [object Event]

comment:29 in reply to: ↑ 28 Changed 8 months ago by sebastian

Replying to aquaya:

SCRIPT5022: SCRIPT5022: Error: Invocation of form browserAction.setBadgeText(object, function) doesn't match definition browserAction.setBadgeText(object details).

adblockplus.js (12866,5)

It looks like browser.tabs.browserAction.setBadgeText not accepting a callback on Microsoft Edge.

Geo, can you confirm this? Just in case, please also check for browserAction.setIcon and browserAction.setBadgeBackgroundColor.

Note that these calls are intercepted by a polyfill that adds the callback and then returns a promise, even if our code isn't actually interested in the result. We might have to prevent our polyfill from doing this on Microsoft Edge for APIs that don't support passing in a callback.

comment:30 in reply to: ↑ 28 Changed 8 months ago by geo

Replying to aquaya:

Following errors appear following this procedure :

[object Event]

SCRIPT5007: SCRIPT5007: Unable to get property 'hostname' of undefined or null reference

adblockplus.js (5089,7)

SCRIPT5022: SCRIPT5022: Error: Invocation of form browserAction.setBadgeText(object, function) doesn't match definition browserAction.setBadgeText(object details).


Hi aquaya would you be willing to try out a few more things for us. The reason that this bug is still persisting is because none of us have been able to reproduce it locally, so we really need your help.

What I'm interested in is the [object Event] error, as for the browserAction.setBadgeText, I'll open a new ticket and investigate that one as well.

In the meantime, we could get more clues if you could expand the [object Event] error. You can do that by clicking on the small arrow in front of it.

If there is no arrow, could you please paste the following code: location.reload(), this simply reloads the extension and should allow you to expand the error (it will also trigger a new first run page to show up, really sorry about that).

Once the error is expanded, if it looks something like this could you expand it a bit further by clicking on srcElement and then error?

At this point, even if it's similar or not, please take a print screen and attach it here. Hopefully that will give us some clues about the cause of the issue.

comment:31 Changed 8 months ago by sebastian

  • Resolution set to fixed
  • Status changed from new to closed

The number of user reports about data being reset significantly dropped since we released 0.9.13, the exception shown in comment:29 has been addressed with #7277, and there is nothing further we can do with the current information. So I'm closing this issue now.

Note: See TracTickets for help on using tickets.