After update getDeviceTime() started to return ‘2070-07-01T18:12:00+440481:06’ value. Looks like Appium looks into the future)
Please provide the full server log
Sure geDeviceTimeLog.txt (7.0 KB)
I don’t observe any calls to getDeviceTime in the log above
Sorry, looks like I’ve copied wrong part.
[debug] [XCUITest] Executing command ‘timeouts’
[debug] [BaseDriver] W3C timeout argument: {“implicit”:10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (66143c26)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/66143c26-23d5-40ca-9e89-361d7e03f775/timeouts 200 2 ms - 14
[HTTP]
[HTTP] --> GET /wd/hub/session/66143c26-23d5-40ca-9e89-361d7e03f775/appium/device/system_time
[HTTP] {}
[debug] [W3C (66143c26)] Calling AppiumDriver.getDeviceTime() with args: [null,“66143c26-23d5-40ca-9e89-361d7e03f775”]
[debug] [XCUITest] Executing command 'getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [W3C (66143c26)] Responding to client with driver.getDeviceTime() result: "2070-07-02T02:04:08+440485:02"
[HTTP] <-- GET /wd/hub/session/66143c26-23d5-40ca-9e89-361d7e03f775/appium/device/system_time 200 194 ms - 41
[HTTP]
[HTTP] --> DELETE /wd/hub/session/66143c26-23d5-40ca-9e89-361d7e03f775
[HTTP] {}
[debug] [W3C (66143c26)] Calling AppiumDriver.deleteSession() with args: [“66143c26-23d5-40ca-9e89-361d7e03f775”]
[debug] [BaseDriver] Event ‘quitSessionRequested’ logged at 1585746124469 (16:02:04 GMT+0300 (Eastern European Summer Time))
[Appium] Removing session 66143c26-23d5-40ca-9e89-361d7e03f775 from our master session list
[debug] [WD Proxy] Matched ‘/session/66143c26-23d5-40ca-9e89-361d7e03f775’ to command name ‘deleteSession’
Does the device itself show a correct time? what is the device model? Have you tried with other devices?
Also what is the output of ideviceinfo tool with that device?
I have 4 different devices: iPhone7, iPhoneX, iPhone6 and iPhone11. All these devices show correct time.
I’m getting ‘ERROR: Could not connect to lockdownd, error code -21’ error.
please install appium@beta and provide the log from there. I’ve added some more debugging output
Do you mean v1.17.0-beta.1 ?
Yes mean appium@beta
in general - the one without shrinkwrap
Updated to Appiunm [email protected], but still getting wrong device time:
[debug] [W3C (ab78d98d)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,“ab78d98d-b02e-4671-b2d2-bc7dc30af0c2”]
[debug] [XCUITest] Executing command ‘timeouts’
[debug] [BaseDriver] W3C timeout argument: {“implicit”:10000}}
[debug] [BaseDriver] Set implicit wait to 10000ms
[debug] [W3C (ab78d98d)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/ab78d98d-b02e-4671-b2d2-bc7dc30af0c2/timeouts 200 3 ms - 14
[HTTP]
[HTTP] --> GET /wd/hub/session/5760cd0d-5445-4164-9364-05b0eb342951/appium/device/system_time
[HTTP] {}
[debug] [W3C (5760cd0d)] Calling AppiumDriver.getDeviceTime() with args: [null,“5760cd0d-5445-4164-9364-05b0eb342951”]
[debug] [XCUITest] Executing command ‘getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [XCUITest] timestamp: 1585928744.520611, utcOffset: 26432145.742010184
[debug] [W3C (5760cd0d)] Responding to client with driver.getDeviceTime() result: “2070-07-06T07:31:29+440535:45”
[HTTP] <-- GET /wd/hub/session/5760cd0d-5445-4164-9364-05b0eb342951/appium/device/system_time 200 213 ms - 41
[HTTP]
[HTTP] --> GET /wd/hub/session/f66a9497-a2c8-4ba1-aedb-69e9339d3944/appium/device/system_time
[HTTP] {}
[debug] [W3C (f66a9497)] Calling AppiumDriver.getDeviceTime() with args: [null,“f66a9497-a2c8-4ba1-aedb-69e9339d3944”]
[debug] [XCUITest] Executing command ‘getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [XCUITest] timestamp: 1585928744.712846, utcOffset: 26432145.7452141
[debug] [W3C (f66a9497)] Responding to client with driver.getDeviceTime() result: “2070-07-06T07:31:29+440535:45”
[HTTP] <-- GET /wd/hub/session/f66a9497-a2c8-4ba1-aedb-69e9339d3944/appium/device/system_time 200 189 ms - 41
[HTTP]
[HTTP] --> GET /wd/hub/session/8c7d5cfb-7563-45cb-8cf3-0ca0969074a9/appium/device/system_time
[HTTP] {}
[debug] [W3C (8c7d5cfb)] Calling AppiumDriver.getDeviceTime() with args: [null,“8c7d5cfb-7563-45cb-8cf3-0ca0969074a9”]
[debug] [XCUITest] Executing command ‘getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [XCUITest] timestamp: 1585928744.915248, utcOffset: 26432145.748587467
[debug] [W3C (8c7d5cfb)] Responding to client with driver.getDeviceTime() result: “2070-07-06T07:31:29+440535:45”
[HTTP] <-- GET /wd/hub/session/8c7d5cfb-7563-45cb-8cf3-0ca0969074a9/appium/device/system_time 200 191 ms - 41
[HTTP]
[HTTP] --> GET /wd/hub/session/ab78d98d-b02e-4671-b2d2-bc7dc30af0c2/appium/device/system_time
[HTTP] {}
[debug] [W3C (ab78d98d)] Calling AppiumDriver.getDeviceTime() with args: [null,“ab78d98d-b02e-4671-b2d2-bc7dc30af0c2”]
[debug] [XCUITest] Executing command ‘getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [XCUITest] timestamp: 1585928745.083141, utcOffset: 26432145.751385685
[debug] [W3C (ab78d98d)] Responding to client with driver.getDeviceTime() result: “2070-07-06T07:31:30+440535:45”
[HTTP] <-- GET /wd/hub/session/ab78d98d-b02e-4671-b2d2-bc7dc30af0c2/appium/device/system_time 200 138 ms - 41
What is the actual time zone, which is set for the device?
I probably could do some fixes, although I don’t have a real iOS device to test that. @DanK Would it be ok for you to test the PR before I could merge it?
Timezones on my devices are UTC +2 and UTC +1. I can test it in my free of work time.
Cool. Please reinstall beta and try again (appium-xcuitest-driver should be at v3.21.0+). Server log is needed as well.
Now I’m getting error when trying to get device time:
‘org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: utc.tz is not a function
Build info: version: ‘3.12.0’, revision: ‘7c6e0b3’, time: ‘2018-05-08T14:04:26.12Z’
System info: host: ‘Mac-mini.local’, ip: ‘fe80:0:0:0:85b:fb30:cce9:f8ed%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.3’, java.version: ‘1.8.0_181’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {adeyaName: denUser1, browserName: , bundleId: ch.adeya.trial, databaseEnabled: false, deviceName: iphone 7, email: [email protected], javascriptEnabled: true, launchTimeout: 200000, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 5000, noReset: true, phoneId: 1866, phoneNumber: +380 66 042 2635, platform: MAC, platformName: iOS, platformVersion: 13.3, securityCode: Fishki123, takesScreenshot: true, udid: 0406bd60f6e0b94a2edf48b136c…, userId: 277, wdaLocalPort: 8101, wdaStartupRetries: 5, webStorageEnabled: false, xcodeOrgId: 68B6W94F5Q, xcodeSigningId: iPhone Developer}
Session ID: 97d53da2-5ca8-445b-a496-97fdd2484de6’
’ [debug] [W3C (97d53da2)] Calling AppiumDriver.getDeviceTime() with args: [null,“97d53da2-5ca8-445b-a496-97fdd2484de6”]
[debug] [XCUITest] Executing command ‘getDeviceTime’
[XCUITest] Attempting to capture iOS device date and time
[debug] [XCUITest] timestamp: 1586184010.817316, utcOffset: 26436400.1802886, timeZone: 10800
[debug] [W3C (97d53da2)] Encountered internal error running command: TypeError: utc.tz is not a function
[debug] [W3C (97d53da2)] at XCUITestDriver.getDeviceTime (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/general.js:118:11)
[HTTP] ← GET /wd/hub/session/97d53da2-5ca8-445b-a496-97fdd2484de6/appium/device/system_time 500 308 ms - 545’
Thanks for trying it.
Reinstall appium@beta one more time - the issue above should be addressed there
Yeah!!! Now time is correct, thank you very much)