Skip to content

Xcode automation permissions fail to update sometimes #139693

@vashworth

Description

@vashworth

Is there an existing issue for this?

Type of Request

bug

Infrastructure Environment

LUCI

What is happening?

Occasionally, TCC db fails to get updated and therefore xcode debug tests hang:
https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_gallery_ios__start_up_xcode_debug/1689/overview
https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_gallery_ios__start_up_xcode_debug/1397/overview
https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20integration_ui_ios_driver_xcode_debug/1674/overview
https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20integration_ui_ios_driver_xcode_debug/1559/overview
https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20microbenchmarks_ios_xcode_debug/914/overview


Let's examine the following failure as an example: https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_gallery_ios__start_up_xcode_debug/1689/overview.

In step 22.2.8, an Applescript is executed and in 22.2.9 the dialog is killed - these steps should automatically create an entry for Xcode in the TCC.db. However, in step 22.2.10, there is no entry in the db. Following, step 22.2.11 doesn't really do anything. As a result, the permission was not added to TCC.db which will cause the test to time out due to it waiting for permissions.

I think solution is to retry steps 22.2.8-22.2.10 until there is an entry in the db. It's most likely that 22.2.8 does not have a long enough timeout, so we'll want to try again with a longer timeout.


In a different situation, sometimes interacting with the TCC db can fail if the system is in the process of accessing/updating it. So we should add retries for every interaction (select/update) with the db.

https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20integration_ui_ios_driver_xcode_debug/483/overview

Steps to reproduce

No response

Expected results

No response

Metadata

Metadata

Assignees

Labels

team-infraOwned by Infrastructure team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions