google / EarlGrey

:tea: iOS UI Automation Test Framework
http://google.github.io/EarlGrey/
Apache License 2.0
5.61k stars 740 forks source link

iOS 15 Cocoapods installation crashes upon start (2.2.1) #1647

Open whoyawn opened 2 years ago

whoyawn commented 2 years ago

Opened up a new project, installed EarlGrey2 via Cocoapods, tried running UI tests, crashed and got this error message:

Failed to get automation session for com.huyanh.ios15crashes:50763: Timed out waiting for target to check in.

Podfile

platform :ios, '13.0'
use_frameworks!
inhibit_all_warnings!

source 'https://github.com/cocoapods/specs.git'

target 'ios15crashes (iOS)' do
  pod 'EarlGreyApp'
end
target 'Tests iOS' do
  pod 'EarlGreyTest'
end

Nothing special was in UI tests:

import XCTest

class Tests_iOS: XCTestCase {

    override func setUpWithError() throws {
        // Put setup code here. This method is called before the invocation of each test method in the class.

        // In UI tests it is usually best to stop immediately when a failure occurs.
        continueAfterFailure = false

        // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
    }

    override func tearDownWithError() throws {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testExample() throws {
        // UI tests must launch the application that they test.
        let app = XCUIApplication()
        app.launch()

        // Use recording to get started writing UI tests.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
        XCTAssert(true)
    }

}
whoyawn commented 2 years ago

Any updates on this? This makes the entire thing unusuable on iOS 15.

tirodkar commented 2 years ago

Ignore any previous comment from me - we would need to do a new release of EarlGrey to cover Xcode 13. Support is fully present in building from source where we generally prioritize.

XavierDK commented 2 years ago

Hello, do you have any news or estimated date for the cocoapods release please?

RajaveluC commented 2 years ago

Hi @tirodkar , Can you please give us an estimated date for a new release to support Xcode 13?

ushasanaga commented 2 years ago

Hi @tirodkar could you provide an update here on the ETA for a new release to support XCode 13 while building via cocoapods? We are at a risk for our upcoming release due to this. Would appreciate your response here. Thanks

tirodkar commented 2 years ago

Hey folks,

I am checking with the rest of the team for the estimated delivery of iOS 15 CocoaPods support. Here is what you can try right now - you can build the AppFramework and TestLib components at HEAD for your architectures and then point your CocoaPods to use the local development path.

Also works for https://github.com/google/EarlGrey/issues/1676.

I'll let everyone know the ETA once I hear back from the rest of the team. Thanks.

RajaveluC commented 2 years ago

Hi @tirodkar , I tried to build the AppFramework and TestLib from the source code and it is still crashing in the same place.

Crash details: /EarlGrey/TestLib/EarlGreyImpl/XCUIApplication+GREYTest.m: test failure: Failed to get automation session for com.xxxx.xxx:80023: Timed out while requesting automation session for com.xxxx.xxx (pid:80023).

npamidisf commented 2 years ago

Hi @tirodkar, any update on when can we see a new release for cocoapods with XCode 13 support? we are like others here are blocked due to this and don't have the luxury to build it via source ....

sergius-la commented 2 years ago

@tirodkar

Please add details how to use local builds of AppFramework and TestLib with CocoaPods.