New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not get logs on iOS physical device #8388

Closed
patw0929 opened this Issue May 5, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@patw0929
Copy link

patw0929 commented May 5, 2017

The problem

I'm try to print logs by .log('syslog') on iPhone 6s physical device, but it always print [] empty array. But at the same time & same code, when I execute it on iPhone 6s simulator, it works. Any idea? Thank you.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.4
  • Last Appium version that did not exhibit the issue (if applicable): n/a
  • Desktop OS/version used to run Appium: macOS Sierra 10.12.4
  • Node.js version (unless using Appium.app|exe): v7.2.1
  • Mobile platform/version under test: Physical device is iOS 10.3.1, simulator one is 10.3
  • Real device or emulator/simulator: Both
  • Appium CLI or Appium.app|exe: CLI

Link to Appium logs

https://gist.github.com/patw0929/f27efe3248c9874ef423725a9fedb0f0

@mykola-mokhnach

This comment has been minimized.

Copy link
Collaborator

mykola-mokhnach commented May 5, 2017

  1. Did you set the realDeviceLogger capability?
  2. There was a bug in log collection, which has been fixed not so long ago. Try Appium 1.6.5-beta to make sure the stuff works as expected.
@imurchie

This comment has been minimized.

Copy link
Member

imurchie commented May 5, 2017

Yes. Until 1.6.5-beta if your device had a different time (specifically, an earlier time) than the Appium server, it would not find the logs at all.

@patw0929

This comment has been minimized.

Copy link

patw0929 commented May 8, 2017

Hey guys, thanks for help!
I already upgraded to appium 1.6.5-beta, and using the deviceconsole as realDeviceLogger.
But the log is still printed as empty array only on my physical device.

And the physical device's time is same as my Macbook (Appium cli is running on it).

The appium logs updated here:
https://gist.github.com/patw0929/f27efe3248c9874ef423725a9fedb0f0#file-physical-1-6-5-beta

@mykola-mokhnach

This comment has been minimized.

Copy link
Collaborator

mykola-mokhnach commented May 8, 2017

Have you checked whether any log records are received if deviceconsole is simply executed from the Terminal?

@patw0929

This comment has been minimized.

Copy link

patw0929 commented May 8, 2017

Yes, the deviceconsole could print the specific log as expected when I'm testing the physical device, but not print that log when testing on simulator device. 🤔

@mykola-mokhnach

This comment has been minimized.

Copy link
Collaborator

mykola-mokhnach commented May 8, 2017

This is expected. This utility only collects logs for real devices
What if you change the path in capabilities to /usr/local/lib/node_modules/deviceconsole/deviceconsole?

@patw0929

This comment has been minimized.

Copy link

patw0929 commented May 8, 2017

I changed the realDeviceLogger to /Users/patw/.nvm/versions/node/v7.2.1/lib/node_modules/deviceconsole/deviceconsole (I'm using the nvm, and install the deviceconsole with -g), but the situation is the same as before.

@mykola-mokhnach

This comment has been minimized.

Copy link
Collaborator

mykola-mokhnach commented May 8, 2017

Try to install idevicesyslog utility from libimobiledevice package (HEAD version should be installed) and see how it works then. The realDeviceLogger capability has been deprecated since 1.6.5 so you can remove it. And please attach full Appium log if it didn't work.

@patw0929

This comment has been minimized.

Copy link

patw0929 commented May 8, 2017

Wow, it works! @mykola-mokhnach, thanks a lot!

I installed the libimobiledevice of 1.2.0 version before, but now the HEAD version (HEAD-53fede0) works good.
(brew install --HEAD libimobiledevice)

At the same time, I downgraded to appium 1.6.4, it works fine too.

@mykola-mokhnach

This comment has been minimized.

Copy link
Collaborator

mykola-mokhnach commented May 8, 2017

I'm happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment