5

Steps to reproduce:

  1. Install Reddit Toolbox (either Firefox or Chrome version): https://old.reddit.com/r/toolbox/wiki/get
  2. Tell Orion to allow it to run on www.reddit.com and/or old.reddit.com (though this shouldn't be necessary).
  3. Extension crashes on page load. Extension console says this:
[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'TBsettingsObject.tbsettings[storageShortLengthKey]')
	initCacheTimeout (cache.js:77)
	(anonymous function) (cache.js:116)
	promiseReactionJob

Expected behavior:
Extension loads, toolbox menu shows up in the bottom left, stuff works.

Additionally, the browser shouldn't prompt me if the extension should be loaded on every website I visit. Its manifest asks for permissions to the Reddit website only.

Orion, OS version; hardware type:
Version 0.99.113-beta (WebKit 613.1.12), macOS 12.2.1 (21D62); MacBook Air (M1, 2020)

Additional thoughts:

Based on the error, I don't think the content_scripts defined in the extension manifest are getting loaded. The script that sets up the tbsettings object can be seen here:

https://github.com/toolbox-team/reddit-moderator-toolbox/blob/4d8d2a497347d2cd4c56f571175b91e4478dcb86/extension/data/tbstorage.js#L49

Here's the extension's manifest:

https://github.com/toolbox-team/reddit-moderator-toolbox/blob/4d8d2a497347d2cd4c56f571175b91e4478dcb86/extension/manifest.json

The website permissions in the manifest are also ignored (as previously mentioned).

    16 days later
    a year later

    I just noticed this issue as well, but I get a slightly different error:

    [Error] No-Cors mode requires follow redirect mode
    [Error] Not allowed to request resource
    [Error] Fetch API cannot load https://old.reddit.com/api/me.json due to access control checks.
    [Error] Fetch request failed:
    TypeError: Load failed
    	(anonymous function) (Anonymous Script 3 (line 3))
    	(anonymous function)
    	(anonymous function) (user-script:10076:29)
    	(anonymous function) (index.js:1602)

    I also tried using compatibility mode to no avail.

      No one is typing