AprilSylph / Outbox-for-Tumblr

📤 Save outgoing Tumblr asks automatically
GNU General Public License v3.0
18 stars 4 forks source link

"TypeError: attributionRenderers[attribution.type] is not a function" #71

Closed cchase503 closed 1 year ago

cchase503 commented 1 year ago

Platform

macOS 13.3.1

Browser

Chrome 114

Addon version

1.0.3

Details

Outbox is completely blank with this message: "TypeError: attributionRenderers[attribution.type] is not a function". I did completely clear my cache recently, does this mean it's impossible to get my old messages back without having saved a backup? How do I get it working again?

AprilSylph commented 1 year ago

Hmm, I guess Tumblr added something that Outbox doesn't understand. Ideally we should ignore such content and not render it, rather than crashing. Thanks for the report.

Your saved items are safe (even if they can't be displayed right now) and Outbox will continue saving items as long as you keep the extension enabled.


If you're comfortable using the browser console, you should be able use this command to dump your data manually from the (crashed) Outbox page:

JSON.stringify(await browser.storage.local.get(), null, 2);

This will output the same format that usually gets saved to a backup.

From there, if you comb through each item (they're keyed by timestamp, so printed oldest-first) and find an item with a content block with an attribution property which itself has a type that isn't "post", "link", "blog" or "app", you could delete that item from your outbox and it should render again after a refresh:

// e.g. if the problem item's key is "1636578098748"
browser.storage.local.remove('1636578098748');

(There may be multiple problem items, so you'd have to search for all items with that attribution type and repeat as necessary.)

However, the problem would recur if another item with the same attribution type was saved.

I have no idea what it would be, though

AprilSylph commented 1 year ago

I've submitted a fix to the Chrome Web Store as v1.0.4!

When you receive the fix (after Google approves the update and your extensions auto-update) your outbox will now ignore the unknown attribution and just render nothing.

If you could, please tell me what warning(s) you get in your console when using v1.0.4 - I'd be very interested to learn what undocumented attribution type was causing this issue.

cchase503 commented 1 year ago

Thanks! Re: "If you could, please tell me what warning(s) you get in your console when using v1.0.4" I'm not sure where to find this? Would I find this via the instructions in your first reply? I confess I had to look up what a browser console was and then got a bit lost as to what it is I'm looking for in the browser console...is this it:

Unknown attribution type: "undefined" default @ npf.js:342 DevTools failed to load source map: Could not load content for chrome-extension://oeamngjfgbhipkibmgglfdaohochpoej/lib/browser-polyfill.min.js.map: System error: net::ERR_FILE_NOT_FOUND

AprilSylph commented 1 year ago

...huh. That's extremely not supposed to happen. Every single thing in NPF should have a type. I don't suppose you ever imported an edited backup?

cchase503 commented 1 year ago

I don't think so?

marcustyphoon commented 1 year ago

Incomplete results from some quick research: https://www.tumblr.com/@bulkhummus/721495399612989440 and further reblogs have attribution: [] on some of the images when I call timelineObject on them, while the original post https://www.tumblr.com/damazcuz/721495344816537600 does not. I did not manage to find any original posts yet that have

Wait. Hah. https://www.tumblr.com/gotzzy/721493734579175424/wow-she-really-loves-that-man https://www.tumblr.com/foileadeux/721506377579806720 https://www.tumblr.com/kanrix/721514770838274048/let-me-guessits-clay-isnt-it-your-goddamn