Failure Testing Mac App Store App

Hello all!

I am currently trying to test a Mac App Store build of my application. The app has been set up in iTunes Connect. The bundle ID matches. I have a test user set up. The application has been prepared using the excellent App Wrapper.

When I launch the app, the “Sign in to download from the App Store” dialog appears, as it should. I enter the test user’s credentials. Then a dialog appears saying that the application “is damaged and can’t be opened”, to delete the application and download it again from the App Store.

Nothing more appears in the Console.

I’ve read up on some others who have run into this error, but usually it seems the cause is that either the Bundle ID is different than what’s in iTunes Connect, or the application simply isn’t setup in iTunes Connect. I’ve verified that the Bundle ID’s match and the app is definitely setup.

Does anyone have any other ideas?

Thank you!

The other times I’ve seen this error are as follows.

Incorrect permissions within the application bundle.

The application was modified after it was code signed.

Hmmm… I have not modified the app. My workflow is: build the app. Run in through App Wrapper to build the .pkg file. Test the .pkg file using the “installer” command in Terminal. Launch the app that was placed in the Applications folder. (I have also been sure to remove ALL other copies of the app before installing.)

I don’t know how bad permissions could get in there or anything being modified after App Wrapper has done its thing.

Okay - can you just verify that it is the Mac App Store certificate?

Lastly, in App Wrapper, under the preferences are you using the App Wrapper code signing engine or the Mavericks code signing engine? Try swapping.

Alternatively you can give the latest beta version a try, which may help.

I do know it’s the Mac App Store certificate. As well, when I use the Installer command, it reports: the package “…has valid signature for submission: 3rd Party Mac Developer Installer…”

I won’t have access to the build computer until later this evening. At that point, I’ll check the preference setting you mention (it’s probably whatever the default is as I don’t remember ever changing it) and try wrapping with the other setting. I’ll also try your beta version.

Thank you for the ideas!

I guess I should have mentioned, the build computer (and the computer with App Wrapper) isn’t running Mavericks. It’s running 10.8.5. So, it’s, by default, using the App Wrapper engine.

huh… Does it include any ‘helper’ apps?

Nope. Completely self-contained.

I’m currently migrating stuff to my 10.9 box to see if that makes any difference.

It shouldn’t make any difference… Oh hold on… I vaguely recall something… along the lines of, if it fails to correctly ‘activate’ the application it can return that the application is corrupted, and IIRC a restart and re-attempt fixed it… But it’s lurking in the depths of my memory…

I have no idea. Still getting the error. Everything seems successful from building in Xojo to running it through App Wrapper (with both the release and the beta version, using both the App Wrapper engine and the Mavericks engine). No errors. Using

installer -store -pkg /Path/To/MyApp.pkg -target /

runs and provides feedback saying everything is okay.

I just launch the app from /Applications and it launches, exits with a 173 code (as expected), throws up the Mac App Store dialog. I put in my Test User credentials. I then get the error message. It’s very frustrating. That’s the worst error message ever. Nothing in the Console to even try to begin to point where the problem is. What failed?

I have to be missing something somewhere, I just have no idea what that might be.

I don’t know why I didn’t think to look at this before, but it turns out that a _MASReceipt is never being put in my app. That would explain the error message. Now, I have no idea why it’s not validating correctly and a _MASReceipt isn’t being installed in my app…

Okay. This is weird, but I found a solution. The key was my (belated) discovery that a _MASReceipt wasn’t being written to the app. With that nugget of info, I did some fairly extensive web searching. Turns out, something ended up being wrong with the test user itself. Although the user would validate for another app I already have in the App Store, it wouldn’t for this one. When I created a new test user, it worked just fine and this new app validated. I have deleted the old test user as the new test user works for both the already existing app and this new app.

Thank you Sam for your help. I very much appreciate it!

Glad to hear that you figured it out, sorry that it’s a frustrating exercise, maybe I can add a feature to App Wrapper’s validation module so it can validate a receipt. At least then, if it fails next time, App Wrapper might be in a better place to provide some more information.

This was in no way App Wrapper’s fault. Just more arcane, weird things happening behind Apple’s wall. I appreciate the help you were trying to give.

I’m confused though. How could a App Wrapper eventually provide a feature to help with this? The problem wasn’t happening until well after App Wrapper was involved. I was testing the package that App Wrapper created and the installed application wasn’t downloading the receipt. I’m not sure how App Wrapper could potentially help check for that.

App Wrapper has some validation functions in it, drag a code signed application into App Wrapper. I could get it to check and verify the receipt of the package as well.

However it can’t tell that something at Apple’s end failed, it can only tell you that the receipt exists or not (and if it’s valid).

Ah. I suppose that makes sense. That would be handy as it would have save me lots of frustration not realizing that a receipt wasn’t being written.

I do have to say that App Wrapper is a godsend. You should be very proud of what you’ve created there…

Thanks Scott