[ALOY-909] Tooling: No meaningful error message given for invalid XML markup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-12-24T15:35:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | n/a |
Reporter | Stephen Feather |
Assignee | Tony Lukasavage |
Created | 2013-12-12T03:49:38.000+0000 |
Updated | 2017-08-15T20:13:17.000+0000 |
Description
Expectation
Expect project to build or reasonable error message be delivered to developerReality
Error occurs without delivering meaningful message to the developer when parsing fails in a supporting tooling moduleSteps 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.Comments
- Tony Lukasavage 2013-12-24
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:
sudo npm install -g alloy@1.3.1-alpha
- Stephen Feather 2013-12-24 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.
- Tony Lukasavage 2013-12-24 [~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!
- Stephen Feather 2013-12-24 LOL! Merry Christmas, Tony.
- Lee Morris 2017-08-15 Closing as duplicate.