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.

Appium is returning wrong orientation for Google Pixel C Tablet

See original GitHub issue

The problem

There is a problem with screen orientation returned by appium on Google Pixel C tablet. When it’s on landscape Appium is returning Portrait and the opposite. Issue exists on .Net and Java client. The issue is only on this specific device - it’s not related to android version (already checked on another android 7 device). We created sample application which is returning current screen orientation to label text and it’s working correctly, also on system rotation lock (notification bar on the top of the screen) we have information on current orientation and it’s returned correctly. Can you please track how appium gets information about orientation and why Android returns it correctly (via app/notification bar) and Appium doesn’t?

Also screen rotation is working in opposite way. Trying to set landscape is rotating device to portrait and opposite.

Screen and logs attached: landscape orientation

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.0, 1.9.2-beta.2
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe): 7.7.3
  • Mobile platform/version under test: Android 7 Google Pixel C tablet
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: appium cli

Link to Appium logs

https://gist.github.com/GrzegorzSidwa/da29c5593c35085f34f12bcdecb9980a

Code To Reproduce Issue [ Good To Have ]

Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.

Please git clone https://github.com/appium/appium and from the sample-code directory, use one of your favourite languages and sample apps to reproduce the issue.

In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Oct 23, 2020

In appium@beta a new setting was added named useResourcesForOrientationDetection. If this setting is set to true then the server tries to use the Configuration object to determine device orientation rather than guess it based on the current rotation value. Please try it and let us know if that helps

0reactions
mykola-mokhnachcommented, Nov 16, 2020

Closed because of no response

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Set the orientation, but app refused to rotate
If I wait for the screen to fully load, the rotate command returns the error, and the screen ONLY rotates when appium shuts...
Read more >
Pixel C reports wrong Orientation in Xamarin - Stack Overflow
I have a function I use to read the orientation for my app in Xamarin and it works on other devices by Google...
Read more >
Don't Panic - MOBILE DEVELOPER'S GUIDE TO THE GALAXY
to Google's Pixel phones and the latest Nexus devices. This version allows notifications to get snoozed and grouped into channels.
Read more >
Sauce Labs Documentation v1.0.pdf
4.3.5 Examples of Desired Capabilities for iWebDriver and Appium iOS Tests . ... This simple Python test script tests the Google front page....
Read more >
Xamarin.Forms 5.0.0.2545 (5.0.0 Service Release 13) Release ...
... and these are fundamental for getting the latest platform security fixes features required by Apple and Google. Before updating to Xamarin.
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