question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publishing to Mac App Store (MAS) - Pain & Tears

See original GitHub issue

Versions:

electron-builder - 20.38.5 electron - 4.0.5 macOS Mojave -10.14.3 target - mas mas-dev

After publishing signed app to MAS it was rejected by Apple with the following errors:


Your app crashed on Mac running macOS 10.14.3 when we launched the app. No crash log was generated by this crash.

Next Steps Please revise your app and test it to ensure that it runs as expected.


We discovered one or more bugs in your app when reviewed on Mac running macOS 10.14.3.

The app does not display any app window at launch.


So I decided to test the app locally first. To test it locally I have re-sign the app with a development certificate and a development provisioning profile.

The issue is that the mas-dev app signs and builds successfully but doesn’t start properly.

There is no error-message or any info in system logs

In the same time regular app with dir target signs and runs flawlessly.

package.json

 "mac": {
      "target": [ "mas-dev" ],
      "category": "public.app-category.productivity"
    },
    "mas": {
      "category": "public.app-category.productivity",
      "entitlements": "build/entitlements.mas.plist"
    },

entitlements.mas.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.application-groups</key>
<string>XXXXXXXXXXXXX</string>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

Development provisioning profile

/opt/bin/organize-my-files   develop ●  security cms -D -i embedded.provisionprofile

<?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>AppIDName</key>
	<string>allapps</string>
	<key>ApplicationIdentifierPrefix</key>
	<array>
	<string>XXXXXXXXXX</string>
	</array>
	<key>CreationDate</key>
	<date>2019-02-19T22:11:57Z</date>
	<key>Platform</key>
	<array>
		<string>OSX</string>
	</array>
    <key>IsXcodeManaged</key>
    <false/>
	<key>DeveloperCertificates</key>
	<array>
		<data>XXXXXXXXXXXXXXXXX</data>
	</array>


	<key>Entitlements</key>
	<dict>
		<key>keychain-access-groups</key>
		<array>
			<string>XXXXXXX.*</string>
		</array>
		<key>com.apple.application-identifier</key>
		<string>XXXXXXXXX.*</string>
		<key>com.apple.developer.team-identifier</key>
		<string>XXXXXXXXXX</string>

	</dict>
	<key>ExpirationDate</key>
	<date>2020-02-19T22:11:57Z</date>
	<key>Name</key>
	<string>dev</string>
	<key>ProvisionedDevices</key>
	<array>
		<string>XXXX-UUID</string>
	</array>
	<key>TeamIdentifier</key>
	<array>
		<string>XXXXXXXX</string>
	</array>
	<key>TeamName</key>
	<string>Name Surname</string>
	<key>TimeToLive</key>
	<integer>365</integer>
	<key>UUID</key>
	<string>YYYYYYY-UNKNOWN-UUID</string>
	<key>Version</key>
	<integer>1</integer>
</dict>
</plist>%

