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

Launch nwjs app after signing results in error #5616

Closed
ggarek opened this issue Jan 6, 2017 · 9 comments
Closed

Launch nwjs app after signing results in error #5616

ggarek opened this issue Jan 6, 2017 · 9 comments
Assignees

Comments

@ggarek
Copy link

ggarek commented Jan 6, 2017

nwjs version: v0.18.1 MAS (+libffmeg from same version build OSX flavor)
os: macOS 10.12.2
app: Simple app with just index.html and minimal package.json.

If i do not use entitlements while signing the app and children, then it works.
If i use entitlements with just sandbox, nwjs prints error to console. The app does not work, but the nwjs does not quit either.

nwjs prints these lines if an app is signed with entitlements:

[20231:33027:0106/152608:ERROR:mach_port_broker.mm(100)] bootstrap_check_in: Permission denied (1100)
[20231:33027:0106/152608:ERROR:mach_broker_mac.mm(52)] Failed to initialize the MachListenerThreadDelegate
[0106/152608:ERROR:mach_port_broker.mm(43)] bootstrap_look_up: Permission denied (1100)
[0106/152611:ERROR:mach_port_broker.mm(43)] bootstrap_look_up: Permission denied (1100)

I use entitlements, provided on NW.js wiki pages:

(master)⚡ [1] % cat plist/child.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>com.apple.security.app-sandbox</key>
        <true/>
        <key>com.apple.security.inherit</key>
        <true/>
    </dict>
</plist>%                                                                                                                                                                            (master)⚡ % cat plist/parent.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>com.apple.security.app-sandbox</key>
        <true/>
    </dict>
</plist>%
@ggarek
Copy link
Author

ggarek commented Jan 7, 2017

Tried same use case with nwjs-v0.20.0-beta1-osx-x64

Here is the output when i run the app signed with entitlements

[0106/231841.392470:WARNING:close_multiple.cc(97)] opendir: Operation not permitted
[0106/231841.404405:ERROR:mach_extensions.cc(68)] bootstrap_check_in org.chromium.crashpad.child_port_handshake.31378.540502.FVIRHJWIJNSVHEJD: Permission denied (1100)
[0106/231841.405196:ERROR:file_io.cc(30)] read: expected 4, observed 0
[31376:775:0106/231841.468161:ERROR:process_singleton_posix.cc(1044)] Failed to bind() /var/folders/z_/k5xg6qdx6tv3y2k8lqvzqg6r0000gn/T/com.simple/.com.simple.bWLk2w/SingletonSocket: Operation not permitted
[31376:775:0106/231841.468587:ERROR:chrome_browser_main.cc(1588)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
[31376:33283:0106/231841.468900:ERROR:mach_port_broker.mm(100)] bootstrap_check_in: Permission denied (1100)
[31376:33283:0106/231841.468953:ERROR:mach_broker_mac.mm(52)] Failed to initialize the MachListenerThreadDelegate

If app is signed with no entitlements, it works.

@ghostoy
Copy link
Member

ghostoy commented Jan 16, 2017

Looks like you didn't sign with the new signing script. It's located in mas/build_mas.py within the same package of MAS build.

And we'll soon publish a new release and doc for detailed usage of MAS build. You can try with the new script.

@ghostoy
Copy link
Member

ghostoy commented Jan 16, 2017

@ggarek The new beta testing build is released. See https://groups.google.com/d/msg/nwjs-general/H3NZKTHLFz4/7nrym9kTCAAJ for the announcement.

And if the signing script solved your issue, please close this bug.

@ghostoy ghostoy self-assigned this Jan 16, 2017
@ggarek
Copy link
Author

ggarek commented Jan 16, 2017

@ghostoy Thank you, i will check the new version and signing, report here and close the issue if it is not reproduced.

@ghostoy ghostoy added the bug label Jan 17, 2017
@ghostoy
Copy link
Member

ghostoy commented Jan 18, 2017

@ggarek How is it going?

@ghostoy ghostoy removed the bug label Jan 18, 2017
@ggarek
Copy link
Author

ggarek commented Jan 20, 2017

@ghostoy I used v0.19.5 beta mas build and bundled signing script, all worked fine. Meaning, the app starts with and without signing and same goes for the .pkg, produced by the aforementioned signing script.

Currently my app waits for review in MAS. I will report any progress.

@ggarek
Copy link
Author

ggarek commented Jan 25, 2017

@ghostoy My app was reviewed successfully and it is in AppStore now. The mas build works. Thank you!

Facy in AppStore

@Christywl
Copy link
Contributor

Close this issue now per the above comment.

@sunuslee
Copy link

@ghostoy "
Looks like you didn't sign with the new signing script. It's located in mas/build_mas.py within the same package of MAS build.

And we'll soon publish a new release and doc for detailed usage of MAS build. You can try with the new script.
"

hello, what's the trick you did to make this work ? i'm facing same issue here :(
with correct entitlements.

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

4 participants