Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

On Android: getScreenshotAs returns com.google.common.collect.Maps$TransformedEntriesMap instead of byte array

オープン
#1,596 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, java
領域
mobile-dev

調査の方向性

org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs から始め、特に RemoteWebDriver.java:357 で報告された失敗に関連する処理を確認します。報告された Android セットアップで Native context に切り替えた後、driver.getScreenshotAs(OutputType.BYTES) を再現し、その後、スクリーンショットコマンドが Maps$TransformedEntriesMap ではなくバイト配列を返すことを確認します。

索引モデルが issue の本文から書いたものです。

説明

Description

On Android, when I'm attempting to call getScreenshotAs(OutputType.BYTES), under certain situations, it fires:

java.lang.RuntimeException: Unexpected result for screenshot command: com.google.common.collect.Maps$TransformedEntriesMap instance
        at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:357)

This is running against BrowserStack on a Samsung Galaxy S21 Ultra. It appears to be related to switching contexts to Native before.

Environment

  • Java client build version or git revision if you use some snapshot: 8.0.0-beta
  • Appium server version or git revision if you use some snapshot: BrowserStack
  • Desktop OS/version used to run Appium if necessary: BrowserStack
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: N/A
  • Mobile platform/version under test: Galaxy S21 Ultra on BrowserStack
  • Real device or emulator/simulator: Real

Code To Reproduce Issue [ Good To Have ]

driver.getScreenshotAs(OutputType.BYTES)

Exception Stacktraces

See above

Link To Appium Logs

I would be happy to send a link to the BrowserStack Appium logs directly, but it appears to include some of the credential information, so I wouldn't want to post it here. I've seen other references to this problem in other tickets though, so I'm assuming this isn't a new problem.

主要言語
Java
スター
1.3k
フォーク
755
平均マージ
5日 14時間
マージ済み PR(30日)
8

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

appium/java-client のほかの issue

appium/java-client の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。