-
-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Labels
Description
Flutter Driver Isolate Connection Error After App Reinstall on iOS
Problem Description
When running Flutter driver tests on iOS after performing app uninstall/install operations (fresh install simulation), the Flutter driver fails to establish proper isolate connection, resulting in Cannot read properties of undefined (reading 'isError')
error.
Steps to Reproduce
- Uninstall the app using
mobile: removeApp
command - Install the app using
installApp
command - Launch the app using
mobile: launchApp
command - Switch to Flutter context and attempt to run Flutter driver commands
- Execute any Flutter driver command (e.g.,
flutter:waitFor
)
Expected Behavior
Flutter driver should successfully connect to the app's isolate and execute commands without errors.
Actual Behavior
Flutter driver fails with isolate connection error:
2025-08-11T11:30:18.877Z WARN @wdio/appium-service: 2025-08-11 17:00:18:876 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
Environment
- Platform: iOS Simulator
- Device: iPhone 16 Pro, iOS 18.3
- Appium: v2.19.0
- Flutter Driver: appium-flutter-driver@2.18.1
Full Test Log
> test:onboardingSkipFlow
> wdio run ./wdio.conf.js --spec=./test/specs/core/onboardingSkipFlow.test.js
Execution of 1 workers started at 2025-08-11T11:28:25.566Z
(node:86566) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/wdio.conf.js is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
2025-08-11T11:28:25.582Z INFO @wdio/cli:launcher: Run onPrepare hook
2025-08-11T11:28:25.588Z INFO @wdio/appium-service: Will spawn Appium process: appium --base-path / --relaxed-security --allow-cors --allow-insecure ["chromedriver_autodownload"] --deny-insecure [] --session-override --debug-log-spacing --log-timestamp --local-timezone --port 63484
2025-08-11T11:28:39.937Z INFO @wdio/appium-service: Appium started with ID: 86599
2025-08-11T11:28:39.937Z INFO @wdio/appium-service: Appium logs written to stdout
2025-08-11T11:28:39.938Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2025-08-11T11:28:39.938Z INFO @wdio/local-runner: Start worker 0-0 with arg: run ./wdio.conf.js --spec=./test/specs/core/onboardingSkipFlow.test.js
[0-0] 2025-08-11T11:28:40.923Z INFO @wdio/local-runner: Run worker command: run
[0-0] (node:86621) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/wdio.conf.js is not specified and it doesn't parse as CommonJS.
[0-0] Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
[0-0] To eliminate this warning, add "type": "module" to /Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/package.json.
[0-0] (Use `node --trace-warnings ...` to show where the warning was created)
[0-0] 🚀 Starting test session...
[0-0] RUNNING in iOS - file:///test/specs/core/onboardingSkipFlow.test.js
[0-0] 2025-08-11T11:28:41.268Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2025-08-11T11:28:41.269Z INFO @wdio/utils: Connecting to existing driver at http://127.0.0.1:63484/
[0-0] 2025-08-11T11:28:41.282Z INFO webdriver: [POST] http://127.0.0.1:63484/session
[0-0] 2025-08-11T11:29:03.314Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:29:03.315Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:29:03.315Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:29:14.988Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:29:14.990Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:29:14.990Z INFO webdriver: COMMAND switchAppiumContext("NATIVE_APP")
[0-0] 2025-08-11T11:29:14.991Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:29:14.991Z INFO webdriver: DATA { name: 'NATIVE_APP' }
[0-0] 2025-08-11T11:29:15.002Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:15.003Z INFO webdriver: COMMAND executeScript("mobile: removeApp", <object>)
[0-0] 2025-08-11T11:29:15.004Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:29:15.004Z INFO webdriver: DATA {
[0-0] script: 'mobile: removeApp',
[0-0] args: [ { bundleId: 'nz.co.mobile.app.xyz.dev' } ]
[0-0] }
[0-0] 2025-08-11T11:29:15.458Z INFO webdriver: RESULT true
[0-0] 2025-08-11T11:29:16.461Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:29:16.461Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:29:16.462Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:29:26.042Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:29:26.043Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:29:26.043Z INFO webdriver: COMMAND switchAppiumContext("NATIVE_APP")
[0-0] 2025-08-11T11:29:26.044Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:29:26.044Z INFO webdriver: DATA { name: 'NATIVE_APP' }
[0-0] 2025-08-11T11:29:26.052Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:26.055Z INFO webdriver: COMMAND installApp("/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/build/ios/iphonesimulator/Runner.app")
[0-0] 2025-08-11T11:29:26.055Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/appium/device/install_app
[0-0] 2025-08-11T11:29:26.055Z INFO webdriver: DATA {
[0-0] appPath: '/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/build/ios/iphonesimulator/Runner.app'
[0-0] }
[0-0] 2025-08-11T11:29:28.151Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:28.151Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:29:28.151Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:29:28.152Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:29:37.736Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:29:37.738Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:29:37.738Z INFO webdriver: COMMAND switchAppiumContext("FLUTTER")
[0-0] 2025-08-11T11:29:37.740Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:29:37.740Z INFO webdriver: DATA { name: 'FLUTTER' }
[0-0] 2025-08-11T11:29:37.753Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:39.755Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:29:39.755Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:29:39.756Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:29:50.198Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:29:50.201Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:29:50.201Z INFO webdriver: COMMAND switchAppiumContext("NATIVE_APP")
[0-0] 2025-08-11T11:29:50.203Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:29:50.203Z INFO webdriver: DATA { name: 'NATIVE_APP' }
[0-0] 2025-08-11T11:29:50.211Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:50.215Z INFO webdriver: COMMAND executeScript("mobile: launchApp", <object>)
[0-0] 2025-08-11T11:29:50.217Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:29:50.217Z INFO webdriver: DATA {
[0-0] script: 'mobile: launchApp',
[0-0] args: [ { bundleId: 'nz.co.mobile.app.xyz.dev' } ]
[0-0] }
[0-0] 2025-08-11T11:29:54.629Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:29:54.631Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:29:54.631Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:29:54.635Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:30:04.228Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:30:04.229Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:30:04.229Z INFO webdriver: COMMAND switchAppiumContext("FLUTTER")
[0-0] 2025-08-11T11:30:04.230Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:30:04.231Z INFO webdriver: DATA { name: 'FLUTTER' }
[0-0] 2025-08-11T11:30:04.239Z INFO webdriver: RESULT null
[0-0] 🧪 Starting test: should skip onboarding and handle notification prompt with warm/cold restarts
[0-0] 2025-08-11T11:30:09.266Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:30:09.266Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:30:09.267Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:30:18.849Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:30:18.849Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:30:18.849Z INFO webdriver: COMMAND switchAppiumContext("FLUTTER")
[0-0] 2025-08-11T11:30:18.850Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:30:18.850Z INFO webdriver: DATA { name: 'FLUTTER' }
[0-0] 2025-08-11T11:30:18.855Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:30:18.857Z INFO webdriver: COMMAND executeScript("flutter:waitFor", <object>)
[0-0] 2025-08-11T11:30:18.857Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:18.857Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:18.877Z WARN @wdio/appium-service: 2025-08-11 17:00:18:876 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:18.909Z WARN webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] 2025-08-11T11:30:18.909Z INFO webdriver: Retrying 1/2
[0-0] 2025-08-11T11:30:18.909Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:18.909Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:18.911Z WARN @wdio/appium-service: 2025-08-11 17:00:18:911 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:19.414Z WARN webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] 2025-08-11T11:30:19.414Z INFO webdriver: Retrying 2/2
[0-0] 2025-08-11T11:30:19.415Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:19.415Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:19.421Z WARN @wdio/appium-service: 2025-08-11 17:00:19:420 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:19.423Z ERROR webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] [ERROR] [DriverHelpers] waitFor failed: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" null {}
[0-0] [ERROR] [onboardingPage] ❌ Failed to find welcome overlay elements: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" null {}
[0-0] [ERROR] [AssertionHelper] Welcome overlay visibility assertion failed: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" {}
[0-0] [ERROR] Failed to capture screenshot: directory (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/screenshots) doesn't exist {}
[0-0] ❌ Test failed: should skip onboarding and handle notification prompt with warm/cold restarts - WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] 🧪 Starting test: should skip onboarding and handle notification prompt with warm/cold restarts
[0-0] 2025-08-11T11:30:21.457Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:30:21.457Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:30:21.458Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:30:31.048Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:30:31.049Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:30:31.050Z INFO webdriver: COMMAND switchAppiumContext("FLUTTER")
[0-0] 2025-08-11T11:30:31.051Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:30:31.051Z INFO webdriver: DATA { name: 'FLUTTER' }
[0-0] 2025-08-11T11:30:31.057Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:30:31.058Z INFO webdriver: COMMAND executeScript("flutter:waitFor", <object>)
[0-0] 2025-08-11T11:30:31.058Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:31.058Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:31.063Z WARN @wdio/appium-service: 2025-08-11 17:00:31:063 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:31.067Z WARN webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] 2025-08-11T11:30:31.067Z INFO webdriver: Retrying 1/2
[0-0] 2025-08-11T11:30:31.067Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:31.067Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:31.069Z WARN @wdio/appium-service: 2025-08-11 17:00:31:069 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:31.571Z WARN webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] 2025-08-11T11:30:31.572Z INFO webdriver: Retrying 2/2
[0-0] 2025-08-11T11:30:31.572Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:31.572Z INFO webdriver: DATA {
[0-0] script: 'flutter:waitFor',
[0-0] args: [
[0-0] 'eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoib25ib2FyZGluZ19sb2dvIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0',
[0-0] 5000
[0-0] ]
[0-0] }
2025-08-11T11:30:31.578Z WARN @wdio/appium-service: 2025-08-11 17:00:31:578 - [b36f2864][FlutterDriver@b562] Error: {}
at IsolateSocket.socket.call (/Users/kishantalekar/.appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:68:39)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
[0-0] 2025-08-11T11:30:31.584Z ERROR webdriver: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] [ERROR] [DriverHelpers] waitFor failed: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" null {}
[0-0] [ERROR] [onboardingPage] ❌ Failed to find welcome overlay elements: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" null {}
[0-0] [ERROR] [AssertionHelper] Welcome overlay visibility assertion failed: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor" {}
[0-0] [ERROR] Failed to capture screenshot: directory (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/screenshots) doesn't exist {}
[0-0] ❌ Test failed: should skip onboarding and handle notification prompt with warm/cold restarts - WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[0-0] unknown error in "⏩ Onboarding Skip Flow - Quick User Journey.📱 Skip Onboarding Journey with App State Testing.should skip onboarding and handle notification prompt with warm/cold restarts"
unknown error: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
at async DriverHelpers.waitFor (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/helpers/driver.helper.js:75:7)
at async OnboardingPage.waitForWelcomeOverlay (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/pages/onboarding.page.js:115:7)
at async AssertionsHelper.assertWelcomeOverlayVisible (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/helpers/assertions.helper.js:29:7)
at async Context.<anonymous> (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/specs/core/onboardingSkipFlow.test.js:56:7)
[0-0] [INFO] [OnboardingSkipFlow] 🧹 Cleaning up Onboarding Skip Flow Test Suite {}
[0-0] 2025-08-11T11:30:31.590Z INFO webdriver: The standard Appium `contexts` method is used. If you want to get more detailed data, you can set `returnDetailedContexts` to `true`.
[0-0] 2025-08-11T11:30:31.590Z INFO webdriver: COMMAND getAppiumContexts()
[0-0] 2025-08-11T11:30:31.590Z INFO webdriver: [GET] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/contexts
[0-0] 2025-08-11T11:30:41.159Z INFO webdriver: RESULT [ 'NATIVE_APP', 'FLUTTER' ]
[0-0] 2025-08-11T11:30:41.161Z INFO webdriver: The standard Appium `context`-method is used. If you want to switch to a webview with a specific title or url, please provide an object with the `title` or `url` property. See https://webdriver.io/docs/api/mobile/switchContext for more information.
[0-0] 2025-08-11T11:30:41.161Z INFO webdriver: COMMAND switchAppiumContext("NATIVE_APP")
[0-0] 2025-08-11T11:30:41.161Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/context
[0-0] 2025-08-11T11:30:41.161Z INFO webdriver: DATA { name: 'NATIVE_APP' }
[0-0] 2025-08-11T11:30:41.166Z INFO webdriver: RESULT null
[0-0] 2025-08-11T11:30:41.166Z INFO webdriver: COMMAND executeScript("mobile: removeApp", <object>)
[0-0] 2025-08-11T11:30:41.166Z INFO webdriver: [POST] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0/execute/sync
[0-0] 2025-08-11T11:30:41.166Z INFO webdriver: DATA {
[0-0] script: 'mobile: removeApp',
[0-0] args: [ { bundleId: 'nz.co.mobile.app.xyz.dev' } ]
[0-0] }
[0-0] 2025-08-11T11:30:41.720Z INFO webdriver: RESULT true
[0-0] 2025-08-11T11:30:41.728Z INFO webdriver: COMMAND deleteSession()
[0-0] 2025-08-11T11:30:41.729Z INFO webdriver: [DELETE] http://127.0.0.1:63484/session/b36f2864-09ef-401e-ae22-73e8accde8e0
2025-08-11T11:30:41.900Z WARN @wdio/appium-service: 2025-08-11 17:00:41:900 - [cf5c1714][Xcode] xcodebuild exited with code 'null' and signal 'SIGTERM'
[0-0] 2025-08-11T11:30:42.094Z INFO webdriver: RESULT null
[0-0] 🏁 Test session completed
[0-0] 2025-08-11T11:30:42.199Z INFO @wdio/local-runner: Received SIGINT, giving process 5000ms to shutdown gracefully
[0-0] FAILED in iOS - file:///test/specs/core/onboardingSkipFlow.test.js
2025-08-11T11:30:42.228Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
## "spec" Reporter:
[Runner.app iOS #0-0] Running: Runner.app on iOS
[Runner.app iOS #0-0] Session ID: b36f2864-09ef-401e-ae22-73e8accde8e0
[Runner.app iOS #0-0]
[Runner.app iOS #0-0] » test/specs/core/onboardingSkipFlow.test.js
[Runner.app iOS #0-0] ⏩ Onboarding Skip Flow - Quick User Journey
[Runner.app iOS #0-0] 📱 Skip Onboarding Journey with App State Testing
[Runner.app iOS #0-0] ✖ should skip onboarding and handle notification prompt with warm/cold restarts (1x retries)
[Runner.app iOS #0-0]
[Runner.app iOS #0-0] 1 failing (1m 38.7s)
[Runner.app iOS #0-0]
[Runner.app iOS #0-0] 1) 📱 Skip Onboarding Journey with App State Testing should skip onboarding and handle notification prompt with warm/cold restarts
[Runner.app iOS #0-0] WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[Runner.app iOS #0-0] unknown error: WebDriverError: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of undefined (reading 'isError') when running "execute/sync" with method "POST" and args "flutter:waitFor"
[Runner.app iOS #0-0] at async DriverHelpers.waitFor (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/helpers/driver.helper.js:75:7)
[Runner.app iOS #0-0] at async OnboardingPage.waitForWelcomeOverlay (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/pages/onboarding.page.js:115:7)
[Runner.app iOS #0-0] at async AssertionsHelper.assertWelcomeOverlayVisible (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/helpers/assertions.helper.js:29:7)
[Runner.app iOS #0-0] at async Context.<anonymous> (/Users/kishantalekar/Desktop/WORK_TW/x-xyz-refactor/appium/test/specs/core/onboardingSkipFlow.test.js:56:7)
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:02:16
2025-08-11T11:30:42.229Z INFO @wdio/local-runner: Shutting down spawned worker
2025-08-11T11:30:42.481Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2025-08-11T11:30:42.481Z INFO @wdio/local-runner: shutting down
2025-08-11T11:30:42.481Z INFO @wdio/cli:launcher: Run onComplete hook
2025-08-11T11:30:42.481Z INFO @wdio/appium-service: Killing entire Appium tree
2025-08-11T11:30:42.515Z INFO @wdio/appium-service: Process and its children successfully terminated