Closed dholbert closed 5 years ago
Here's a screencast of this bug in action (starting with facebook.com loading, and with the context menu spontaneously opening after ~11 seconds): https://www.dropbox.com/s/lqesa5xufom54j4/politico-extension-screencast.ogv?dl=0
I didn't interact with my browser at all during the time before the context menu opens.
Hi @dholbert This is very helpful (especially the screencast). I suspect additional hard-refreshes may help; though maybe not, since you're seeing this on multiple browsers (which wouldn't be sharing a cache). In any case, what I believe is happening with this bug is that some FB users get different markup than others...
Yeah, a hard-refresh does not help, unfortunately (nor does starting with a 100% fresh browser profile, which should be the Ultimate Hard Refresh :) ).
Thanks for chiming in, in any case; let me know if there's anything I can do to help diagnose.
I appreciate your willingness to help.... On Monday I could build for you a debug version of the extension that would highlight which bit of the detector code is misbehaving (by changing some text colors). Would you be willing to install that and either take a screenshot or telling me what it looks like?
Sure, I'd be happy to! Though I might not be able to get to it until Tuesday.
@dholbert if you have time and are willing to give it a shot, would you install this debug extension? https://www.dropbox.com/s/m0zba0v7sz0mhpe/debug_extension.zip?dl=0
Easier in Chrome (or in whatever versions of Firefox allow unsigned extensions); for Chrome, you'd unzip it someplace, toggle the developer mode switch on chrome://extensions, then click "Load unpacked" and find the unzipped extension.
What this does is two things:
What'd be helpful for you to tell me is:
You're welcome to drop me a line by email about this or continue discussing here. My email is jeremy dot merrill at propublica dot org.
PS that debug extension (a) doesn't feed ads into the database (instead looking for one running locaclly) and (b) is built off of the experiment/sponsoredeverywhere
branch.
Thanks! I gave the extension a quick try in a few spare minutes this evening, and my results:
So it seems that something in the debug version of the extension is preventing the context menus from appearing. I'm not sure if that's good or bad. :)
Happy to try another version or to dig in further with some other steps on current debug version, tomorrow, BTW.
BTW I'm seeing errors being reported by the debug version, in case that's relevant. Chrome DevEdition 72 shows some special errors in chrome://extensions behind a button labeled "errors" alongside the debug version of the add-on:
And both Firefox Nightly and Chrome DevEdition show some errors in their consoles -- here's a screenshot of some (with a backtrace) in Nightly:
These might just be normal logging or irrelevant, but I'm posting them just in case they're useful (or if they happen to be related to why the issue doesn't reproduce with this debug version of the add-on).
@dholbert Thank you very very much for testing this out. I think the reason the issue doesn't reproduce is that I've fixed the problem :).
The overarching problem (I think...) was that Facebook has adjusted the markup of ALL posts (both ads/sponsored posts and your friends' vacation photos) for some users (you, but not me) to include "Sponsored". This confused our ad collector's ad detector, since "Sponsored" was one of the things it looked for; since "Sponsored" was everywhere, the detector continued to the next step, which involves the context menu...
Now we're checking if Sponsored has height and width > 0 (cf. the numbers after checkSponsor in the logs you screenshotted); I believe you've confirmed that this does properly distinguish actual sponsored posts from non-sponsored posts. (Hence the context menus not popping up; we don't need to progress to that detector step for all posts, just actual ads, for which the context menus are handled quickly and don't actually appear.)
The red text on actual sponsored posts is the good result: that means those posts have been properly detected as ads.
And FYI: the errors you're seeing are not "real" errors, just verbose logging.
Thank you again for your help in debugging this. The mainline production version of the extension should launch with this fix in a day or two.
That's great news! Thanks for fixing this.
Once the update goes out, I'll be happy to retest & post some confirmation of the fix here.
@dholbert v1.8.2 should be live (and autoupdating w/i 24hrs) in both Chrome and Firefox. Would love if you'd install it and let me know if you're seeing the menus opening on non-ad posts. (Shouldn't be any text color changes in the "real" non-debug version)
Yup, looks fixed!
I tested 1.8.1 (previous version, from the "all versions" page), and I verified that I was still seeing the issue there.
Then I installed 1.8.2 from the same page, and I'm no longer seeing the issue. Instead: after 10 seconds, I do see a very brief context menu popup above the first sponsored post, but it disappears right away. (Maybe this part is expected and roughly how it's supposed to work?)
@dholbert Phew! I'm very glad to hear it. This was a bug that's been cropping up for months and has been a real journey to try to investigate (only some users, happens sporadically, the issue turned out not to be with ads but with non-ad posts etc.). Thank you very much for your willingness to test this out, it's a huge help.
Yeah, that is expected behavior. No way around it that I'm aware of to get the "Why am I seeing this?" text.
Hooray, thank you for fixing it!
STR:
ACTUAL RESULTS: After waiting 10-15 seconds, the facebook "context menu" spontaneously opens, from the top right of the topmost post in your feed.
(Annoyingly, this happens even if you were scrolling with the arrow keys -- and the context menu "steals focus" and snaps you back up to to the first post, and the menu becomes the thing that the arrow keys are scrolling. So all of a sudden, you're snapped to a different scroll position and your arrow keys are scrolling through the context menu instead of through your feed.)
I'm hitting this 100% of the time in Firefox release (63) and also Chrome ("dev channel" version 72), on Ubuntu 18.10 linux on a 64-bit Lenovo laptop.
I'm using extension version 1.8.1 in Firefox, and 1.8.0 in Chrome (latest available from their respective addon sites). I was testing in a fresh (created today) Firefox profile and a basically-fresh Chrome profile -- no other extensions.
Note: I tried a hard-refresh based on a suggestion in another issue, but it doesn't help - the issue still happens.