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

call to main actor-isolated global function 'setupSnapshot(_:waitForAnimations:)' in a synchronous nonisolated context #22012

Closed
4 tasks done
pedro380085 opened this issue May 9, 2024 · 2 comments

Comments

@pedro380085
Copy link

pedro380085 commented May 9, 2024

New Issue Checklist

Issue Description

Using my Snapfile does not yield screenshots due to UITests.swift not working.

Command executed
Complete output when running fastlane, including the stack trace and command used
❌  /UITests/UITests.swift:36:9: call to main actor-isolated global function 'setupSnapshot(_:waitForAnimations:)' in a synchronous nonisolated context
    setupSnapshot(app)
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

❌ /UITests/UITests.swift:41:9: call to main actor-isolated global function 'snapshot(_:waitForLoadingIndicator:)' in a synchronous nonisolated context

    snapshot("0-LandingScreen", waitForLoadingIndicator: false);
     ^

❌ /UITests/UITests.swift:46:9: call to main actor-isolated global function 'snapshot(_:waitForLoadingIndicator:)' in a synchronous nonisolated context

    snapshot("1-LandingScreen", waitForLoadingIndicator: false);
     ^

❌ /UITests/UITests.swift:51:9: call to main actor-isolated global function 'snapshot(_:waitForLoadingIndicator:)' in a synchronous nonisolated context

    snapshot("2-LandingScreen", waitForLoadingIndicator: false);
     ^

Environment

 fastlane installation at path:
/opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.220.0/bin/fastlane
-----------------------------
[✔] 🚀 
fastlane 2.220.0
 
@pedro380085
Copy link
Author

I get this issue on all runs since upgrading to Xcode 15.3.

@pedro380085
Copy link
Author

It was an issue with my UITests.swift file, I added @MainActor to my testExample function and it worked.

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

1 participant