jdx/mise · error

Consider enabling 'keep_danger_placeholders' option (to sile

Error message

Consider enabling 'keep_danger_placeholders' option (to silence this error, if parser wasn't failed with current HTML-code) or manually replace few random bytes, to free up the codes.

What it means

The follow-up remediation message emitted alongside error 1616 by htmlparser.lua's FindPH routine. It tells the user the two ways out of the missing-byte-codes situation: turn on 'keep_danger_placeholders' (which suppresses the fatal error when parsing would still succeed) or free up byte codes by replacing a few bytes in the HTML.

Source

Thrown at crates/vfox/lua/htmlparser.lua:89

				else -- if < or >
					dbg("[FindPH]:#LINE# Done!",i)
					break
				end -- if < or > -- }}}
			else -- text!match(cc)
				dbg("[FindPH]:#LINE# Text contains this byte! || i=%d",i)
			end -- text!match(cc) -- }}}
			local skip=1
			if i==31 then
				skip=96 -- ASCII
			end
			i=i+skip
		until (i==255) -- }}}
		i=nil
		--- }}}

		if not(tpr["<"]) or not(tpr[">"]) then
			err("Impossible to find at least two unused byte codes in this HTML-code. We need it to escape bracket-contained placeholders inside tags.")
			err("Consider enabling 'keep_danger_placeholders' option (to silence this error, if parser wasn't failed with current HTML-code) or manually replace few random bytes, to free up the codes.")
		else
			dbg("[FindPH]:#LINE# Found! || '<'=%d, '>'=%d",tpr["<"]:byte(),tpr[">"]:byte())
		end

--	dbg("tpr[>] || tpr[] || #busy%d")

		-- g {{{
		local function g(id,...)
			local arg={...}
			local orig=arg[id]
			arg[id]=arg[id]:gsub("(.)",tpr)
			if arg[id] ~= orig then
				tpl=true
				dbg("[g]:#LINE# orig: %s", str(orig))
				dbg("[g]:#LINE# replaced: %s",str(arg[id]))
			end
			dbg("[g]:#LINE# called, id: %s, arg[id]: %s, args { "..(("{%s}, "):rep(#arg):gsub(", $","")).." }",id,arg[id],...)
			dbg("[g]:#LINE# concat(arg): %s",table.concat(arg))

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Set the 'keep_danger_placeholders' option to convert this into a non-fatal condition.
  2. Replace a few random/unusual bytes in the HTML to free up byte codes.
  3. Pre-normalize the input (strip control/exotic bytes) before invoking the parser.

Example fix

// before
-- default options: fatal when no free byte codes
htmlparser.parse(html)
// after
-- enable the option to silence the error
htmlparser.parse(html, { keep_danger_placeholders = true })
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Always emitted immediately after "Impossible to find at least two unused byte codes..." when `tpr["<"]` or `tpr[">"]` is nil after the 0–255 scan.

Common situations: Same as 1616: vfox plugin parsing HTML whose byte distribution leaves no free placeholder codes; users see the pair of errors together.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/74b936cf0ea09045. Report an issue: GitHub.