Skip to content

prefsCleaner.bat: ERROR: line ### in prefs.js is too long - Cleaning is a manual job #2001

@redactedscribe

Description

@redactedscribe

What to do about prefsCleaner.bat always complaining that a line in my prefs.js is too long?

Each time I update + clean I have to manually temporarily remove the long lines, re-run the script, and on success, paste the long lines back in.

The lines in question are the below preferences and each is over 12,000 characters long:

  • user_pref("browser.uiCustomization.horizontalTabsBackup", "{...}");
  • user_pref("browser.uiCustomization.state", "{...}");

Another long one is extensions.webextensions.uuids at over 6,000 characters long, but it does not trigger the long line issue.

Here's the BAT logic responsible:

REM ### string length Check Function ####
:strlenCheck
SET /a cnt=0
setlocal ENABLEDELAYEDEXPANSION
FOR /F "tokens=1,* delims=:" %%G IN ('FINDSTR /N "^" prefs.js') DO (
	ECHO:%%H >nul
	SET /a cnt += 1
	IF /I "%%G" NEQ "!cnt!" (
		ECHO:
		CALL :message "ERROR: line !cnt! in prefs.js is too long."
		(CALL :abort "Aborting ..." 30)
	)
)
endlocal

This is not a fresh profile but one I've used for years which I've just installed the hardened user.js to with some overrides. Couldn't find any info on what browser.uiCustomization.horizontalTabsBackup is or if it's needed, but browser.uiCustomization.state sounds like it's certainly required.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions