Crashlog timestamp format should be unix epoch number, not string (breaking Java client)
See original GitHub issueThe problem
driver.manage().logs().get("crashlog");
produce
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
at org.openqa.selenium.remote.RemoteLogs.getRemoteEntries(RemoteLogs.java:88)
at org.openqa.selenium.remote.RemoteLogs.get(RemoteLogs.java:77)
at ru.sklabs.appium.crashLogTest.main(crashLogTest.java:39)
Environment
- Appium 1.5.3
- Mac OS X 10.11.6
- Java-client 3.4.1
- Xcode 7.3.1
- iOS Simulator: CoreSimulator 209.19 - Device: iPhone 5s - Runtime: iOS 8.4 (12H141) - DeviceType: iPhone 5s
Appium logs
[HTTP] --> POST /wd/hub/session/dcfc7ff7-0529-4aa6-8d57-8a52a2b5d94a/log {"type":"crashlog"}
[MJSONWP] Calling AppiumDriver.getLog() with args: ["crashlog","dcfc7ff7-0529-...
[debug] [iOS] Executing iOS command 'getLog'
[debug] [iOS] Retrieving 'crashlog' logs
[MJSONWP] Responding to client with driver.getLog() result: [{"timestamp":"2016-08-30T1...
[HTTP] <-- POST /wd/hub/session/dcfc7ff7-0529-4aa6-8d57-8a52a2b5d94a/log 200 20 ms - 55271
Details
Object raw = driver.getExecuteMethod().execute(DriverCommand.GET_LOG, ImmutableMap.of("type", "crashlog"));
List<Map<String, Object>> rawList = (List<Map<String, Object>>) raw;
System.out.println(rawList);
produce
[{level=ALL, message=..., timestamp=2016-08-30T11:33:05.000Z}]
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
How to turn this unix epoch string "1583388944.0912497" into ...
Split the string into two parts, a count of whole seconds and a count of nanoseconds. Avoid using floating point technology as it...
Read more >Convert Unix timestamp to DD/MM/YYYY HH:MM:SS format
Given a Unix Timestamp T (in seconds) for a given point in time, the task is to convert it to human-readable format (DD/MM/YYYY...
Read more >Year 2038 problem - Wikipedia
The year 2038 problem is a time formatting bug in computer systems with representing times ... There is no universal solution to the...
Read more >Get Number of Seconds Since Epoch in JavaScript
The Date class provides methods to interact with dates and times. Usually, you need to put more effort into calculating the value that...
Read more >Convert between String and Timestamp | Baeldung
Learn how to convert between String and Timestamp with a little help from LocalDateTime and Java 8.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@HSerg interesting, I think you’re right. Will reopen and get into our backlog.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.