diff --git a/package-lock.json b/package-lock.json index ca9c5b526..0bf908aa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "appium-device-farm", - "version": "9.5.0", + "version": "9.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "appium-device-farm", - "version": "9.5.0", + "version": "9.5.1", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/src/modules b/src/modules index d58a06062..3b8b384c0 160000 --- a/src/modules +++ b/src/modules @@ -1 +1 @@ -Subproject commit d58a060627d926768c6cf8a0acc5ce0537d8d411 +Subproject commit 3b8b384c09087926946b56da191789b7d98e0112 diff --git a/src/plugin.ts b/src/plugin.ts index aa35a9943..f774f5085 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -354,20 +354,25 @@ class DevicePlugin extends BasePlugin { await EventBus.fire( new BeforeSessionCreatedEvent({ device, sessionType: sessionType, caps }), ); - - if (device.platform === 'ios' && device.realDevice) { + + session = await next(); + + if ( + device.platform === 'ios' && + device.realDevice && + device.nodeId === DevicePlugin.NODE_ID + ) { log.info(`📱 Forwarding ios port to real device ${device.udid} for manual interaction`); try { await DEVICE_CONNECTIONS_FACTORY.requestConnection(device.udid, device.mjpegServerPort, { usePortForwarding: true, devicePort: device.mjpegServerPort, }); - } catch(err){ + } catch (err) { /* Not required for now as the port forwarding is handled by xcuitest river itself */ log.warn(`Error while forwarding ios port to real device ${device.udid}. Error: ${err}`); } } - session = await next(); debugLog(`📱 Session response: ${JSON.stringify(session)}`); }