brief-rss/brief

QuotaExceededError

TimP69 opened this issue · 8 comments

I have a large amount of feeds. Hundreds. Recently Brief's behaviour has started to get a bit strange. I tried importing a feed list, and only some of the feeds successfully imported. I worked out which feeds failed to import and tried it again with just those. Again, only a fraction imported. Thinking I might be running up against a limit of some sort, I opened up the console.

When I try and unsubscribe/delete a feed I now get the following:
Uncaught (in promise) Error: QuotaExceededError: storage.sync API call exceeded its quota limitations.

Even though the feed disappears from Brief's list, console reports exactly the same number of feeds the next time I load up Brief. It's like deleting feeds doesn't really delete them — it just hides them from view.

I manually deleted all of the IndexedDB items in the "entries" database. No change to behaviour.

I explored the "feeds" database and found some of the entries that I thought I had deleted still in there. I manually deleted those. The feeds count was lower when I reloaded Brief, but I still get the same error when trying to delete feeds the normal way.

Any suggestions on what I can do to regain control of Brief? Does the "feeds" database need to be reduced below a specific number of items? Is there a hard limit on how many feeds I can subscribe to?

Nice to hear there still are Brief users out there :-)

This error should be nonfatal, although it may need a refresh of the Brief tab. Sync storage is used as a backup only. I'll double-check that, but I'd guess there should be a different reason for import failing.

Yes, deleting feeds does not really delete them. The intention was to clean up them in a couple weeks after deletion, but that was never implemented, sorry.

Note also that if you tried to import a feed list and some feeds are already present in your current feed list, they won't be duplicated, so every "Feed already present" message in the console is a feed that you won't find in the tail of the list because it's already present somewhere above.

Could you check in the log whether the total number of "Feed already present", "Restoring hidden feed" and "Need a new node ... from ..." messages logged during import matches the number of feeds and folders you're importing?

Both my wife and I use Brief every day. It's a valuable workhorse. I've been trying to de-Google my environment, which is why I'm importing my YouTube subscription list into Brief. If I can get it working, I can still be "subscribed" to YouTube channels, but don't need (to be logged in to) a YouTube/Google account.

I'm not getting any of those messages in console. Just this:

17:33:23.999 Brief: opening database in default storage database.js:138:17
17:33:24.018 Brief: opened database in default storage database.js:171:17
17:33:24.038 Brief: 317 feeds in database database.js:308:17
17:33:24.046 Brief: opened database with 4760 entries database.js:92:17
17:33:25.419 Note: Brief - callbacks aborted due to refresh feedview.js:975:21
17:34:16.558 Got OPML feedlist.js:1063:21
17:34:16.680 Uncaught (in promise) Error: QuotaExceededError: storage.sync API call exceeded its quota limitations. undefined

That's it. Or is there another log somewhere I should be looking at?

PS: I manually deleted all items in the "feeds" database with "hidden" set to a value greater than zero. Looks like you store a Unix time stamp in there. Now down to 296 items. Behaviour remains the same. That QuotaExceededError seems to crop up whenever I try to make a change of almost any sort.

Sorry, I've missed an assumption. Yes, the correct log here can be accessed from about:debugging by choosing "This Firefox", finding Brief in the extension list and pressing "Inspect".

I'm actually a bit surprised that QuotaExceededError shows up in the Brief tab's console, that looks wrong.

Ok, about:debugging > This Firefox > Brief > Inspect shows the following errors when merely (re-)loading Brief:

21:16:25.972 sendRemoveListener on closed conduit brief@mozdev.org.687194775286 ConduitsChild.jsm:108
21:16:26.031 Unchecked lastError value: Error: Missing host permission for the tab background.js:103445
... x5 but last number changes with each one
21:16:26.042 Unchecked lastError value: Error: Frame not found, or missing host permission background.js:103445
... x12 but last number changes with each one
21:16:27.412 Unexpected invalid url: sandbox eval code webextension.js:357
21:16:27.414 Unexpected invalid url: sandbox eval code line 11 > Function webextension.js:357
21:16:35.142 Uncaught (in promise) TypeError: feeds is undefined
    queryFeeds moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:203
    init moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:102
