I'm used to my internet-browsing combination of choice, Firefox and uBlock Origin (uBO), breaking sites. Everyone codes their sites with Chromium in mind, and that's just fine because it covers nearly all browser usage thanks to Google's technically-not-a-monopoly monopoly. In any case, sites not working for me isn't nearly as common as it once was, but it still happens from time to time.
I wasn't too surprised, then, when I noticed one day that Street View on Google Maps was giving me nothing but a black void in place of the expected scenery. The controls and whatnot would load but all of the imagery was simply blackness in all directions.
Thinking it to be some random and untimely incompatibility with a uBO filter that got updated and would need another update to come through later to fix a new bug, I did a quick test to confirm that disabling uBO would let me View the Street once again. I viewed what I'd come to view and left it at that. It's not like I use Street View all that often, so surely by the time I needed it again this issue would be fixed.
A couple weeks later Street View was still Black Void View for me, but again I figured it just hadn't been enough time for the issues to have been sorted out. I'd forgotten, despite having previously witnessed it unfold on /r/ublockorigin, that filter-related bug fixes were generally reported, tested, and fixed almost in real time. Again, it's not like I use Street View particularly often, so I'd just let things fix themselves.
Some weeks after that second incident, the black void appeared the third time I needed Street View. Alright, now. I thought. There's got to be something going on. I took a glance through my custom filters (which run alongside the ones you're subscribed to) to see if I'd added anything that looked like it might cause a script or domain to be blocked that Maps needed to make Street View function. I got suspicious of these:
/pixel.php
/pixel/
To confirm it was one of these, I pulled up uBO's logger. This handy little feature, one that I use so infrequently I forget it exists, lets you see the results of all the filtering uBO is doing as a site makes its requests.
uBlock Origin (uBO) comes with a logger, which gives the ability to inspect what uBO is doing with network requests and DOM elements, whether something is blocked or allowed or redirected, whether any scriptlet injections occurred, and which filter, if any, matched a network request or DOM element. This logger is unified, meaning it will display everything uBO does as it occurs.
Trying to go into Street View with the logger open made it clear immediately that the second of my rules above, /pixel/
, was blocking all requests to a subdomain apparently necessary to make the thing work: streetviewpixels-pa.googleapis.com
. Lorde knows why they put "pixels" in that subdomain, but my poorly-done custom rule had effectively blacklisted it.
The syntax for these filters isn't one I know by heart. Unless I'm doing something very straightforward, I always forget how to format new rules I want to add. This is partially due to the rules not being regex by default. You can make regex work in them, though it's not recommended for performance reasons, and that's what I had done. I'd meant to block URLs like https://example.com/pixel/whatever
, but I'd instead made a regex that matched the literal string "pixel". Thus, all requests that contained the word "pixel" were blocked. Oops.
I got rid of the /pixel/
rule and Street View started working once again. Also, /pixel.php
became ^pixel.php
after refreshing my memory on the syntax. I still don't remember what made me put these things in my filter, though. This is why you should always leave a note comment your code. 🤷♀️