Skip to content

[google_maps_flutter] XCUITests stuck when handling permission popups #93325

@stuartmorgan-g

Description

@stuartmorgan-g

Sometime in the last few days, while the flutter/plugins tree was red due to an out-of-band Android failures, we picked up an out-of-band iOS failure, also on master, in google_maps_flutter/google_maps_flutter's XCUITests:

2021-11-09 07:23:58.445405-0800 RunnerUITests-Runner[7419:57891] Attributes: Application, pid: 7423, label: 'google_maps_flutter_example'
Element subtree:
 →Application, 0x600000310460, pid: 7423, label: 'google_maps_flutter_example'
    Window (Main), 0x600000310700, {{0.0, 0.0}, {414.0, 896.0}}
      Other, 0x600000310620, {{0.0, 0.0}, {414.0, 896.0}}
        Other, 0x6000003107e0, {{0.0, 0.0}, {414.0, 896.0}}
Path to element:
 →Application, 0x600000310460, pid: 7423, label: 'google_maps_flutter_example'
Query chain:
 →Find: Target Application 'dev.flutter.plugins.googleMobileMapsExample'
  Output: {
    Application, pid: 7423, label: 'google_maps_flutter_example'
  }
/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/packages/google_maps_flutter/google_maps_flutter/example/ios/RunnerUITests/GoogleMapsUITests.m:56: error: -[GoogleMapsUITests testUserInterface] : failed - Failed due to not able to find platform view
    t =    36.36s Tear Down
Test Case '-[GoogleMapsUITests testUserInterface]' failed (36.570 seconds).

Example failure: https://api.cirrus-ci.com/v1/task/4519418760790016/logs/native_test.log

I can reproduce locally, and it appears that what's happening is that running with master, the handler added with addUIInterruptionMonitorWithDescription is never firing, so it get stuck at the permission prompt. Running exactly the same test with the same version of Xcode, etc. but on stable, the test works and the breakpoints that I set in that handler fire.

Looking at engine commits, flutter/engine#29531 seems suspicious based on timing and topic, but I don't have any specific evidence that it's the cause yet. (I don't have a remotely recent engine build, so it would take forever for me to verify locally.)

/cc @jmagman @cyanglaz

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions