Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'nodeName' of null - info.plist ipa file #55

Open
nvcken opened this issue Jan 21, 2015 · 5 comments
Open

Cannot read property 'nodeName' of null - info.plist ipa file #55

nvcken opened this issue Jan 21, 2015 · 5 comments

Comments

@nvcken
Copy link

nvcken commented Jan 21, 2015

@TooTallNate
I use this lib to read info.plist of ipa file.

var plist = require('plist');
var dl_file_path =  path.join(__dirname, '../upload/info.plist');

var obj = plist.parse(fs.readFileSync(dl_file_path, 'utf8'));
console.log(JSON.stringify(obj));

I got this error

TypeError: Cannot read property 'nodeName' of null
    at Object.parse (d:\Appota\appota_flight\node_modules\plist\lib\parse.js:45:26)
    at Object.exports.install [as handle] (d:\Appota\appota_flight\routes\upbuild.js:241:2
5)
    at next_layer (d:\Appota\appota_flight\node_modules\express\lib\router\route.js:103:13
)
    at Route.dispatch (d:\Appota\appota_flight\node_modules\express\lib\router\route.js:10
7:5)
    at d:\Appota\appota_flight\node_modules\express\lib\router\index.js:205:24
    at param (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:286:14)
    at param (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:298:16)
    at Function.proto.process_params (d:\Appota\appota_flight\node_modules\express\lib\rou
ter\index.js:314:3)
    at next (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:199:19)
    at next (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:176:38)
GET /ins/1415257358528 200 120001ms
 req install
TypeError: Cannot read property 'nodeName' of null
    at Object.parse (d:\Appota\appota_flight\node_modules\plist\lib\parse.js:45:26)
    at Object.exports.install [as handle] (d:\Appota\appota_flight\routes\upbuild.js:241:2
5)
    at next_layer (d:\Appota\appota_flight\node_modules\express\lib\router\route.js:103:13
)
    at Route.dispatch (d:\Appota\appota_flight\node_modules\express\lib\router\route.js:10
7:5)
    at d:\Appota\appota_flight\node_modules\express\lib\router\index.js:205:24
    at param (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:286:14)
    at param (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:298:16)
    at Function.proto.process_params (d:\Appota\appota_flight\node_modules\express\lib\rou
ter\index.js:314:3)
    at next (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:199:19)
    at next (d:\Appota\appota_flight\node_modules\express\lib\router\index.js:176:38)
@SchulzKai
Copy link

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...

@nvcken
Copy link
Author

nvcken commented Feb 24, 2015

@SchulzKai
Hi , I have not find out yet,because urgent so I have use other module simple-plist

@przemyslawpluta
Copy link

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

@fizker
Copy link

fizker commented Sep 1, 2015

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)
}

@ChristianCiach
Copy link

ChristianCiach commented Feb 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants