AppiumDriver getContextHandles() taking too long to return WEBVIEWs

I’m having trouble enumerating contexts with AppiumDriver’s getContextHandles() call. I can also repro through Appium Desktop Context Actions => Get All Contexts

The page used to return NATIVE and WEBVIEW contexts immediately after the page in the Hybrid iOS app was loaded. Now it’s taking 5-10+ minutes.

Has anyone else run into this issue before?

Here’s the Appium Desktop log from clicking Get All Contexts a couple times

The server is running
[RemoteDebugger] “WIRPageIdentifierKey”: 3
[RemoteDebugger] },
[RemoteDebugger] “18”: {
[RemoteDebugger] “WIRTitleKey”: “Food, Household & Pet | Costco”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 18
[RemoteDebugger] }
[RemoteDebugger] }
[XCUITest] Remote debugger notified us of a new page listing: {“appIdKey”:“39460”,“pageArray”:[{“id”:2,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:3,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:18,“title”:“Food, Household & Pet | Costco”,“url”:"{URL}",“isKey”:false}]}
[XCUITest] No key id found. Choosing first id from page array
[XCUITest] We do not appear to have window set yet, ignoring
[RemoteDebugger] Received page change notice for app ‘PID:39460’ but the listing has not changed. Ignoring.
[RemoteDebugger] Page changed: {
[RemoteDebugger] “2”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 2
[RemoteDebugger] },
[RemoteDebugger] “3”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 3
[RemoteDebugger] },
[RemoteDebugger] “18”: {
[RemoteDebugger] “WIRTitleKey”: “Food, Household & Pet | Costco”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 18
[RemoteDebugger] },
[RemoteDebugger] “219”: {
[RemoteDebugger] “WIRPageIdentifierKey”: 219,
[RemoteDebugger] “WIRTitleKey”: “JSContext”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeJavaScript”
[RemoteDebugger] }
[RemoteDebugger] }
[XCUITest] Remote debugger notified us of a new page listing: {“appIdKey”:“39460”,“pageArray”:[{“id”:2,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:3,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:18,“title”:“Food, Household & Pet | Costco”,“url”:"{URL}",“isKey”:false}]}
[XCUITest] No key id found. Choosing first id from page array
[XCUITest] We do not appear to have window set yet, ignoring
[RemoteDebugger] Received page change notice for app ‘PID:39460’ but the listing has not changed. Ignoring.
[RemoteDebugger] Page changed: {
[RemoteDebugger] “2”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 2
[RemoteDebugger] },
[RemoteDebugger] “3”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 3
[RemoteDebugger] },
[RemoteDebugger] “18”: {
[RemoteDebugger] “WIRTitleKey”: “Food, Household & Pet | Costco”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 18
[RemoteDebugger] }
[RemoteDebugger] }
[XCUITest] Remote debugger notified us of a new page listing: {“appIdKey”:“39460”,“pageArray”:[{“id”:2,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:3,“title”:“Welcome to Costco Wholesale”,“url”:"{URL}",“isKey”:false},{“id”:18,“title”:“Food, Household & Pet | Costco”,“url”:"{URL}",“isKey”:false}]}
[XCUITest] No key id found. Choosing first id from page array
[XCUITest] We do not appear to have window set yet, ignoring
[RemoteDebugger] Received page change notice for app ‘PID:39460’ but the listing has not changed. Ignoring.
[RemoteDebugger] Page changed: {
[RemoteDebugger] “2”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 2
[RemoteDebugger] },
[RemoteDebugger] “3”: {
[RemoteDebugger] “WIRTitleKey”: “Welcome to Costco Wholesale”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 3
[RemoteDebugger] },
[RemoteDebugger] “18”: {
[RemoteDebugger] “WIRTitleKey”: “Food, Household & Pet | Costco”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeWebPage”,
[RemoteDebugger] “WIRURLKey”: “{URL}”,
[RemoteDebugger] “WIRPageIdentifierKey”: 18
[RemoteDebugger] },
[RemoteDebugger] “220”: {
[RemoteDebugger] “WIRPageIdentifierKey”: 220,
[RemoteDebugger] “WIRTitleKey”: “JSContext”,
[RemoteDebugger] “WIRTypeKey”: “WIRTypeJavaScript”
[RemoteDebugger] }
[RemoteDebugger] }

And so on, over and over