background.js:203:12

Not sure if they are relevant, but I thought I'd relay them just in case.

These are the warnings and errors when I imported the remaining YouTube feeds:

21:25:23.818 Got OPML feedlist.js:1063:21
21:25:23.850 Need a new node 17 from 
Object { title: "YouTube Subscriptions", children: (11) […] }
database.js:407:17
21:25:23.852 Creating node 
Object { feedID: "17", feedURL: undefined, title: "YouTube Subscriptions", rowIndex: 298, isFolder: true, parent: "-1", hidden: 0, entryAgeLimit: 0, maxEntries: 0, updateInterval: 0, … }
database.js:432:17
21:25:23.857 Feed already present 
Object { feedID: "d2598b8fe1b69afa7005f4871287817e643fa1ca", feedURL: "https://www.youtube.com/feeds/videos.xml?channel_id=UC2C_jShtL725hvbm1arSV9w", title: "CGP Grey", rowIndex: 60, isFolder: false, parent: "3", hidden: 0, entryAgeLimit: 0, maxEntries: 0, updateInterval: 0, … }
database.js:395:25
... x11 but with different channel details each time
21:25:23.958 Uncaught (in promise) Error: QuotaExceededError: storage.sync API call exceeded its quota limitations. undefined
21:25:26.567 Uncaught (in promise) TypeError: feeds is undefined
    queryFeeds moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:203
    init moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:102
background.js:203:12

I compared the number of "Feed already present" to the number of entries in the OPML file. They matched. That means it makes sense why Brief was just creating an empty folder the last few times I tried to import. Although I did scan Brief's list I must have missed them. No-one to blame but myself. Sorry about that.

That said, I still get the QuotaExceededError both in Inspect and Console when I try to unsubscribe/delete a feed. The following messages appear in Inspect every time I try (I expanded the last error hoping it would provide some insight):

22:06:42.292 Brief: update pref ui.startView to all-items-folder prefs.js:51:17
22:06:42.322 Uncaught (in promise) Error: QuotaExceededError: storage.sync API call exceeded its quota limitations. undefined
22:06:44.341 Uncaught (in promise) TypeError: feeds is undefined
    queryFeeds moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:203
    init moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:102
background.js:203:12
    queryFeeds moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:219
    AsyncFunctionNext self-hosted:690
    (Async: async)
    init moz-extension://393f91d2-00f0-4564-91fb-028bea0b4816/background.js:102
    apply self-hosted:2705
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:616
    fire resource://gre/modules/ExtensionChild.jsm:806
    recvRunListener resource://gre/modules/ExtensionChild.jsm:810
    recvRunListener self-hosted:1173
    _recv resource://gre/modules/ConduitsChild.jsm:78
    receiveMessage resource://gre/modules/ConduitsChild.jsm:184

I appreciate your assistance in troubleshooting this, Denis. Despite the errors being displayed, Brief seems to be working. I've never had a problem fetching, reading and otherwise dealing with items/articles/posts/entries themselves — that has always worked fine. The console error message, coinciding with my mistake, made me think there was some problem with the import mechanism. That no longer seems to be the case — but I do have some sort of problem... It is non-fatal now, but I wonder how long it will stay that way — whether it is safe to ignore?

This error is safe to ignore: the "feeds is undefined" error at background.js:203 happens when you open some kinds of special Firefox pages because the feed detector does not handle them correctly. That does not cause any problems (but I intend to hide this error in the next version nevertheless).

Ah, that is good to know.

So, is the "feeds is undefined" error causing the "QuotaExceededError", or are the two unrelated? If they are unrelated, then can the QuotaExceededError be safely ignored as well? I don't use Firefox's Sync feature at all.

These two are unrelated and both are safe to ignore.

Fantastic. Thank you so much for your time and help — it has been much appreciated. Keep up the good work!