Expectation
Expect project to build or reasonable error message be delivered to developer
Reality
Error occurs without delivering meaningful message to the developer when parsing fails in a supporting tooling module
Steps to reproduce.
Create a basic alloy project that will build. Throw the following file into app/assets:
<HTML>
<BODY>
<H2>Test</h2>
</BODY>
</html>
Error
/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/xmldom/sax.js:92
var localNSMap = config.localNSMap;
^
TypeError: Cannot read property 'localNSMap' of undefined
at parse (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/xmldom/sax.js:92:27)
at XMLReader.parse (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/xmldom/sax.js:29:3)
at DOMParser.parseFromString (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/xmldom/dom-parser.js:26:6)
at Object.analyzeHtml (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/titanium-sdk/lib/jsanalyze.js:155:58)
at Object.analyzeHtmlFile (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/titanium-sdk/lib/jsanalyze.js:143:17)
at iOSBuilder.<anonymous> (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/iphone/cli/commands/_build.js:2703:17)
at /Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/async/lib/async.js:548:21
at /Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/async/lib/async.js:224:13
at iterate (/Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/async/lib/async.js:131:13)
at /Users/username/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20131127225644/node_modules/async/lib/async.js:142:25
Notes
The solution obviously is for the developer to fix their markup. However, the developer is not informed as to which file is being processed at the time or the nature of the error.
This is a duplicate of ALOY-907. It has already been resolved and will be available in Alloy 1.3.1. As of the time if this comment, 1.3.1-alpha is currently available with this fix, along with ALOY-905 for compatibility with TiSDK 3.0.0+. You can install it like this:
Glad its fixed and all. But this ticket was opened on the 13th, a week before 907 was. At the time this ticket was opened, it was NOT resolved.
[~sfeather] apologies for any confusion. I probably didn't see this one before ALOY-907 because I'm assuming it was in TC until today. You're the best bug reporter ever and all should bask in your magnificence. Better? :P Now go drink some egg nog or something!
LOL! Merry Christmas, Tony.
Closing as duplicate.