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

Upload to Mac App Store fails due to missing UUIDs #1752

Closed
1 of 2 tasks
synalysis opened this issue Sep 9, 2019 · 10 comments
Closed
1 of 2 tasks

Upload to Mac App Store fails due to missing UUIDs #1752

synalysis opened this issue Sep 9, 2019 · 10 comments
Labels

Comments

@synalysis
Copy link

synalysis commented Sep 9, 2019

Description

When I try to validate my app before uploading it to the Mac App Store with Xcode, the call to /usr/bin/symbols fails due to missing UUIDs:

Running /Applications/Xcode.app/Contents/Developer/usr/bin/symbols '-noTextInSOD' '-noDaemon' '-arch' 'all' '-symbolsPackageDir' '/var/folders/3c/s0d49z0n5fbcdnbt9gygm8140000gn/T/XcodeDistPipeline.~~~zEPu4O/Symbols' '/var/folders/3c/s0d49z0n5fbcdnbt9gygm8140000gn/T/XcodeDistPipeline.~~~zEPu4O/AppCenter'
error: No UUID for /var/folders/3c/s0d49z0n5fbcdnbt9gygm8140000gn/T/XcodeDistPipeline.~~~zEPu4O/AppCenter(MSSDKExtension.o)
error: No UUID for /var/folders/3c/s0d49z0n5fbcdnbt9gygm8140000gn/T/XcodeDistPipeline.~~~zEPu4O/AppCenter(MSLogger.o)
...

You can check this with
symbols -uuid Pods/AppCenter/AppCenter-SDK-Apple/macOS/AppCenter.framework/AppCenter

Apparently the problem is that AppCenter frameworks are built as static libraries ("Mach-O Type" in Xcode). Is this necessary? HockeySDK was different:

file HockeySDK-Mac/HockeySDK.framework/Versions/A/HockeySDK
HockeySDK-Mac/HockeySDK.framework/Versions/A/HockeySDK: Mach-O 64-bit dynamically linked shared library x86_64
symbols -uuid HockeySDK-Mac/HockeySDK.framework/Versions/A/HockeySDK
    A7D11D86-E0AA-33FD-83FF-B24A86329E07 x86_64   HockeySDK-Mac/HockeySDK.framework/Versions/A/HockeySDK [DYLIB, Empty]

The culprit is in "Config/Target config.xcconfig":
Changing MACH_O_TYPE = staticlib to MACH_O_TYPE = mh_dylib allows to validate my app with Apple. (however the application doesn't work because the framework is searched at /Library/Frameworks/AppCenter.framework so there's more to fixing this issue)

Repro Steps

  1. embedded and linked to AppCenter.framework, AppCenterAnalytics.framework and AppCenterCrashes.framework
  2. Click "Validate App" in the Organizer window in Xcode

Details

  1. Which SDK version are you using?
    AppCenter (2.3.0) - installed via Podfile
  2. Which OS version did you experience the issue on?
    macOS 10.14.6 (18G95)
  3. Which Cocoapods version are you using (run pod --version)?
    1.7.5
  4. What device version did you see this error on? Were you using an emulator or a physical device?
    MacBook Pro
  5. What language are you using?
    • Objective C
    • Swift
  6. What third party libraries are you using?
    Sparkle but that should not be related to the issue
@iamclement
Copy link
Contributor

I @synalysis thanks for reaching out about this. We are looking into it.

@synalysis
Copy link
Author

synalysis commented Sep 10, 2019

I @synalysis thanks for reaching out about this. We are looking into it.

Thank you, I invested already some hours in order to understand the problem. Here's a similar story: golang/go#28997 - at least the error screen shot is the same, the cause maybe not.

Only now I saw another issue related to the framework having a static lib: #1227.

@synalysis
Copy link
Author

I @synalysis thanks for reaching out about this. We are looking into it.

There's another error I ran into which is similar to #1734. I wrote a comment about that unresolved problem, should I create a new issue for that?

@iamclement
Copy link
Contributor

iamclement commented Sep 11, 2019

I am trying to understand the root cause of this so far nothing really relevant. Switching the framework to dynamic can make the validation pass probably because the symbols are independent from the app ones for dynamic frameworks. But then we might encounter the same issue when we'll create the symbols while shipping the frameworks. Need to dig into this a bit deeper.

@iamclement
Copy link
Contributor

@synalysis are you able to see the dSYM files in the DSYM folder of your archived app? Something went wrong while generating the symbol files but not sure what yet.

@synalysis
Copy link
Author

I am trying to understand the root cause of this so far nothing really relevant

I've checked some Apple frameworks and none of them contains a static library. So it seems to be very uncommon not to provide a dynamically linked shared library. From my POV this is the root cause.
And I think it somehow doesn't make sense to ship the AppCenter file in the framework because it's already linked into the application.

@synalysis
Copy link
Author

synalysis commented Sep 11, 2019

@clpolet

are you able to see the dSYM files in the DSYM folder of your archived app?

Yes, it's there. No matter if I use the original CocoaPods distributed framework or the modified one with dynamic linking.

@iamclement iamclement added the bug label Sep 11, 2019
@iamclement
Copy link
Contributor

I reopened the other issue, could be related. We tested a validation on our own app today and it passed so I am thinking that there is a configuration in our app that differs.

@synalysis
Copy link
Author

synalysis commented Sep 12, 2019

@clpolet

We tested a validation on our own app today and it passed so I am thinking that there is a configuration in our app that differs.

My mistake was that I embedded the AppCenter frameworks like I always embedded frameworks. Because you link statically there's no reason for embedding them. Once I don't embed the frameworks the validation runs fine also for me.

So for now I think you can close this issue. Maybe you'll reconsider to link the frameworks dynamically when you want to add for example resources. They would be missing when not embedded in the application. And when embedded there would be the validation problem again because of static linking.

Thank you for your efforts, @clpolet !

@iamclement
Copy link
Contributor

No problem, thanks for the details @synalysis .

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

No branches or pull requests

2 participants