Feed corruption; a question about spelunking
robinsloan opened this issue · 10 comments
- I have checked the Common Problems page.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
- OS: Mac
- Browser: Chrome
- Version: 90
Something a bit mysterious has happened a few times now, where I add a feed and, for unknown reasons, the Fraidycat Chrome extension bugs out, showing me this
and, in the console, this
I'd like to do a little investigating myself, and maybe even figure out what the issue with the newly-added feed is (I get the impression it didn't quite "get added correctly", whatever that might mean) but I don't know where to look.
My question: is it possible to inspect (and maybe even edit) the extension's synced feed list somewhere in Chrome, either using the JS console or some other tool? If anyone can point me in the right direction for spelunking, I'd be happy to investigate (and report back, if desired).
Thank you!
(I should add: previously, I "fixed" this problem by reinstalling the extension and reimporting my OPML file. This time I would like to try to figure out what's actually going on...)
Yeah let's get this situation improved - it's no good to have to keep re-importing. The console pic here helps a lot.
I'm guessing you use Fraidycat on multiple machines and are logged-in to Chrome? Or just a single browser here?
Here are some details on 'spelunking' if you're curious: https://github.com/kickscondor/fraidycat/wiki/Spelunking-Fraidycat's-Save-Files
Kicks Condor, this is terrific! Thank you so much! I am going to rappel down & report back. If you don't hear from me in 72 hours, drop a box of Cheez-Its.
I'm guessing you use Fraidycat on multiple machines and are logged-in to Chrome? Or just a single browser here?
Yes, that's right. I'll add a feed; something will feel… wonky; and when I hop over to the reader view, I get the broken screen depicted above. Then, the same error propagates to other computers, too.
If it helps, this also sometimes happens to me on Firefox (latest version) too. Super annoying, but at least the browser sync works after reinstalling, so it's not a huge deal? But I'd still like to have this fixed.
@spriteclad Same here; I haven't been bothered by the need to reset, but I figured I'd investigate a little.
Here's what I've gathered. The problem was with this feed:
which is not really a feed, even though the page makes the Fraidycat glow invitingly. I believe it only causes a problem when you sort your feeds A-Z, as I do.
When I used chrome.storage.local.clear
to zap my preferences, then closed & reopened Chrome, the sort order reverted to Fraidycat's default, and I was able to see the feed at the top of the page, displayed without a title. Then, when I switched the sort to A-Z, Fraidycat was zapped back to its broken state.
That's what I've learned so far! Now, to figure out which part of the code exactly is getting tripped up on that not-a-feed…
P.S. Peatlands rule
Okay, so the acute problem is that my broken follow
, in addition to… not being a feed… ends up with an actualTitle
value that is not a string, but an odd object with the form
{rendered: "Here is the feed's title"}
which breaks the A-Z sorting when the sort function looks for this object's .localeCompare
function, which it doesn't have. (Properly functioning follow
s have actualTitle
values that are strings.)
I haven't yet been able to figure out where or why that weird object is generated.
It's possible to fix the error by checking for string-ness in the followTitle
generator function in utils.js
, like so:
export function followTitle(follow) {
let title = follow.title || follow.actualTitle || follow.url
if (typeof title !== "string") {
title = "..."
}
return title
}
I've done this, and it helps! I'm happy to submit that patch, BUT, I acknowledge that it feels like a band-aid rather than an actual solution to whatever deeper problem is causing this URL not to be rejected in the first place, so, if this edit just feels like it will make things messy/random, I totally understand.
Let me know; and in the meantime, I will keep investigating the root cause.
Ah, way to sleuth, Robin! This is so helpful. The JSON it's loading comes from https://peatlands.org/wp-json/wp/v2/pages/587 (redirected from https://peatlands.org/peatlands/what-are-peatlands/) - which ends up loading as this object:
{
title: { rendered: 'What are peatlands?' },
photos: {},
status: [],
posts: []
}
I am tightening up the feed-loading code to catch any odd objects like this that may show up in titles or descriptions or anything like that. I am very grateful for the work you put into tracking this down! After all you are doing - to take the time to mess around in Fraidycat's guts... I'm not worthy of such gifts as you give, my friend.
Just happy to be mildly helpful! Let me know if there's anything else I can do to assist.
Okieeee - this is out! Version 1.1.10 slid through all the web stores, no probs. Please let me know if this doesn't do it for you. (Perhaps there are other feed issues that I'm not catching.)
Okieeee - this is out! Version 1.1.10 slid through all the web stores, no probs. Please let me know if this doesn't do it for you. (Perhaps there are other feed issues that I'm not catching.)
Aaaand it doesn't do it for me. Just woke up from a two-hour nap to find this in my browser, having to reinstall fraidycat AGAIN: