puppetlabs/puppet · error · SerializationError
Unexpected end of input
Error message
Unexpected end of input
What it means
Error "Unexpected end of input" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/serialization/json.rb:260
class Unpacker
def initialize(io)
re_initialize(io)
@type_registry = {}
@nested = []
end
def re_initialize(io)
parsed = parse_io(io)
raise SerializationError, _("JSON stream is not an array. It is a %{klass}") % { klass: io.class.name } unless parsed.is_a?(Array)
@etor_stack = [parsed.each]
end
def read
obj = nil
loop do
raise SerializationError, _('Unexpected end of input') if @etor_stack.empty?
etor = @etor_stack.last
begin
obj = etor.next
break
rescue StopIteration
@etor_stack.pop
end
end
if obj.is_a?(Array)
ext_etor = obj.each
@etor_stack << ext_etor
ext_no = ext_etor.next
ext_block = @type_registry[ext_no]
raise SerializationError, _("Invalid input. %{ext_no} is not a valid extension number") % { ext_no: ext_no } if ext_block.nil?
obj = ext_block.call(nil)
endView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/serialization/json.rb:260 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/01e06662118594c8.
Report an issue: GitHub.