MrOtherGuy/fx-autoconfig

getBoolPref unexpected error

Laurens256 opened this issue · 3 comments

When using the writeFile function, something called getBoolPref gets called inside fs.sys.mjs (line 170). This results in the following error:

Uncaught (in promise) NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]

Enabling allowUnsafeWrites pref fixes this, but the file I passed to the writeFile function is inside my resources directory so this shouldn't be necessary. Removing this line and the if statement which checks for allowUnsafeWrites also fixes this code and everything works as expected. Problem is (I think) something with getBoolPref.

Thanks for the great product btw :)

I found the problem was my about:config did not have a userChromeJS.allowUnsafeWrites key at all. Setting this key to either true or false fixed the issue. Might have been a mistake on my part, feel free to close if it was :)

Thanks for reporting. This is definitely oversight on my part - it should not fail if the pref is missing. c8d08a8 should fix that.

Thanks, this fixed it