call to main actor-isolated global function 'setupSnapshot(_:waitForAnimations:)' in a synchronous nonisolated context
pedro380085 opened this issue · 2 comments
pedro380085 commented
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
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 contextsetupSnapshot(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 commented
I get this issue on all runs since upgrading to Xcode 15.3.
pedro380085 commented
It was an issue with my UITests.swift
file, I added @MainActor
to my testExample function and it worked.