appium-webdriveragent 16.15.1 → 16.15.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [16.15.3](https://github.com/appium/WebDriverAgent/compare/v16.15.2...v16.15.3) (2026-10-16)
2
+
3
+ ### Bug Fixes
4
+
5
+ * bind the MJPEG server to the USE_IP address ([#1299](https://github.com/appium/WebDriverAgent/issues/1299)) ([53573cf](https://github.com/appium/WebDriverAgent/commit/53573cf3a74fe8db87cb5f38b2cdc7f17e856e4f))
6
+
7
+ ## [16.15.2](https://github.com/appium/WebDriverAgent/compare/v16.15.1...v16.15.2) (2026-10-16)
8
+
9
+ ### Bug Fixes
10
+
11
+ * make /health a standalone route ([#1300](https://github.com/appium/WebDriverAgent/issues/1300)) ([eabb56e](https://github.com/appium/WebDriverAgent/commit/eabb56efdc6bca22ae1e8e4e11368de95a31e1c7))
12
+
1
13
  ## [16.15.1](https://github.com/appium/WebDriverAgent/compare/v16.15.0...v16.15.1) (2026-10-16)
2
14
 
3
15
  ### Bug Fixes
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>16.15.1</string>
18
+ <string>16.15.3</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>16.15.1</string>
22
+ <string>16.15.3</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
@@ -133,6 +133,9 @@ static NSString *const FBServerURLEndMarker = @"<-ServerURLHere";
133
133
  self.mjpegServer = [[FBMjpegServer alloc] init];
134
134
  self.screenshotsBroadcaster = [[FBTCPSocket alloc]
135
135
  initWithPort:(uint16_t)FBConfiguration.sharedInstance.mjpegServerPort];
136
+ // Bind to the same address as the HTTP server when USE_IP is set.
137
+ // nil (the default) keeps listening on all interfaces.
138
+ self.screenshotsBroadcaster.interface = FBConfiguration.sharedInstance.bindingIPAddress;
136
139
  self.mjpegServer.socket = self.screenshotsBroadcaster;
137
140
  self.screenshotsBroadcaster.delegate = self.mjpegServer;
138
141
  NSError *error;
@@ -265,7 +268,7 @@ static NSString *const FBServerURLEndMarker = @"<-ServerURLHere";
265
268
 
266
269
  - (void)registerServerKeyRouteHandlers
267
270
  {
268
- [self.server get:@"/health" withBlock:^(RouteRequest *request, RouteResponse *response) {
271
+ [self.server handleMethod:@"GET" withPath:@"/health" standalone:YES block:^(RouteRequest *request, RouteResponse *response) {
269
272
  [response respondWithString:@"<!DOCTYPE html><html><title>Health Check</title><body><p>I-AM-ALIVE</p></body></html>"];
270
273
  }];
271
274
 
@@ -15,6 +15,11 @@
15
15
 
16
16
  #import "FBHTTPServer.h"
17
17
  #import "FBTCPSocket.h"
18
+ #import "FBWebServer.h"
19
+
20
+ @interface FBWebServer (FBWDATestable)
21
+ - (void)registerServerKeyRouteHandlers;
22
+ @end
18
23
 
19
24
  static atomic_int gFramingProbeHits;
20
25
 
@@ -230,6 +235,24 @@ static NSString *FBCompleteResponse(NSData *data)
230
235
  XCTAssertTrue([response containsString:@"pong"], @"%@", response);
231
236
  }
232
237
 
238
+ - (void)testHealthRespondsWhileRouteQueueIsBlocked
239
+ {
240
+ FBWebServer *webServer = [FBWebServer new];
241
+ [webServer setValue:self.server forKey:@"server"];
242
+ [webServer registerServerKeyRouteHandlers];
243
+ dispatch_queue_t routeQueue = dispatch_queue_create("com.facebook.wda.test.health", DISPATCH_QUEUE_SERIAL);
244
+ [self.server setRouteQueue:routeQueue];
245
+ dispatch_suspend(routeQueue);
246
+ @try {
247
+ NSString *response = [self responseClosingFirstForRequest:@"GET /health HTTP/1.1\r\nHost: localhost\r\n\r\n"];
248
+ XCTAssertTrue([response hasPrefix:@"HTTP/1.1 200"], @"%@", response);
249
+ XCTAssertTrue([response hasSuffix:@"<!DOCTYPE html><html><title>Health Check</title><body><p>I-AM-ALIVE</p></body></html>"], @"%@", response);
250
+ } @finally {
251
+ dispatch_resume(routeQueue);
252
+ dispatch_sync(routeQueue, ^{});
253
+ }
254
+ }
255
+
233
256
  - (void)testConnectionsTheClientClosesReleaseTheirSockets
234
257
  {
235
258
  // The server keeps a connection open after answering, so the client is the one that hangs up.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "16.15.1",
3
+ "version": "16.15.3",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "keywords": [
6
6
  "Appium",