question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashlog timestamp format should be unix epoch number, not string (breaking Java client)

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jlippscommented, Jan 30, 2017

@HSerg interesting, I think you’re right. Will reopen and get into our backlog.

0reactions
lock[bot]commented, Apr 29, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found