appium-uiautomator2-driver 9.2.2 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +0 -2295
  3. package/build/lib/commands/misc.d.ts +15 -1
  4. package/build/lib/commands/misc.d.ts.map +1 -1
  5. package/build/lib/commands/misc.js +16 -0
  6. package/build/lib/commands/misc.js.map +1 -1
  7. package/build/lib/driver.d.ts.map +1 -1
  8. package/build/lib/driver.js +6 -1
  9. package/build/lib/driver.js.map +1 -1
  10. package/lib/commands/misc.ts +21 -1
  11. package/lib/driver.ts +7 -0
  12. package/node_modules/@appium/strongbox/LICENSE +201 -0
  13. package/node_modules/@appium/strongbox/README.md +110 -0
  14. package/node_modules/@appium/strongbox/build/lib/base-item.d.ts +52 -0
  15. package/node_modules/@appium/strongbox/build/lib/base-item.d.ts.map +1 -0
  16. package/node_modules/@appium/strongbox/build/lib/base-item.js +101 -0
  17. package/node_modules/@appium/strongbox/build/lib/base-item.js.map +1 -0
  18. package/node_modules/@appium/strongbox/build/lib/index.d.ts +228 -0
  19. package/node_modules/@appium/strongbox/build/lib/index.d.ts.map +1 -0
  20. package/node_modules/@appium/strongbox/build/lib/index.js +283 -0
  21. package/node_modules/@appium/strongbox/build/lib/index.js.map +1 -0
  22. package/node_modules/@appium/strongbox/build/lib/util.d.ts +6 -0
  23. package/node_modules/@appium/strongbox/build/lib/util.d.ts.map +1 -0
  24. package/node_modules/@appium/strongbox/build/lib/util.js +13 -0
  25. package/node_modules/@appium/strongbox/build/lib/util.js.map +1 -0
  26. package/node_modules/@appium/strongbox/lib/base-item.ts +107 -0
  27. package/node_modules/@appium/strongbox/lib/index.ts +430 -0
  28. package/node_modules/@appium/strongbox/lib/util.ts +12 -0
  29. package/node_modules/@appium/strongbox/package.json +69 -0
  30. package/node_modules/@appium/strongbox/tsconfig.json +14 -0
  31. package/node_modules/appium-android-driver/CHANGELOG.md +56 -0
  32. package/node_modules/appium-android-driver/build/lib/commands/context/helpers.d.ts.map +1 -1
  33. package/node_modules/appium-android-driver/build/lib/commands/context/helpers.js +2 -0
  34. package/node_modules/appium-android-driver/build/lib/commands/context/helpers.js.map +1 -1
  35. package/node_modules/appium-android-driver/build/lib/commands/find.js +2 -2
  36. package/node_modules/appium-android-driver/build/lib/commands/find.js.map +1 -1
  37. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts +3 -0
  38. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts.map +1 -1
  39. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js +4 -0
  40. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js.map +1 -1
  41. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts +10 -4
  42. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -1
  43. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +37 -17
  44. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -1
  45. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts +34 -2
  46. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts.map +1 -1
  47. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js +89 -43
  48. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js.map +1 -1
  49. package/node_modules/appium-android-driver/build/lib/driver.d.ts +1 -0
  50. package/node_modules/appium-android-driver/build/lib/driver.d.ts.map +1 -1
  51. package/node_modules/appium-android-driver/build/lib/driver.js +1 -0
  52. package/node_modules/appium-android-driver/build/lib/driver.js.map +1 -1
  53. package/node_modules/appium-android-driver/lib/commands/context/helpers.ts +2 -0
  54. package/node_modules/appium-android-driver/lib/commands/find.ts +2 -2
  55. package/node_modules/appium-android-driver/lib/commands/media-stream/constants.ts +4 -0
  56. package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +51 -17
  57. package/node_modules/appium-android-driver/lib/commands/media-stream/stream.ts +90 -43
  58. package/node_modules/appium-android-driver/lib/driver.ts +1 -0
  59. package/node_modules/appium-android-driver/package.json +5 -5
  60. package/node_modules/appium-chromedriver/CHANGELOG.md +12 -0
  61. package/node_modules/appium-chromedriver/README.md +26 -0
  62. package/node_modules/appium-chromedriver/build/lib/checksums.d.ts +28 -0
  63. package/node_modules/appium-chromedriver/build/lib/checksums.d.ts.map +1 -0
  64. package/node_modules/appium-chromedriver/build/lib/checksums.js +73 -0
  65. package/node_modules/appium-chromedriver/build/lib/checksums.js.map +1 -0
  66. package/node_modules/appium-chromedriver/build/lib/chromedriver.d.ts +1 -0
  67. package/node_modules/appium-chromedriver/build/lib/chromedriver.d.ts.map +1 -1
  68. package/node_modules/appium-chromedriver/build/lib/chromedriver.js +3 -1
  69. package/node_modules/appium-chromedriver/build/lib/chromedriver.js.map +1 -1
  70. package/node_modules/appium-chromedriver/build/lib/commands/binary.d.ts.map +1 -1
  71. package/node_modules/appium-chromedriver/build/lib/commands/binary.js +26 -1
  72. package/node_modules/appium-chromedriver/build/lib/commands/binary.js.map +1 -1
  73. package/node_modules/appium-chromedriver/build/lib/commands/types.d.ts +1 -0
  74. package/node_modules/appium-chromedriver/build/lib/commands/types.d.ts.map +1 -1
  75. package/node_modules/appium-chromedriver/build/lib/storage-client/storage-client.d.ts +1 -0
  76. package/node_modules/appium-chromedriver/build/lib/storage-client/storage-client.d.ts.map +1 -1
  77. package/node_modules/appium-chromedriver/build/lib/storage-client/storage-client.js +8 -1
  78. package/node_modules/appium-chromedriver/build/lib/storage-client/storage-client.js.map +1 -1
  79. package/node_modules/appium-chromedriver/build/lib/types.d.ts +4 -0
  80. package/node_modules/appium-chromedriver/build/lib/types.d.ts.map +1 -1
  81. package/node_modules/appium-chromedriver/build/lib/utils.d.ts +8 -0
  82. package/node_modules/appium-chromedriver/build/lib/utils.d.ts.map +1 -1
  83. package/node_modules/appium-chromedriver/build/lib/utils.js +1 -1
  84. package/node_modules/appium-chromedriver/build/lib/utils.js.map +1 -1
  85. package/node_modules/appium-chromedriver/config/checksums.json +1665 -0
  86. package/node_modules/appium-chromedriver/config/edge-checksums.json +439 -0
  87. package/node_modules/appium-chromedriver/lib/checksums.ts +92 -0
  88. package/node_modules/appium-chromedriver/lib/chromedriver.ts +3 -0
  89. package/node_modules/appium-chromedriver/lib/commands/binary.ts +73 -42
  90. package/node_modules/appium-chromedriver/lib/commands/types.ts +1 -0
  91. package/node_modules/appium-chromedriver/lib/storage-client/storage-client.ts +9 -2
  92. package/node_modules/appium-chromedriver/lib/types.ts +4 -0
  93. package/node_modules/appium-chromedriver/lib/utils.ts +1 -1
  94. package/node_modules/appium-chromedriver/package.json +3 -2
  95. package/node_modules/appium-uiautomator2-server/CHANGELOG.md +120 -0
  96. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk +0 -0
  97. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk.idsig +0 -0
  98. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v11.3.0.apk +0 -0
  99. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v11.3.0.apk.idsig +0 -0
  100. package/node_modules/appium-uiautomator2-server/package.json +2 -2
  101. package/node_modules/asyncbox/README.md +7 -3
  102. package/node_modules/asyncbox/build/lib/shared/errors.d.ts +18 -2
  103. package/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -1
  104. package/node_modules/asyncbox/build/lib/shared/errors.js +24 -8
  105. package/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -1
  106. package/node_modules/asyncbox/lib/shared/errors.ts +34 -8
  107. package/node_modules/asyncbox/package.json +1 -1
  108. package/node_modules/bare-fs/package.json +2 -2
  109. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  110. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  111. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  112. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  113. package/node_modules/env-paths/index.d.ts +90 -0
  114. package/node_modules/env-paths/index.js +69 -0
  115. package/node_modules/env-paths/license +9 -0
  116. package/node_modules/env-paths/package.json +55 -0
  117. package/node_modules/env-paths/readme.md +100 -0
  118. package/node_modules/io.appium.settings/CHANGELOG.md +14 -0
  119. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  120. package/node_modules/io.appium.settings/package.json +2 -2
  121. package/node_modules/is-safe-filename/index.d.ts +59 -0
  122. package/node_modules/is-safe-filename/index.js +41 -0
  123. package/node_modules/is-safe-filename/license +9 -0
  124. package/node_modules/is-safe-filename/package.json +45 -0
  125. package/node_modules/is-safe-filename/readme.md +62 -0
  126. package/node_modules/plist/dist/parse-binary.d.ts.map +1 -1
  127. package/node_modules/plist/dist/parse-binary.js +37 -9
  128. package/node_modules/plist/dist/parse-binary.js.map +1 -1
  129. package/node_modules/plist/package.json +1 -1
  130. package/node_modules/xpath/package.json +4 -3
  131. package/node_modules/xpath/xpath.d.ts +69 -21
  132. package/node_modules/xpath/xpath.js +233 -81
  133. package/package.json +5 -5
  134. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v11.0.8.apk +0 -0
  135. package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v11.0.8.apk.idsig +0 -0
