Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,596 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
android, java
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Bắt đầu từ org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs, đặc biệt là phần xử lý liên quan đến lỗi được báo cáo tại RemoteWebDriver.java:357. Tái hiện driver.getScreenshotAs(OutputType.BYTES) sau khi chuyển sang Native context trên thiết lập Android được báo cáo, sau đó xác minh rằng lệnh chụp ảnh màn hình trả về một mảng byte thay vì Maps$TransformedEntriesMap.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
1.3k
Fork
755
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của appium/java-client

Tất cả issue của appium/java-client

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.