debug output:

 /opt/bin/organize-my-files   develop ●  time DEBUG=electron-builder electron-builder -m

  • electron-builder version=20.38.5
  • loaded configuration file=package.json ("build" field)
  • effective config config=
                       directories:
                         output: release-builds
                         buildResources: build
                       appId: XXXXXXXXXXXXXXXX
                       snap:
                         confinement: classic
                       mac:
                         target:
                           - mas-dev
                         category: public.app-category.productivity
                       mas:
                         category: public.app-category.productivity
                         entitlements: build/entitlements.mas.plist
                       linux:
                         target:
                           - AppImage
                           - snap
                       win:
                         target:
                           - nsis
                           - portable
                           - appx
                         certificateFile: cert.pfx
                         icon: build/icon.ico

  • writing effective config file=release-builds/builder-effective-config.yaml
  • no native production dependencies
  • packaging       platform=mas arch=x64 electron=4.0.5 appOutDir=release-builds/mas-dev
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder unpack-electron --configuration [{"platform":"mas","arch":"x64","version":"4.0.5"}] --output /opt/bin/organize-my-files/release-builds/mas-dev --distMacOsAppName Electron.app
  • map async                 taskCount=2
  • map async                 taskCount=1
  • map async                 taskCount=206
  • fix permissions           file=/opt/bin/organize-my-files/release-builds/mas-dev/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions newPermissions=rwxr-xr-x originalPermissions=rwxr--r-- reason=group or other cannot read
  • fix permissions           file=/opt/bin/organize-my-files/release-builds/mas-dev/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A newPermissions=rwxr-xr-x originalPermissions=rwxr--r-- reason=group or other cannot read
  • exited          command=app-builder code=0 pid=6067
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder node-dep-tree --dir /opt/bin/organize-my-files
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=mkdirp
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=1 unresolved=mkdirp
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=inflight, inherits, minimatch, once, path-is-absolute
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=once
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=wrappy
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=brace-expansion
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=1 unresolved=brace-expansion
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=minimatch
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=inherits
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=safe-buffer
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=graceful-fs, universalify
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=1 unresolved=graceful-fs,
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=graceful-fs
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=1 unresolved=graceful-fs
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=graceful-fs
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=1 unresolved=graceful-fs
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=minimist
  • unresolved deps           nodeModuleDir=/opt/bin/node_modules round=0 unresolved=path-is-absolute, inflight, inherits, minimatch, once
  • unresolved deps           nodeModuleDir=/opt/bin/organize-my-files/node_modules round=0 unresolved=abbrev
  • exited          command=app-builder code=0 pid=6069 out=[{"dir":"/opt/bin/node_modules","deps":["balanced-match","brace-expansion","concat-map","graceful-fs","inflight","inherits","minimatch","mkdirp","natives","once","path-is-absolute","safe-buffer","wrappy"]},{"dir":"/opt/bin/organize-my-files/node_modules","deps":["abbrev","about-window","async","balanced-match","brace-expansion","bytes","chart.js","chartjs-color","chartjs-color-string","color-convert","color-name","concat-map","core-util-is","filesize","fs-extra","fs.realpath","get-folder-size","glob","graceful-fs","inflight","inherits","isarray","lodash","lodash.deburr","makeerror","mime","minimatch","minimist","mkdirp","moment","mv","once","open","parse-listing","path-is-absolute","process-nextick-args","readable-stream","readdirp","recursive-readdir","safe-buffer","set-immediate-shim","string-pixel-width","string_decoder","sudo-prompt","tmpl","touch","universalify","util-deprecate","walker","wrappy"]},{"dir":"/opt/bin/node_modules/mkdirp/node_modules","deps":["minimist"]},{"dir":"/opt/bin/organize-my-files/node_modules/fs-extra/node_modules","deps":["jsonfile"]},{"dir":"/opt/bin/organize-my-files/node_modules/get-folder-size/node_modules","deps":["async"]},{"dir":"/opt/bin/organize-my-files/node_modules/mkdirp/node_modules","deps":["minimist"]},{"dir":"/opt/bin/organize-my-files/node_modules/mv/node_modules","deps":["glob","ncp","rimraf"]},{"dir":"/opt/bin/organize-my-files/node_modules/recursive-readdir/node_modules","deps":["minimatch"]},{"dir":"/opt/bin/organize-my-files/node_modules/touch/node_modules","deps":["nopt"]}]
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder icon --format icns --root /opt/bin/organize-my-files/build --root /opt/bin/organize-my-files --out /opt/bin/organize-my-files/release-builds/.icon-icns
  • path resolved             outputFormat=icns path=/opt/bin/organize-my-files/build/icon.icns
  • exited          command=app-builder code=0 pid=6071 out={"icons":[{"file":"/opt/bin/organize-my-files/build/icon.icns","size":0}],"isFallback":false}
  • executing       file=security args=find-identity -v
  • executing       file=security args=find-identity -v -p codesigning
  • executed        file=security stdout=
                        1) XXXXXXB537 "3rd Party Mac Developer Application: Name Surname (XXXXXXXXXX)"
                        2) XXXXXXE8F6 "Developer ID Application: Name Surname (XXXXXXXXXX)"
                        3) XXXXXX69E4 "Mac Developer: Name Surname (XXXXXXXXXX)"
                           3 valid identities found

  • executed        file=security stdout=
                        1) XXXXXXB537 "3rd Party Mac Developer Application: Name Surname (XXXXXXXXXX)"
                        2) XXXXXXFF81 "3rd Party Mac Developer Installer: Name Surname (XXXXXXXXXX)"
                        3) XXXXXXE8F6 "Developer ID Application: Name Surname (XXXXXXXXXX)"
                        4) XXXXXX23A2 "Developer ID Installer: Name Surname (XXXXXXXXXX)"
                        5) XXXXXX69E4 "Mac Developer: Name Surname (XXXXXXXXXX)"
                           5 valid identities found

  • signing         file=release-builds/mas-dev/Organize My Files.app identityName=Mac Developer: Name Surname (XXXXXXXXXX) identityHash=XXXXXXXXXXXXXXXXX69E4 provisioningProfile=none

DEBUG=electron-builder electron-builder -m  9.49s user 2.40s system 96% cpu 12.286 total


The main questions are:

  • How to test the app locally before sending it to Mac App Store?
  • What else can I do on my side to fix all pain and tears issues while submitting to MAS?

@develar i will appreciate if you can have a look on this. I will be very grateful for any advices


Reads:


Refs:

#3679

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
vasyl-shumskyicommented, Mar 7, 2019

This has been fixed. Thanks for your help guys.

5reactions
18672786357commented, Aug 12, 2019

@vasyl-shumskyi How did you solve it? I have the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

The odyssey of publishing an app in the Mac App Store
It basically says that when apps are downloaded from the MAS, Apple adds a _MASReceipt folder inside your app, which holds the Apple-issued...
Read more >
Submitting Apps to the Mac App Store - Apple Developer
Tips and best practices for preparing and submitting your macOS app to the Mac App Store.
Read more >
CreateSpace - Amazon Kindle Direct Publishing
Access your books. When your account is ready, you'll be redirected to KDP. This can take a few minutes. Go to your booksBy...
Read more >
Cbd Sleep Gummies Canada - Advocates for Children of New Jersey
Buddha wrote, where to buy green ape cbd gummies Now, for the entire Xigu, equipment, operating system, application store and payment System, Apple...
Read more >
Apple App Store fee NFT changes follow legislative inaction ...
Data Sheet Apple is taunting Congress with its newest App Store rules Will Washington respond BYJacob CarpenterOctober 25, 2022, 4:47 PM UTCApple CEO...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found