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

Build Fails because of AWSCognitoAuthPlugin #3217

Closed
afern247 opened this issue Sep 12, 2023 · 9 comments
Closed

Build Fails because of AWSCognitoAuthPlugin #3217

afern247 opened this issue Sep 12, 2023 · 9 comments
Assignees
Labels
auth Issues related to the Auth category build Issues related to build and CI/CD question General question

Comments

@afern247
Copy link

afern247 commented Sep 12, 2023

Describe the bug

My app build is failing because of , the issue seems to be an optimization level that needs to be done. Here's how it looks:

image

CompileSwift normal x86_64 (in target 'AWSCognitoAuthPlugin' from project 'Amplify')
...
/Users/arturo/.../Build/Intermediates.noindex/Amplify.build/Release-iphonesimulator/AWSCognitoAuthPlugin.build/Objects-normal-tsan/x86_64/outputs-5 -index-unit-output-path-filelist /Users/arturo/.../DerivedData/.../Build/Intermediates.noindex/Amplify.build/Release-iphonesimulator/AWSCognitoAuthPlugin.build/Objects-normal-tsan/x86_64/index-unit-outputs-5

Command CompileSwift failed with a nonzero exit code

image

I tested the same code, same Amplify version on Xcode 14.2 (14C18) and works fine.

This is a blocker to upgrade to the new Xcode version coming out now, please fix assap

In case it's an optimization issue, here are my settings:
image

Steps To Reproduce

Steps to reproduce the behavior:
Download the latest version of Xcode from the App Store Xcode 14.3.1 (14E300c) and try to compile the app, make sure to clean build and app data.

Amplify Framework Version

2.17.0

Amplify Categories

Auth

Dependency manager

Swift PM

Swift version

5.8

CLI version

12.4.0

Xcode version

14.3.1 (14E300c)

Relevant log output

No response

Is this a regression?

Yes

Regression additional context

No response

Platforms

iOS

OS Version

16.1

Device

iPhone 14

Specific to simulators

No response

Additional context

No response

@afern247 afern247 changed the title Build Fails because of Build Fails because of AWSCognitoAuthPlugin Sep 12, 2023
@phantumcode phantumcode added auth Issues related to the Auth category build Issues related to build and CI/CD labels Sep 12, 2023
@atierian
Copy link
Member

atierian commented Sep 12, 2023

Thanks for reporting this @afern247.

Can you please check if deleting your DerivedData resolves this?

@atierian atierian self-assigned this Sep 12, 2023
@atierian atierian added the pending-community-response Issue is pending response from the issue requestor label Sep 12, 2023
@afern247
Copy link
Author

That's the first thing I tried, it didn't fix it :/ @atierian

@atierian
Copy link
Member

From the screenshot you provided, can you paste the build log message from above the "Command CompileSwift failed with a nonzero exit code" message?

267314516-ba68c422-3e50-4458-8d3f-645e53fe26fd-1

@atierian
Copy link
Member

I understand you already tried deleting DerivedData - have you tried deleting your SPM cache at ~/Library/Caches/org.swift.swiftpm?
(make sure to quit Xcode before doing so)

@afern247
Copy link
Author

afern247 commented Sep 13, 2023

Some notes:

  • On the simulator it fails with the mentioned error, but if I use a real device as simulator then it succeeds. However if I submit the release version to test flight it fails on a real device.

  • If I put it on Release on Run config. it fails, if I put it on debug it succeeds.
    image

  • Here's the log you asked for:
    log.txt

  • I clean up everything and the error persists.
    @atierian

@atierian
Copy link
Member

Do you have Thread Sanitizer (TSan) enabled in your Run scheme?
Based on the stack dump from the crash, it looks like that may be the case. It's also the only way I'm able to reproduce this.

0. Running pass 'Function Pass Manager' on module '.../Objects-normal-tsan/x86_64/ASFAppInfo.o'.

TSan can't be used when running on device. [Apple Docs]

Important

You can’t use Thread Sanitizer to diagnose iOS, tvOS, and watchOS apps running on a device. Use Thread Sanitizer only on your 64-bit macOS app, or to diagnose your 64-bit iOS, tvOS, or watchOS app running in Simulator.

It's my understanding that it only works in Debug builds on Simulator as well.

@afern247
Copy link
Author

Without the thread it seems to work, but I haven't pushed to the app store yet to fully test it, let's keep this open until my next release so I can provide confirmation.

right now these options are enabled:

image
@atierian

@atierian
Copy link
Member

Thanks for letting us know; I'm happy to hear it appears to be resolved.

We'll check back in a week or two if we haven't heard from you by then.

@atierian atierian added question General question closing soon This issue will be closed in 7 days unless further comments are made. labels Sep 18, 2023
@atierian
Copy link
Member

atierian commented Oct 9, 2023

Hey @afern247, just checking in - were you able to release?

@github-actions github-actions bot removed pending-community-response Issue is pending response from the issue requestor closing soon This issue will be closed in 7 days unless further comments are made. labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth category build Issues related to build and CI/CD question General question
Projects
None yet
Development

No branches or pull requests

3 participants