Appium 4 Migration: What Breaks and How to Fix It
Appium 4.0 drops --allow-cors, Node 20 and Windows driver support, and old drivers block updates. The Appium 4 migration order, with the fix for each failure.
Appium 4.0.0 shipped on November 15, 2026 (news brief), and npm's latest tag points at it, so an unpinned npm install -g appium gets Appium 4. The server still starts with Appium 3 drivers and only warns, and appium driver update stops at the driver's major and exits 0. What stops the upgrade comes before any test runs: Node, server flags and drivers. Every Appium 3 driver must go before the first Appium 4 driver installs: appium setup reset does that for a global install, a step Appium's migration guide marks optional, and one package.json change does it for a project. Testland ran the upgrade on November 22, 2026, on Node.js 22.23.5 without a device, so no test session ran.
Table of contents
The run took a project install and a global-style one (drivers in APPIUM_HOME, the folder where a global install keeps its drivers and plugins, ~/.appium by default) from Appium 3.9.1 to 4.0.0, covering installs, driver and plugin management and server startup. The post assumes Appium 3.x from npm, any of the UiAutomator2, XCUITest, Espresso, Mac2, Windows or Flutter drivers, and any client; examples use WebdriverIO and Python.
Upgrade Appium 3 to Appium 4 in this order
Each step clears the failure that would stop the next one.
Tested on fixture files:
grep -rnE --exclude-dir=node_modules '(allow-cors|allowCors|nodeconfig|callback-(address|port)|callback(Address|Port)|debug-log-spacing|debugLogSpacing|strict-caps|strictCaps|trace-dir|traceDir|eventTimings)' .It skips node_modules and ignores the new --allow-insecure form. Check for --shell, -ca and -cp by hand: they are too short to grep safely.
Node.js 22.22.2 is the floor, and Appium checks it at startup
Appium 4.0.0 requires Node.js ^22.22.2 || ^24.15.0 || >=26.0.0 and drops Node 20, per the migration guide. The 4.0.0 source checks the running Node against that range before the server starts; outside it, Appium logs "Node version must be at least ..." and exits 1. So Node 23, 24.0 to 24.14 and 25 fail as well as Node 20 (from the source, not run). The Appium 4 drivers below declare the same range.
WebdriverIO projects take a higher floor: @wdio/appium-service 10.2.0 (current on November 22, 2026) declares >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1. In CI, pick a node-version inside both ranges, set with actions/setup-node@v7 as in running automated tests in GitHub Actions.
Move Windows tests to WinCore and keep Flutter on Appium 3
Step 2 comes before the install, because the Windows driver has no Appium 4 version.
Migrate Windows driver tests before installing Appium 4
Per the guide, Appium 4 "is no longer compatible with the Windows driver" because the driver "cannot support the standard W3C WebDriver protocol". On 4.0.0, appium driver install windows fails with "Could not resolve driver", and the npm package is refused for its ^3.0.0-rc.2 server requirement.
The guide's commands for Appium 3 install WinCore 3 by package name, because the wincore shortcut is new in 4.0.0 (CHANGELOG):
# still on Appium 3
appium driver install --source=npm appium-wincore-driver@3
# port the Windows tests to WinCore, then:
appium driver uninstall windowsThe guide's last step, appium driver update wincore --unsafe after the upgrade, is the kind of cross-major update npm refused in Testland's run while other Appium 3 drivers remained: appium driver update uiautomator2 --unsafe and appium driver install wincore both stopped on ERESOLVE, npm's error for two packages that need different versions of one peer dependency. So move WinCore with the other drivers, as in Why appium driver update fails, and how to replace the drivers.
Flutter drivers have no Appium 4 release yet
As of November 22, 2026, appium-flutter-integration-driver 2.0.3 and appium-flutter-driver 4.1.0 declare appium ^3.0.0 as a peer. On 4.0.0, installing either with --source=npm is refused for that server requirement, and neither is in Appium 4's known-driver list. Keep those suites on appium@3.9.1, the last 3.x release (November 14, 2026), pinned in CI.
Removed server flags now stop Appium 4 at startup
After the install, the start command fails first: a removed flag exits 1 before the server listens. In the run, npx appium --allow-cors printed [ERROR] Unrecognized arguments: --allow-cors and exited 1, as did --nodeconfig, --shell, --strict-caps and --callback-port. The guide adds --callback-address (-ca), -cp, --debug-log-spacing and --trace-dir. A config file with "allow-cors": true fails with "allow-cors is not expected to be here!". Grid 3 support left with --nodeconfig, so Grid users register through the Grid 4 relay.
Replace --allow-cors with the cors insecure feature
Per the CHANGELOG, the flag becomes --allow-insecure=*:cors; per the guide, cors is now an insecure feature (off until enabled), and the *: prefix applies it to all drivers. A bare --allow-insecure=cors exits 1 with "The full feature name must include both the destination automation name or the '*' wildcard ...". --relaxed-security works too, but the run logged "Enabling relaxed security. All insecure features will be enabled unless explicitly disabled by --deny-insecure", so --allow-insecure='*:cors' is the narrow replacement:
# Appium 3
appium --allow-cors
# Appium 4
appium --allow-insecure='*:cors'In a config file (the file passed with --config), the value is an array; the string form fails with "type must be array". This one started the server:
{
"server": {
"allow-insecure": ["*:cors"]
}
}The trap: --allow-unknown-args lets npx appium --allow-cors start but drops the flag, so a POST /session with an Origin header still got 403, the status a default server returns with "Browser-origin requests are not allowed". With the Inspector plugin and no cors feature, even the server's own origin got 403.
WebdriverIO args still pass the removed flags
@wdio/appium-service 10.2.0 turns each args key into a kebab-case flag and passes a string value as the next argument (source). So allowCors: true becomes --allow-cors, and the service reports "Appium exited before timeout (exit code: 1)". The debugLogSpacing: true example in the service docs is a removed flag too.
Through the service's launcher in the run, allowInsecure: '*:cors' was spawned as --allow-insecure *:cors, the server started, and an Origin request wasn't blocked. relaxedSecurity: true also started it, but it spawns --relaxed-security, which enables every insecure feature, so allowInsecure: '*:cors' stays the narrow choice. The two lines below are a before and after of the services entry in wdio.conf.ts, not one runnable object:
// Appium 3
services: [['appium', { args: { allowCors: true } }]],
// Appium 4
services: [['appium', { args: { allowInsecure: '*:cors', logLevel: 'debug' } }]],The service's Inspector CLI, npx start-appium-inspector, always appends --allow-cors (cli.ts) and fails on 4.0.0. With --allow-unknown-args --allow-insecure='*:cors' added, it started: the first flag only lets the server skip the appended one.
Add --log-level debug if CI keeps Appium logs
The default log level is now info. For one GET /status, the default level logged only the [HTTP] --> and <-- lines; the per-command Calling AppiumDriver.getStatus() with args and Responding to client with ... lines appeared only with --log-level debug. If you attach Appium logs to failed tests, add --log-level debug to the start command, or logLevel: 'debug' to the WebdriverIO args.
Appium 3 drivers still load on Appium 4, with a warning
In the run's project install, npm install appium@4.0.0 exited 0 with ERESOLVE warnings only, leaving the Appium 3 UiAutomator2, XCUITest and Windows drivers in place. The server started, listed all three and printed, per driver: "may be incompatible with the current version of Appium (v4.0.0) due to its peer dependency on Appium ^3.0.0-rc.2. Please install a compatible version of the driver." GET /status returned 200, so a health check passes on the wrong driver majors.
Every driver in Appium 4's own appium driver list has an Appium 4 release; the Windows and Flutter drivers don't. On a fresh Appium 4.0.0, appium driver install picked these versions, as of November 22, 2026 (npm registry):
| Driver | Last Appium 3 release | Appium 4 version installed on November 22, 2026 |
|---|---|---|
| UiAutomator2 | 8.7.3 (October 28, 2026) | 10.0.0 (first Appium 4 major: 9.0.0) |
| XCUITest | 12.22.8 (October 31, 2026) | 13.6.1 (first: 13.0.0) |
| Espresso | 9.3.13 (November 4, 2026) | 11.0.0 (first: 10.0.0) |
| Mac2 | 4.6.1 (November 6, 2026) | 5.0.7 (first: 5.0.0) |
| Windows | 6.3.1 (October 8, 2026) | None: WinCore 4.1.3 replaces it |
| Flutter (integration / classic) | 2.0.3 (October 17, 2025) / 4.1.0 (October 19, 2026) | None yet: install fails |
Why appium driver update fails, and how to replace the drivers
With two or more Appium 3 drivers installed, updating them one at a time can't succeed: npm refuses the new driver because the remaining old ones still require appium@^3, and appium driver update exits 0 anyway, so a CI step stays green. Check appium driver list --installed, not the exit code.
Without --unsafe, which lets update cross a major version, it stops at the major boundary, as the extensions CLI docs say: "By default, Appium will only update minor and patch versions". Trimmed output from the global-style run, with ... marking cut lines (both commands exited 0):
$ appium driver update uiautomator2
✖ - 'uiautomator2' failed to update: Error: ✖ The driver 'uiautomator2' has a major revision update (8.7.3 => 10.0.0), which could include breaking changes. If you want to apply this update, re-run with --unsafe
$ appium driver update uiautomator2 --unsafe
ℹ Updating driver 'uiautomator2' from 8.7.3 to 10.0.0
...
npm error code ERESOLVE
...
npm error Conflicting peer dependency: appium@3.9.1
npm error peer appium@"^3.0.0-rc.2" from appium-xcuitest-driver@12.22.8Global installs: reset, then reinstall pinned versions
appium setup reset removes every driver and plugin and the manifest (extensions.yaml, Appium's list of installed drivers and plugins): per the setup docs, it "Uninstalls all installed extensions, along with their manifest files, from the Appium home directory." In the run, it removed the Inspector plugin with both drivers, so reinstall every plugin too.
Then pin each one: the install spec takes an "optional npm version or tag modifier". In the run, mac2@5.0.0 stayed at 5.0.0 while 5.0.7 was the latest, mac2@4.6.1, an Appium 3 version, was refused with exit 1, and wincore@4.1.3 installed on a fresh Appium 4.0.0 APPIUM_HOME. Every line below ran, with versions current on November 22, 2026:
appium setup reset
appium driver install uiautomator2@10.0.0
appium driver install xcuitest@13.6.1
appium driver install wincore@4.1.3 # Windows suites only
appium plugin install inspector@2026.11.6
appium driver list --installedProject installs: change package.json in one step
Reset fails here: in the project install it stopped at the first driver on the same ERESOLVE, exited 1 and removed nothing. What worked after npm install appium@4.0.0: every driver set to its Appium 4 version in package.json, then one npm install, which exited 0 with no ERESOLVE line and left uiautomator2@10.0.0 and xcuitest@13.6.1 installed. An exact 10.0.0 pins, while ^10.0.0 takes new minor releases, per npm's package.json docs and node-semver's caret ranges.
npm pkg set devDependencies.appium-uiautomator2-driver=10.0.0 devDependencies.appium-xcuitest-driver=13.6.1
npm installAs run, the block covers only UiAutomator2 and XCUITest. Set every other driver in the same npm pkg set, including WinCore from step 2 (devDependencies.appium-wincore-driver=4.1.3) and Espresso or Mac2 where present.
If the Windows driver is still in package.json, uninstalling it first fails on ERESOLVE too. Run npm pkg delete devDependencies.appium-windows-driver before the block and npx appium driver uninstall windows after it, which exits 0; Testland ran all four commands in that order. The uninstall drops a stale manifest entry that still listed windows@6.3.1 after its package was gone.
Install scripts: drop --drivers= and read stdout
Per the CHANGELOG, npm install -g appium --drivers=... --plugins=... "no longer installs extensions automatically". In the run, npm install appium@4.0.0 --drivers=uiautomator2 in a project exited 0 with no warning and installed no driver. A server without drivers still starts and logs "No drivers have been installed in ...", and the first session request then fails with "session not created".
Per the guide and the CHANGELOG, Appium 4 moves the info, ok and warn messages of appium driver, plugin and setup to stdout. In the run, the "Driver ... successfully installed" line was on stdout, so a script that reads it reads stdout. Progress spinners and the reset's "Successfully deleted driver manifest" lines stayed on stderr.
Test code changes once the drivers are on Appium 4
Step 6's list is from the guide and the driver changelogs; the run saw only the capability check.
Standard capability names are case-sensitive and appium:eventTimings is gone
Per the guide, standard capability names "must now be case-sensitive": in the run, PlatformName got a 400 with "All non-standard capabilities should have a vendor prefix ...". Remove appium:eventTimings and read event timings with the getLogEvents command. The guide's Behavior Fixes section lists the remaining edge cases.
Client calls that hit the removed endpoints
Appium 4 removed GET /session/:sessionId, /location, /network_connection and the IME endpoints, most of them moved into drivers. In the source of Appium-Python-Client 6.1.8 (latest on PyPI on November 22, 2026), driver.events reads GET /session/$sessionId and returns {} with a warning if that fails; use driver.get_events(). driver.location calls GET /session/$sessionId/location, which only XCUITest still serves, per the guide; on UiAutomator2 or Espresso, use mobile: getGeolocation. For other clients, the guide says to check the client's documentation.
The snippet assumes an open session in driver; the call form is from the UiAutomator2 execute methods docs:
# Appium 3
events = driver.events
location = driver.location
# Appium 4, UiAutomator2 or Espresso
events = driver.get_events()
location = driver.execute_script('mobile: getGeolocation')XCUITest 13, UiAutomator2 10 and Espresso 11 changes to check
Per the XCUITest changelog, 13.0.0 removed launchApp and closeApp (use mobile: launchApp and mobile: terminateApp), and execute now uses the client's script timeout: "A client that sends 0, or a value shorter than its scripts, now gets script timeout." UiAutomator2 10.0.0 and Espresso 11.0.0 (November 22, 2026) reject unlisted ChromeDriver executables unless the chromedriver_allow_any_executable feature is on: --allow-insecure=uiautomator2:chromedriver_allow_any_executable for UiAutomator2, per the UiAutomator2 docs.
Appium 4 migration questions
Does WebdriverIO 10 work with Appium 4?
The service's own checks accept it, while its docs haven't caught up. @wdio/appium-service 10.2.0 declares appium >=3 as a peer, and the launcher in its published build/index.js refuses only majors below MIN_APPIUM_MAJOR = 3. The docs still say "WebdriverIO 10 requires Appium 3" and don't mention Appium 4. What changes is the args map, covered in Removed server flags now stop Appium 4 at startup. No WebdriverIO session ran.
Can a team delay the Appium 4 migration?
Yes: appium@3.9.1 is the last 3.x release. On 3.9.1, appium driver install falls back to the newest driver version that still supports Appium 3, with "Will look for an older, compatible version", so a fresh Appium 3.9.1 install still gets Appium 3 drivers. Pin appium@3.9.1 in package.json or CI, because an unpinned install gets 4.0.0.
Does an Appium 4 migration mean rewriting tests?
Per the guide, the endpoint cleanup is "much smaller (12 removed endpoints total, compared to 98 for Appium 3)", though the wider changes include "closer alignment to W3C WebDriver protocol requirements". The changes test code meets are in Test code changes once the drivers are on Appium 4 and the guide's Behavior Fixes list. Testland's run started no session, so it doesn't measure this.
How do you keep CI on pinned driver versions?
Pin exact versions, minding two traps the run found. On an APPIUM_HOME that already has the driver, a pinned appium driver install uiautomator2@10.0.0 exits 1 with "A driver named "uiautomator2" is already installed", and appium driver update mac2 moved a pinned 5.0.0 to 5.0.7. So install into an empty APPIUM_HOME per job, or key its cache on the pinned versions, and keep appium driver update out of the job.
Run the upgrade on one machine before changing CI
On one machine, run the search from the first section, fix the start command, replace the drivers and plugins at pinned versions, and run one smoke test per platform. Then change CI. The Appium 3 to 4 migration guide lists every change, including those for driver and plugin authors.