[Pkg-javascript-devel] Bug#1013620: node-xml2js: FTBFS: TypeError: Class constructor Parser cannot be invoked without 'new'

Lucas Nussbaum lucas at debian.org
Fri Jun 24 12:27:34 BST 2022


Source: node-xml2js
Version: 0.4.23+~cs15.4.0+dfsg-3
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20220624 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary
>    dh_update_autotools_config
>    dh_autoreconf
>    dh_auto_configure --buildsystem=nodejs
> Link node_modules/zap -> ../node-zap
> Link node_modules/xmlbuilder -> ../xmlbuilder
>    dh_auto_build --buildsystem=nodejs
> No build command found, searching known files
> Found debian/nodejs/xmlbuilder/build
> 	cd ./xmlbuilder && sh -ex ../debian/nodejs/xmlbuilder/build
> + coffee -co lib src
> Found debian/nodejs/./build
> 	cd ./. && sh -ex debian/nodejs/./build
> + coffee -c -o lib/ src/
>    dh_auto_test --buildsystem=nodejs
> 	ln -s ../debian/tests/test_modules/node-zap node_modules/node-zap
> 	ln -s ../. node_modules/xml2js
> 	/bin/sh -ex debian/tests/pkg-js/test
> + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:debian/tests/test_modules/node-zap/bin/
> + zap
> bom/test decoded BOM... passed
> builder/test building basic XML structure... passed
> builder/test setting XML declaration... passed
> builder/test pretty by default... passed
> builder/test setting indentation... passed
> builder/test headless option... passed
> builder/test allowSurrogateChars option... passed
> builder/test explicit rootName is always used: 1. when there is only one element... passed
> builder/test explicit rootName is always used: 2. when there are multiple elements... passed
> builder/test default rootName is used when there is more than one element in the hash... passed
> builder/test when there is only one first-level element in the hash, that is used as root... passed
> builder/test parser -> builder roundtrip... passed
> builder/test building obj with undefined value... passed
> builder/test building obj with null value... passed
> builder/test escapes escaped characters... passed
> builder/test cdata text nodes... passed
> builder/test cdata text nodes with escaped end sequence... passed
> builder/test uses cdata only for chars &, <, >... passed
> builder/test uses cdata for string values of objects... passed
> builder/test does not error on non string values when checking for cdata... passed
> builder/test does not error on array values when checking for cdata... passed
> builder/test building obj with array... passed
> parser/test parse with defaults... passed
> parser/test parse with explicitCharkey... passed
> parser/test parse with mergeAttrs... passed
> parser/test parse with mergeAttrs and not explicitArray... passed
> parser/test parse with explicitChildren... passed
> parser/test parse with explicitChildren and preserveChildrenOrder... passed
> parser/test parse with explicitChildren and charsAsChildren and preserveChildrenOrder... passed
> parser/test parse with explicitChildren and charsAsChildren and preserveChildrenOrder and includeWhiteChars... passed
> parser/test parse with explicitChildren and charsAsChildren and preserveChildrenOrder and includeWhiteChars and normalize... passed
> parser/test element without children... passed
> parser/test parse with explicitChildren and charsAsChildren... passed
> parser/test text trimming, normalize... passed
> parser/test text trimming, no normalizing... passed
> parser/test text no trimming, normalize... passed
> parser/test text no trimming, no normalize... passed
> parser/test enabled root node elimination... passed
> parser/test disabled root node elimination... passed
> parser/test default empty tag result... passed
> parser/test empty tag result specified null... passed
> parser/test invalid empty XML file... passed
> parser/test enabled normalizeTags... passed
> parser/test parse with custom char and attribute object keys... passed
> parser/test child node without explicitArray... passed
> parser/test child node with explicitArray... passed
> parser/test ignore attributes... passed
> parser/test simple callback mode... passed
> parser/test simple callback with options... passed
> parser/test double parse... passed
> parser/test element with garbage XML... passed
> parser/test simple function without options... passed
> parser/test simple function with options... passed
> parser/test async execution... passed
> parser/test validator... passed
> parser/test validation error... passed
> parser/test error throwing... passed
> parser/test error throwing after an error (async)... passed
> parser/test xmlns... passed
> parser/test callback should be called once... passed
> parser/test no error event after end... passed
> parser/test empty CDATA... passed
> parser/test CDATA whitespaces result... passed
> parser/test escaped CDATA result... passed
> parser/test non-strict parsing... passed
> parser/test construction with new and without... failed
> node:events:505
>       throw er; // Unhandled 'error' event
>       ^
> 
> TypeError: Class constructor Parser cannot be invoked without 'new'
>     at /<<PKGBUILDDIR>>/test/parser.test.coffee:500:27
>     at Parser.<anonymous> (/<<PKGBUILDDIR>>/lib/parser.js:327:18)
>     at Parser.emit (node:events:527:28)
>     at SAXParser.saxParser.onclosetag (/<<PKGBUILDDIR>>/lib/parser.js:289:23)
>     at emit (/usr/share/javascript/sax/sax.js:624:35)
>     at emitNode (/usr/share/javascript/sax/sax.js:629:5)
>     at closeTag (/usr/share/javascript/sax/sax.js:889:7)
>     at SAXParser.write (/usr/share/javascript/sax/sax.js:1436:13)
>     at Parser.parseString (/<<PKGBUILDDIR>>/lib/parser.js:346:31)
>     at Object.test construction with new and without (/<<PKGBUILDDIR>>/test/parser.test.coffee:498:13)
>     at Object.<anonymous> (/<<PKGBUILDDIR>>/debian/tests/test_modules/node-zap/bin/zap:52:25)
>     at Module._compile (node:internal/modules/cjs/loader:1105:14)
>     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
>     at Module.load (node:internal/modules/cjs/loader:981:32)
>     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
>     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
>     at node:internal/main/run_main_module:17:47
> 
> Emitted 'error' event on Parser instance at:
>     at Parser.parseString (/<<PKGBUILDDIR>>/lib/parser.js:350:16)
>     at Object.test construction with new and without (/<<PKGBUILDDIR>>/test/parser.test.coffee:498:13)
>     [... lines matching original stack trace ...]
> 
> 
> parser/test not closed but well formed xml... passed
> parser/test cdata-named node... passed
> parser/test onend with empty xml... passed
> parser/test parsing null... passed
> parser/test parsing undefined... passed
> parser/test chunked processing... passed
> parser/test single attrNameProcessors... passed
> parser/test multiple attrNameProcessors... passed
> parser/test single attrValueProcessors... passed
> parser/test multiple attrValueProcessors... passed
> parser/test single valueProcessors... passed
> parser/test multiple valueProcessors... passed
> parser/test single tagNameProcessors... passed
> parser/test single tagNameProcessors in simple callback... passed
> parser/test multiple tagNameProcessors... passed
> parser/test attrValueProcessors key param... passed
> parser/test valueProcessors key param... passed
> parser/test parseStringPromise parsing... passed
> parser/test parseStringPromise with bad input... passed
> parser/test global parseStringPromise parsing... passed
> parser/test global parseStringPromise with options... passed
> parser/test global parseStringPromise with bad input... passed
> processors/test normalize... passed
> processors/test firstCharLowerCase... passed
> processors/test stripPrefix... passed
> processors/test stripPrefix, ignore xmlns... passed
> processors/test parseNumbers... passed
> processors/test parseBooleans... passed
> processors/test a processor that filters by node name... passed
> processors/test a processor that filters by attr name... passed
> dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1


The full build log is available from:
http://qa-logs.debian.net/2022/06/24/node-xml2js_0.4.23+~cs15.4.0+dfsg-3_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220624;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220624&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Pkg-javascript-devel mailing list