Open nvcken opened 9 years ago
I ran into the same error. @nvcken - Did you figure out a way to fix it yet?
I am trying to parse the Info.plist file from an iPhone IPA package as well...
@SchulzKai Hi , I have not find out yet,because urgent so I have use other module simple-plist
Same issue here agains /Applications/VLC.app/Contents/Info.plist
on osx 10.8.5
TypeError: Cannot read property 'nodeName' of null
at Object.parse (/Users/usr/node_modules/plist/lib/parse.js:45:26)
at Object.init (/Users/usr/sight.js:487:19)
at Object.<anonymous> (/Users/usr/bin/sight:3:21)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
I found a strong correlation. I get the exact same error for a binary plist, but the same plist as XML parses fine.
The short term solution would be to convert the binary plist to either XML or JSON by use of objc or swift.
As Swift:
import Foundation
let d=NSDictionary(contentsOfFile:"binary.plist")!
if outputAsPlist {
d.writeToFile("non-binary.plist", atomically:true)
} else {
let json=NSJSONSerialization.dataWithJSONObject(d, options:.PrettyPrinted, error:nil)
json?.writeToFile("non-binary.json", atomically:true)
}
This still happens with 3.0.0. Can I provide anything to help debugging this issue? My app-Bundle has been created by Platypus, so I don't have direct influence over the creation of the plist file.
@TooTallNate I use this lib to read info.plist of ipa file.
I got this error