@@ -43,6 +43,7 @@ export class MediaStream {
43
43
  private videoSynced = false;
44
44
  private wasSubscribed = false;
45
45
  private lastKeyFrameRequestAt = 0;
46
+ private keyFrameRetry?: NodeJS.Timeout;
46
47
  private jpegSeq = 0;
47
48
  private lastJpeg?: MediaUnit;
48
49
  private lastJpegEmitAt = 0;
@@ -50,13 +51,19 @@ export class MediaStream {
50
51
  private dropped = 0;
51
52
  private heartbeat?: NodeJS.Timeout;
52
53
  private pump?: Promise<void>;
53
- // Whether the device-side session is ours to stop (false if another client's stream was found running)
54
- private owned = false;
54
+ /**
55
+ * Settles once the device session is up or failed to start, telling whether there is a device
56
+ * session of ours to stop. False if another client's stream of this kind was found running, or if
57
+ * the options were rejected (TypeError, RangeError) before the device was touched. Any other
58
+ * failure may have brought the on-device service up, so it counts as ours.
59
+ */
60
+ private deviceStart?: Promise<boolean>;
55
61
  private announced = false;
56
62
  private endReason = 'ended';
57
63
  private firstUnitSeen!: () => void;
58
64
  private readonly firstUnit = new Promise<void>((resolve) => (this.firstUnitSeen = resolve));
59
65
  private stopped = false;
66
+ private finished?: Promise<void>;
60
67
  private get videoChain(): string {
61
68
  return `${this.streamId}:video`;
62
69
  }
@@ -70,46 +77,40 @@ export class MediaStream {
70
77
  this.batcher = new UnitBatcher(opts.kind === 'jpeg' ? 0 : opts.batchMs, (units) => this.emitUnits(units));
71
78
  }
72
79
 
80
+ /**
81
+ * Starts the device session and republishes its units.
82
+ * Throws if another client's stream of this kind runs on the device, which is left alone.
83
+ * If the stream is stopped while the device session is starting, this throws and the teardown
84
+ * stops the device session once it is up.
85
+ */
73
86
  async start(): Promise<MediaStreamInfo> {
74
87
  const {opts} = this;
75
88
  if (this.stopped) {
76
89
  throw new Error('The stream was stopped before it started');
77
90
  }
78
- // A start() that throws may still have brought the on-device service up, so it is ours
79
- this.owned = true;
80
- let started: boolean;
81
- try {
82
- started =
83
- opts.kind === 'video'
84
- ? await (this.session as VideoStreamSession).start({
85
- codec: opts.codec,
86
- fps: opts.fps,
87
- bitrate: opts.bitrate,
88
- resolution: opts.resolution,
89
- audio: opts.audio,
90
- })
91
- : await (this.session as JpegStreamSession).start({fps: opts.fps, quality: opts.quality, scale: opts.scale});
92
- } catch (e) {
93
- // Option validation runs before the device is touched, so there is nothing of ours to stop
94
- if (e instanceof TypeError || e instanceof RangeError) {
95
- this.owned = false;
96
- }
97
- if (this.owned && this.stopped) {
98
- // finish() already ran and skipped the device session, which may be half up
99
- await this.session.stop().catch(() => {});
91
+ const starting =
92
+ opts.kind === 'video'
93
+ ? (this.session as VideoStreamSession).start({
94
+ codec: opts.codec,
95
+ fps: opts.fps,
96
+ bitrate: opts.bitrate,
97
+ resolution: opts.resolution,
98
+ audio: opts.audio,
99
+ })
100
+ : (this.session as JpegStreamSession).start({fps: opts.fps, quality: opts.quality, scale: opts.scale});
101
+ this.deviceStart = (async () => {
102
+ try {
103
+ return await starting;
104
+ } catch (e) {
105
+ return !(e instanceof TypeError || e instanceof RangeError);
100
106
  }
101
- throw e;
107
+ })();
108
+ if (!(await starting)) {
109
+ throw new Error(`Another ${opts.kind} stream is already running on the device`);
102
110
  }
103
111
  if (this.stopped) {
104
- // Stopped while the device session was starting: finish() may have run before it was up
105
- await this.session.stop().catch(() => {});
106
112
  throw new Error('The stream was stopped while it was starting');
107
113
  }
108
- if (!started) {
109
- // The device already runs a stream of this kind that is not ours: leave it alone
110
- this.owned = false;
111
- throw new Error(`Another ${opts.kind} stream is already running on the device`);
112
- }
113
114
 
114
115
  this.deps.emitter.on(BACKPRESSURE_EVENT_NAME, this.onBackpressure);
115
116
  if (opts.kind === 'jpeg' && opts.idleHeartbeatMs > 0) {
@@ -164,22 +165,39 @@ export class MediaStream {
164
165
  return this.stopped;
165
166
  }
166
167
 
167
- /** Idempotent; resolves once the stream is torn down and its pump has finished. */
168
+ /**
169
+ * Idempotent: every call waits for the same teardown, and resolves once the device session of
170
+ * the stream is stopped (after its start settled, if it was still starting) and the pump has
171
+ * finished. Never rejects.
172
+ */
168
173
  async stop(reason = 'stopped'): Promise<void> {
169
174
  await this.finish(reason);
170
175
  await this.pump?.catch(() => {});
171
176
  }
172
177
 
173
- // Must not await the pump: it is also called from inside the pump itself
174
- private async finish(reason: string): Promise<void> {
175
- if (this.stopped) {
176
- return;
177
- }
178
+ /**
179
+ * Marks the stream stopped and returns its single teardown.
180
+ * Must not await the pump: it is also called from inside the pump itself.
181
+ */
182
+ private finish(reason: string): Promise<void> {
178
183
  this.stopped = true;
184
+ return (this.finished ??= this.teardown(reason));
185
+ }
186
+
187
+ /**
188
+ * Waits for a device start that is still in flight (a starting device session can only be
189
+ * stopped once it is up), stops the device session if it is ours, emits `ended`, and calls
190
+ * `onEnded`. Never rejects: the stream is ended whatever its device session or a listener of
191
+ * `ended` does, so failures of either are logged, not passed to the callers of stop().
192
+ * It awaits before running any callback, so finish() has stored it by the time a callback stops
193
+ * the stream again, and that call gets this same teardown.
194
+ */
195
+ private async teardown(reason: string): Promise<void> {
179
196
  clearInterval(this.heartbeat);
197
+ this.cancelKeyFrameRetry();
180
198
  this.batcher.close();
181
199
  this.deps.emitter.off(BACKPRESSURE_EVENT_NAME, this.onBackpressure);
182
- if (this.owned) {
200
+ if (await this.deviceStart) {
183
201
  try {
184
202
  await this.session.stop();
185
203
  } catch (e) {
@@ -187,7 +205,11 @@ export class MediaStream {
187
205
  }
188
206
  }
189
207
  if (this.announced) {
190
- this.deps.emit({method: MEDIA_ENDED_EVENT, params: {streamId: this.streamId, reason}});
208
+ try {
209
+ this.deps.emit({method: MEDIA_ENDED_EVENT, params: {streamId: this.streamId, reason}});
210
+ } catch (e) {
211
+ this.deps.log.warn(`Cannot emit the end of the ${this.kind} stream: ${(e as Error).message}`);
212
+ }
191
213
  }
192
214
  this.deps.onEnded(this.streamId);
193
215
  }
@@ -266,6 +288,8 @@ export class MediaStream {
266
288
  if (au.track === 'video') {
267
289
  if (au.isKeyFrame) {
268
290
  this.videoSynced = true;
291
+ // The subscribers get a keyframe now, so a request still waiting for the rate limit is not needed
292
+ this.cancelKeyFrameRetry();
269
293
  unit.data = this.config ? Buffer.concat([this.config, au.data]) : au.data;
270
294
  } else if (!this.videoSynced) {
271
295
  return;
@@ -350,15 +374,38 @@ export class MediaStream {
350
374
  });
351
375
  }
352
376
 
377
+ // At most one request per interval. A request that comes sooner is sent once the interval has passed,
378
+ // unless a keyframe reaches the subscribers first
353
379
  private requestKeyFrame(): void {
354
- const now = Date.now();
355
- if (this.kind !== 'video' || now - this.lastKeyFrameRequestAt < KEYFRAME_REQUEST_MIN_INTERVAL_MS) {
380
+ if (this.stopped || this.kind !== 'video') {
356
381
  return;
357
382
  }
358
- this.lastKeyFrameRequestAt = now;
383
+ const elapsed = Date.now() - this.lastKeyFrameRequestAt;
384
+ // A negative value means the clock was set back, which must not hold requests back until it catches up
385
+ if (elapsed >= 0 && elapsed < KEYFRAME_REQUEST_MIN_INTERVAL_MS) {
386
+ this.keyFrameRetry ??= setTimeout(() => {
387
+ this.keyFrameRetry = undefined;
388
+ if (this.deps.hasSubscribers()) {
389
+ this.requestKeyFrame();
390
+ } else {
391
+ // Nobody is left to get the keyframe. A subscriber that comes back before the next unit
392
+ // is a late joiner too, so reset what that unit would have reset
393
+ this.wasSubscribed = false;
394
+ this.videoSynced = false;
395
+ }
396
+ }, KEYFRAME_REQUEST_MIN_INTERVAL_MS - elapsed);
397
+ return;
398
+ }
399
+ this.cancelKeyFrameRetry();
400
+ this.lastKeyFrameRequestAt = Date.now();
359
401
  void this.sendKeyFrameRequest();
360
402
  }
361
403
 
404
+ private cancelKeyFrameRetry(): void {
405
+ clearTimeout(this.keyFrameRetry);
406
+ this.keyFrameRetry = undefined;
407
+ }
408
+
362
409
  private async sendKeyFrameRequest(): Promise<void> {
363
410
  try {
364
411
  const sent = await (this.session as VideoStreamSession).requestKeyFrame();
@@ -267,6 +267,7 @@ class AndroidDriver<C extends AndroidDriverConstraints = AndroidDriverConstraint
267
267
  _screenStreamingProps?: ScreenStreamingProps;
268
268
  _mediaStreams?: Map<string, MediaStream>;
269
269
  _endedMediaStreamIds?: Set<string>;
270
+ _mediaStreamsClosed?: boolean;
270
271
  _screenRecordingProperties?: ScreenRecordingProperties;
271
272
  _logcatWebsocketListener?: LogcatListener;
272
273
  _bidiServerLogListener?: (...args: any[]) => void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-android-driver",
3
- "version": "15.4.0",
3
+ "version": "16.0.0",
4
4
  "description": "Android UiAutomator and Chrome support for Appium",
5
5
  "keywords": [
6
6
  "android",
@@ -51,11 +51,11 @@
51
51
  "dependencies": {
52
52
  "@appium/support": "^8.0.0-beta.7",
53
53
  "appium-adb": "^17.0.4",
54
- "appium-chromedriver": "^10.0.6",
55
- "asyncbox": "^7.0.0",
54
+ "appium-chromedriver": "^11.0.0",
55
+ "asyncbox": "^7.1.0",
56
56
  "axios": "^1.18.0",
57
57
  "dayjs": "^1.11.21",
58
- "io.appium.settings": "^9.2.1",
58
+ "io.appium.settings": "^9.2.3",
59
59
  "lru-cache": "^11.1.0",
60
60
  "semver": "^7.0.0",
61
61
  "teen_process": "^5.0.0",
@@ -77,5 +77,5 @@
77
77
  "node": "^22.22.2 || ^24.15.0 || >=26.0.0",
78
78
  "npm": ">=10"
79
79
  },
80
- "gitHead": "5ce17ee0415454b5eac479d6b200ac9a0b52e268"
80
+ "gitHead": "0074d36a1eccadcee07e17d3809501d4f204d51c"
81
81
  }
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.0.0](https://github.com/appium/appium-android/compare/appium-chromedriver@10.0.6...appium-chromedriver@11.0.0) (2026-11-22)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * **chromedriver:** custom or unlisted Chromedriver executables are
11
+ rejected unless chromedriver_allow_any_executable is enabled.
12
+
13
+ ### Features
14
+
15
+ * **chromedriver:** verify executables against a SHA-256 allowlist ([#171](https://github.com/appium/appium-android/issues/171)) ([7e44e17](https://github.com/appium/appium-android/commit/7e44e17f1c0f470d7db7d80044bd9a8b6a99c33d))
16
+
17
+
6
18
  ## [10.0.6](https://github.com/appium/appium-android/compare/appium-chromedriver@10.0.5...appium-chromedriver@10.0.6) (2026-11-18)
7
19
 
8
20
  ### Miscellaneous Chores
@@ -22,6 +22,32 @@ more details on it.
22
22
  > This package can work with Microsoft Edge WebDriver as well, but the support is limited.
23
23
  > For example, automatic downloads do not work for Microsoft Edge WebDriver.
24
24
 
25
+ ## Executable verification
26
+
27
+ Before a Chromedriver executable is run, its SHA-256 checksum is compared to the allowlists in
28
+ [checksums.json](https://github.com/appium/appium-android/blob/main/packages/chromedriver/config/checksums.json)
29
+ (Chromedriver) and
30
+ [edge-checksums.json](https://github.com/appium/appium-android/blob/main/packages/chromedriver/config/edge-checksums.json)
31
+ (Microsoft Edge WebDriver). The first one is updated together with `mapping.json` by the Chromedriver version bump
32
+ workflow, the second one is updated by the Edge WebDriver checksums bump workflow. The Edge WebDriver allowlist
33
+ contains the latest stable and extended stable releases and the latest release of every major version
34
+ (Edge WebDriver builds older than major version 118 are not available for download anymore).
35
+ The automatic download feature is an explicit opt-in, so the executables it downloads are trusted locally
36
+ (their checksums are stored, one file per checksum, in the per-user writable
37
+ [Strongbox](https://github.com/appium/appium/tree/master/packages/strongbox) folder of the `appium-chromedriver` package).
38
+ The trust store is never read from `executableDir`, since that folder may be provided by the client.
39
+ Any other executable, including custom or self-built builds, drivers that are not on the allowlists
40
+ and the ones set by `executable`/`executableDir`, is rejected.
41
+
42
+ To restore the legacy behavior and run any executable without verification, set the
43
+ `allowUnverifiedExecutable` option. In the Appium UiAutomator2/Espresso drivers it is controlled by the
44
+ `chromedriver_allow_any_executable` server feature (`--allow-insecure=<driver>:chromedriver_allow_any_executable`).
45
+ Only enable it if you trust everyone who is able to create sessions.
46
+
47
+ The allowlists can be extended for older versions using
48
+ `node scripts/update_versions_mapping.mjs <latest version> config/mapping.json --backfill <N>` (Chromedriver) and
49
+ `node scripts/update_edge_checksums.mjs config/edge-checksums.json --backfill` (Microsoft Edge WebDriver).
50
+
25
51
  ## Automatic Chromedriver download on module install
26
52
 
27
53
  Since version 6.0.0 of this module automatic download of the latest known chromedriver
@@ -0,0 +1,28 @@
1
+ /** Driver version -> platform -> SHA-256 of the executable */
2
+ export type ChecksumsMapping = Record<string, Record<string, string>>;
3
+ export declare const TRUST_STORE_SUFFIX_ENV = "APPIUM_CHROMEDRIVER_TRUST_STORE_SUFFIX";
4
+ /**
5
+ * Server-side (per-user, writable) folder with the checksums of the drivers downloaded by this module.
6
+ * It is deliberately independent of the (session-provided) executable folder and of the package folder.
7
+ */
8
+ export declare const getTrustStoreDir: () => string;
9
+ /** Reads the shipped Chromedriver allowlist on the first call only */
10
+ export declare const getChromedriverChecksums: () => Promise<ChecksumsMapping>;
11
+ /** Reads the shipped Microsoft Edge WebDriver allowlist on the first call only */
12
+ export declare const getEdgeDriverChecksums: () => Promise<ChecksumsMapping>;
13
+ export declare function sha256File(filePath: string): Promise<string>;
14
+ /**
15
+ * Remembers the checksum of a binary this module has downloaded and verified itself,
16
+ * so it passes {@linkcode assertKnownChromedriver} even if it is newer than the shipped allowlist.
17
+ * @param sha256 - SHA-256 of the executable, as it was fetched from the configured source
18
+ */
19
+ export declare function trustChecksum(sha256: string): Promise<void>;
20
+ /** Same as {@linkcode trustChecksum}, for the current content of a file */
21
+ export declare function trustChecksumOf(binPath: string): Promise<void>;
22
+ /**
23
+ * Makes sure the file is a known Chromedriver or Microsoft Edge WebDriver build without executing it.
24
+ * @param binPath - Path to the executable
25
+ * @throws {Error} If the SHA-256 of the file is not on the allowlist
26
+ */
27
+ export declare function assertKnownChromedriver(binPath: string): Promise<void>;
28
+ //# sourceMappingURL=checksums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checksums.d.ts","sourceRoot":"","sources":["../../lib/checksums.ts"],"names":[],"mappings":"AAUA,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAGtE,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,MAC8E,CAAC;AAOnH,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,QAAO,OAAO,CAAC,gBAAgB,CAAwC,CAAC;AAE7G,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,QAAO,OAAO,CAAC,gBAAgB,CAA6C,CAAC;AAUhH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE;AAYD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjE;AAED,2EAA2E;AAC3E,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAU5E"}
@@ -0,0 +1,73 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { createReadStream } from 'node:fs';
3
+ import fs from 'node:fs/promises';
4
+ import path from 'node:path';
5
+ import { strongbox } from '@appium/strongbox';
6
+ import { util } from '@appium/support';
7
+ import { getModuleRoot } from './utils.js';
8
+ // Overrides the Strongbox folder suffix, used by tests to avoid touching the real trust store
9
+ export const TRUST_STORE_SUFFIX_ENV = 'APPIUM_CHROMEDRIVER_TRUST_STORE_SUFFIX';
10
+ /**
11
+ * Server-side (per-user, writable) folder with the checksums of the drivers downloaded by this module.
12
+ * It is deliberately independent of the (session-provided) executable folder and of the package folder.
13
+ */
14
+ export const getTrustStoreDir = () => strongbox('appium-chromedriver', { suffix: process.env[TRUST_STORE_SUFFIX_ENV] || 'trusted-checksums' }).container;
15
+ const readChecksumsFile = util.memoize(async function readChecksumsFile(fileName) {
16
+ const content = await fs.readFile(path.join(getModuleRoot(), 'config', fileName), 'utf8');
17
+ return JSON.parse(content);
18
+ });
19
+ /** Reads the shipped Chromedriver allowlist on the first call only */
20
+ export const getChromedriverChecksums = () => readChecksumsFile('checksums.json');
21
+ /** Reads the shipped Microsoft Edge WebDriver allowlist on the first call only */
22
+ export const getEdgeDriverChecksums = () => readChecksumsFile('edge-checksums.json');
23
+ const getKnownChecksums = util.memoize(async function getKnownChecksums() {
24
+ const mappings = await Promise.all([getChromedriverChecksums(), getEdgeDriverChecksums()]);
25
+ return new Set(mappings.flatMap((mapping) => Object.values(mapping).flatMap((perPlatform) => Object.values(perPlatform))));
26
+ });
27
+ // Always hashes the current content (~10-30 ms): size/mtime based caching could be defeated by a swapped file
28
+ export async function sha256File(filePath) {
29
+ const hash = createHash('sha256');
30
+ for await (const chunk of createReadStream(filePath)) {
31
+ hash.update(chunk);
32
+ }
33
+ return hash.digest('hex');
34
+ }
35
+ // One empty file per checksum: adding is idempotent and needs no locking, even across processes
36
+ async function isTrusted(sha256) {
37
+ try {
38
+ await fs.access(path.join(getTrustStoreDir(), sha256));
39
+ return true;
40
+ }
41
+ catch {
42
+ return false;
43
+ }
44
+ }
45
+ /**
46
+ * Remembers the checksum of a binary this module has downloaded and verified itself,
47
+ * so it passes {@linkcode assertKnownChromedriver} even if it is newer than the shipped allowlist.
48
+ * @param sha256 - SHA-256 of the executable, as it was fetched from the configured source
49
+ */
50
+ export async function trustChecksum(sha256) {
51
+ const trustDir = getTrustStoreDir();
52
+ await fs.mkdir(trustDir, { recursive: true });
53
+ await fs.writeFile(path.join(trustDir, sha256), '', { flag: 'a' });
54
+ }
55
+ /** Same as {@linkcode trustChecksum}, for the current content of a file */
56
+ export async function trustChecksumOf(binPath) {
57
+ await trustChecksum(await sha256File(binPath));
58
+ }
59
+ /**
60
+ * Makes sure the file is a known Chromedriver or Microsoft Edge WebDriver build without executing it.
61
+ * @param binPath - Path to the executable
62
+ * @throws {Error} If the SHA-256 of the file is not on the allowlist
63
+ */
64
+ export async function assertKnownChromedriver(binPath) {
65
+ const sha256 = await sha256File(binPath);
66
+ if ((await getKnownChecksums()).has(sha256) || (await isTrusted(sha256))) {
67
+ return;
68
+ }
69
+ throw new Error(`The SHA-256 checksum (${sha256}) of '${binPath}' does not match any known Chromedriver or Edge WebDriver build. ` +
70
+ `Use a driver build distributed by Google or Microsoft, or enable the ` +
71
+ `'chromedriver_allow_any_executable' server feature to allow arbitrary executables`);
72
+ }
73
+ //# sourceMappingUR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5C,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC;AACnE,CAAC;AAED,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,MAAM,aAAa,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAAe;IAC3D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACzE,OAAO;IACT,CAAC;IACD,MAAM,IAAI,KAAK,CACb,yBAAyB,MAAM,SAAS,OAAO,mEAAmE;QAChH,uEAAuE;QACvE,mFAAmF,CACtF,CAAC;AACJ,CAAC"}
@@ -39,6 +39,7 @@ export declare class Chromedriver extends events.EventEmitter<ChromedriverEventM
39
39
  readonly verbose?: boolean;
40
40
  readonly logPath?: string;
41
41
  readonly disableBuildCheck: boolean;
42
+ readonly allowUnverifiedExecutable: boolean;
42
43
  readonly storageClient: ChromedriverStorageClient | null;
43
44
  readonly details?: ChromedriverOpts['details'];
44
45
  capabilities: SessionCapabilities;
@@ -1 +1 @@
1
- {"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../lib/chromedriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD,OAAO,KAAK,EAAe,UAAU,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAC,OAAO,EAAE,QAAQ,EAA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,WAAW,CAAe;IAClC,OAAO,CAAC,YAAY,CAAgB;gBAExB,IAAI,GAAE,gBAAqB;IA2DvC,IAAI,GAAG,QAEN;IAED,IAAI,aAAa,IAAI,MAAM,GAAG,IAAI,CAEjC;IAED;;;;;;OAMG;IACG,KAAK,CAAC,IAAI,EAAE,mBAAmB,EAAE,iBAAiB,UAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAiB9F;;;;OAIG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAU7C;;;;OAIG;IACG,IAAI,CAAC,UAAU,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB5C;;;;;;;OAOG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,GAAE,QAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI5F;;;;;OAKG;IACG,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAS3C,OAAO,CAAC,kCAAkC;IAU1C,OAAO,CAAC,kCAAkC;YAsC5B,yBAAyB;IAavC,OAAO,CAAC,+BAA+B;YAiBzB,8BAA8B;CAe7C"}
@@ -38,6 +38,7 @@ export class Chromedriver extends events.EventEmitter {
38
38
  verbose;
39
39
  logPath;
40
40
  disableBuildCheck;
41
+ allowUnverifiedExecutable;
41
42
  storageClient;
42
43
  details;
43
44
  capabilities;
@@ -59,7 +60,7 @@ export class Chromedriver extends events.EventEmitter {
59
60
  startSession = startSession;
60
61
  constructor(args = {}) {
61
62
  super();
62
- const { host = DEFAULT_HOST, port = DEFAULT_PORT, useSystemExecutable = false, executable, executableDir, bundleId, mappingPath, cmdArgs, adb, verbose, logPath, disableBuildCheck, details, isAutodownloadEnabled = false, reqBasePath, } = args;
63
+ const { host = DEFAULT_HOST, port = DEFAULT_PORT, useSystemExecutable = false, executable, executableDir, bundleId, mappingPath, cmdArgs, adb, verbose, logPath, disableBuildCheck, details, isAutodownloadEnabled = false, allowUnverifiedExecutable = false, reqBasePath, } = args;
63
64
  this._log = logger.getLogger(generateLogPrefix(this));
64
65
  this.proxyHost = host;
65
66
  this.proxyPort = parseInt(String(port), 10);
@@ -89,6 +90,7 @@ export class Chromedriver extends events.EventEmitter {
89
90
  this.verbose = verbose;
90
91
  this.logPath = logPath;
91
92
  this.disableBuildCheck = !!disableBuildCheck;
93
+ this.allowUnverifiedExecutable = !!allowUnverifiedExecutable;
92
94
  this.storageClient = isAutodownloadEnabled
93
95
  ? new ChromedriverStorageClient({ chromedriverDir: this.executableDir })
94
96
  : null;
@@ -1 +1 @@
1
- {"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../lib/chromedriver.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AACvG,OAAO,EAAC,gCAAgC,EAAC,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAC,yBAAyB,EAAC,MAA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AAsB,yBAAyB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmDjG;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB5F"}
1
+ {"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/commands/binary.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,YAAY,CAAC;AAQ3D,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAUD;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA6B7G;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,0BAA0B,EAChC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAgF7B;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,0BAA0B,EAChC,UAAU,EAAE,0BAA0B,GACrC,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmDjG;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB5F"}
@@ -2,10 +2,13 @@ import path from 'node:path';
2
2
  import { fs, util } from '@appium/support';
3
3
  import { asyncmap } from 'asyncbox';
4
4
  import * as semver from 'semver';
5
+ import { assertKnownChromedriver } from '../checksums.js';
5
6
  import { CHROMEDRIVER_CHROME_MAPPING, getChromedriverBinaryPath, compareVersions, listFiles } from '../utils.js';
6
7
  const NEW_CD_VERSION_FORMAT_MAJOR_VERSION = 73;
7
8
  const CD_VERSION_TIMEOUT = 5000;
8
9
  const GET_COMPATIBLE_CHROMEDRIVER_MAX_ITERATIONS = 10;
10
+ // executables are verified and probed in batches to limit disk and process load
11
+ const MAX_PARALLEL_EXECUTABLE_CHECKS = 4;
9
12
  /**
10
13
  * Loads and normalizes Chromedriver-to-Chrome version mapping.
11
14
  */
@@ -62,6 +65,13 @@ export async function getChromedrivers(mapping) {
62
65
  this.log.warn(errMsg);
63
66
  return null;
64
67
  };
68
+ try {
69
+ await assertExecutableAllowed(this, executable);
70
+ }
71
+ catch (e) {
72
+ this.log.warn(`Skipping '${executable}': ${e.message}`);
73
+ return null;
74
+ }
65
75
  let stdout;
66
76
  let stderr;
67
77
  try {
@@ -94,7 +104,7 @@ export async function getChromedrivers(mapping) {
94
104
  }
95
105
  }
96
106
  return { executable, version, minChromeVersion };
97
- }))
107
+ }, { concurrency: MAX_PARALLEL_EXECUTABLE_CHECKS }))
98
108
  .filter((cd) => !!cd)
99
109
  .sort((a, b) => compareVersions(b.version, a.version));
100
110
  if (cds.length === 0) {
@@ -182,6 +192,8 @@ export async function getCompatibleChromedriver() {
182
192
  */
183
193
  export async function initChromedriverPath() {
184
194
  if (this.executableVerified && this.chromedriver) {
195
+ // the file might have been replaced since the previous launch
196
+ await assertExecutableAllowed(this, this.chromedriver);
185
197
  return this.chromedriver;
186
198
  }
187
199
  let chromedriver = this.chromedriver;
@@ -196,10 +208,23 @@ export async function initChromedriverPath() {
196
208
  if (!(await fs.exists(chromedriver))) {
197
209
  throw new Error(`Trying to use a chromedriver binary at the path ${chromedriver}, but it doesn't exist!`);
198
210
  }
211
+ await assertExecutableAllowed(this, chromedriver);
199
212
  this.executableVerified = true;
200
213
  this.log.info(`Set chromedriver binary as: ${chromedriver}`);
201
214
  return chromedriver;
202
215
  }
216
+ const unverifiedModeLogged = new WeakSet();
217
+ async function assertExecutableAllowed(ctx, executable) {
218
+ if (ctx.allowUnverifiedExecutable) {
219
+ // log once per instance, not for each file in the executables folder
220
+ if (!unverifiedModeLogged.has(ctx)) {
221
+ unverifiedModeLogged.add(ctx);
222
+ ctx.log.debug('Chromedriver checksum verification is disabled. Executables are not verified');
223
+ }
224
+ return;
225
+ }
226
+ await assertKnownChromedriver(executable);
227
+ }
203
228
  function usesDesktopChromedriverDefault(ctx) {
204
229
  return !ctx.adb && !ctx.isCustomExecutableDir;
205
230
  }