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

Unable to read binary format plist file #35

Closed
huwan opened this issue Apr 2, 2019 · 5 comments · Fixed by #41
Closed

Unable to read binary format plist file #35

huwan opened this issue Apr 2, 2019 · 5 comments · Fixed by #41

Comments

@huwan
Copy link

@huwan huwan commented Apr 2, 2019

Issuehunt badges

I created a simple MacOS application from command line script by Platypus. I got the following error message when trying to use create-dmg to create a .dmg file.

/usr/local/lib/node_modules/create-dmg/node_modules/plist/lib/parse.js:68
    doc.documentElement.nodeName === 'plist',
                        ^

TypeError: Cannot read property 'nodeName' of null
    at Object.parse (/usr/local/lib/node_modules/create-dmg/node_modules/plist/lib/parse.js:68:25)
    at Object.<anonymous> (/usr/local/lib/node_modules/create-dmg/cli.js:57:23)
    at Module._compile (internal/modules/cjs/loader.js:736:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:568:12)
    at Function.Module._load (internal/modules/cjs/loader.js:560:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
    at executeUserCode (internal/bootstrap/node.js:526:15)
    at startMainThreadExecution (internal/bootstrap/node.js:439:3)

I ended up figuring it out that create-img fails due to the wrong format (binary instead of xml/text) of Info.plist in app's contents directory. So I use plutil -convert xml1 Info.plist to convert the plist file to XML from binary. This solved the problem.

Is it an issue with create-dmg?


IssueHunt Summary

neonowy neonowy has been rewarded.

Backers (Total: $30.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@sindresorhus

This comment has been minimized.

Copy link
Owner

@sindresorhus sindresorhus commented Apr 10, 2019

I have never seen an app with a binary Info.plist. I think we should just throw a more human-friendly error message about it.

@IssueHuntBot

This comment has been minimized.

Copy link

@IssueHuntBot IssueHuntBot commented Apr 11, 2019

@IssueHunt has funded $30.00 to this issue.


@jhangyu

This comment has been minimized.

Copy link

@jhangyu jhangyu commented Oct 17, 2019

Maybe convert the apple binary Info.plist to xml format Info.plist through plutil first will help.
plutil -convert xml1 Info.plist

@sindresorhus

This comment has been minimized.

Copy link
Owner

@sindresorhus sindresorhus commented Oct 17, 2019

@jhangyu Yeah, that's probably a good solution.

@issuehunt-app

This comment has been minimized.

Copy link

@issuehunt-app issuehunt-app bot commented Dec 6, 2019

@sindresorhus has rewarded $27.00 to @neonowy. See it on IssueHunt

  • 💰 Total deposit: $30.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $3.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.