Closed larcara closed 7 years ago
I've reproduced this on my Linux machine using Nokogiri 1.6.7.2:
nokoRuntimeError: Input length = 1
native_write_to at nokogiri/XmlNode.java:1255
write_to at /home/flavorjones/.rvm/gems/jruby-9.0.4.0/gems/nokogiri-1.6.8.rc3-java/lib/nokogiri/xml/node.rb:698
serialize at /home/flavorjones/.rvm/gems/jruby-9.0.4.0/gems/nokogiri-1.6.8.rc3-java/lib/nokogiri/xml/node.rb:630
serialize at /home/flavorjones/.rvm/gems/jruby-9.0.4.0/gems/nokogiri-1.6.8.rc3-java/lib/nokogiri/html/document.rb:144
to_format at /home/flavorjones/.rvm/gems/jruby-9.0.4.0/gems/nokogiri-1.6.8.rc3-java/lib/nokogiri/xml/node.rb:786
to_html at /home/flavorjones/.rvm/gems/jruby-9.0.4.0/gems/nokogiri-1.6.8.rc3-java/lib/nokogiri/xml/node.rb:642
<top> at /home/flavorjones/foo.rb:10
System snapshot:
$ nokogiri -v
# Nokogiri (1.6.7.2)
---
warnings: []
nokogiri: 1.6.7.2
ruby:
version: 2.2.2
platform: java
description: jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 [linux-amd64]
engine: jruby
jruby: 9.0.4.0
xerces: Xerces-J 2.9.0
nekohtml: NekoHTML 1.9.12
And same result with 1.6.8.rc3:
# Nokogiri (1.6.8.rc3)
---
warnings: []
nokogiri: 1.6.8.rc3
ruby:
version: 2.2.2
platform: java
description: jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 [linux-amd64]
engine: jruby
jruby: 9.0.4.0
xerces: Xerces-J 2.11.0
nekohtml: NekoHTML 1.9.21
The reproduce still holds, on JRuby 9.1.5.0 on nokogiri 1.6.8.1:
$ ruby t.rb
RuntimeError: Input length = 1
native_write_to at nokogiri/XmlNode.java:1274
write_to at /Users/olle/.rvm/gems/jruby-9.1.5.0/gems/nokogiri-1.6.8.1-java/lib/nokogiri/xml/node.rb:698
serialize at /Users/olle/.rvm/gems/jruby-9.1.5.0/gems/nokogiri-1.6.8.1-java/lib/nokogiri/xml/node.rb:630
serialize at /Users/olle/.rvm/gems/jruby-9.1.5.0/gems/nokogiri-1.6.8.1-java/lib/nokogiri/html/document.rb:144
to_format at /Users/olle/.rvm/gems/jruby-9.1.5.0/gems/nokogiri-1.6.8.1-java/lib/nokogiri/xml/node.rb:786
to_html at /Users/olle/.rvm/gems/jruby-9.1.5.0/gems/nokogiri-1.6.8.1-java/lib/nokogiri/xml/node.rb:642
<main> at t.rb:6
$ nokogiri -v
# Nokogiri (1.6.8.1)
---
warnings: []
nokogiri: 1.6.8.1
ruby:
version: 2.3.1
platform: java
description: jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.92-b14 on 1.8.0_92-b14 +jit [darwin-x86_64]
engine: jruby
jruby: 9.1.5.0
xerces: Xerces-J 2.11.0
nekohtml: NekoHTML 1.9.21
@kares has submitted a fix for this in #1597
Fixed in master, will be in v1.7.1.
Hi have a problem similar issue #1281 ,but i can reproduce the error whit this snippet:
using
i obtain this error: