Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Unable to push a zip file to my Android device

未關閉
#1,840 7 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
android, java
領域
mobile

研究方向

首先追蹤 Java 驅動程式的 pushFile 進入點,直到報告中顯示的 POST /session/.../appium/device/push_file 端點。使用較小的 zip 檔案和 900 MB 的 zip 檔案重現問題,然後檢查報告的 raw-body 錯誤附近如何處理要求本文。完成的標準是找出受支援的修正方案,或記錄檔案大小限制及其預期行為。

由索引模型根據 Issue 內容生成。

描述

Description

I am trying to push a zip file of 900 MB size to my Android device.
Command:
driver.pushFile("/sdcard/Android/data/com.example.demoapp/files/file.zip", new File("C:\\Users\\rajdeep.dodiya\\resources\\apk\\file.zip"))

I am getting the below error:

uncaughtException: Invalid string length
RangeError: Invalid string length
    at IncomingMessage.onData (C:\Users\rajdeep.dodiya\AppData\Roaming\npm\node_modules\appium\node_modules\raw-body\index.js:259:25)
    at IncomingMessage.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at IncomingMessage.Readable.push (node:internal/streams/readable:228:10)
    at HTTPParser.parserOnBody (node:_http_common:141:24)
[HTTP] <-- POST /session/12fb49f1-fe10-4ba8-b828-cefc939c5e8c/appium/device/push_file - - ms - -
[HTTP] 
BadRequestError: request aborted
    at IncomingMessage.onAborted (C:\Users\rajdeep.dodiya\AppData\Roaming\npm\node_modules\appium\node_modules\raw-body\index.js:238:10)
    at IncomingMessage.emit (node:events:527:28)
    at IncomingMessage._destroy (node:_http_incoming:179:10)
    at _destroy (node:internal/streams/destroy:102:25)
    at IncomingMessage.destroy (node:internal/streams/destroy:64:5)
    at abortIncoming (node:_http_server:602:9)
    at socketOnClose (node:_http_server:596:3)
    at Socket.emit (node:events:539:35)
    at TCP.<anonymous> (node:net:709:12)
ERROR: Error communicating with the remote browser. It may have died.
Build info: version: '4.7.0', revision: '0a5b49d16f'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '18'
Driver info: io.appium.java_client.android.AndroidDriver

Environment

* Java client build version: 8.3.0
* Appium server version:: 2.0.0-beta.52
* Node.js version: v16.15.1
* Mobile platform/version under test: API 33
* Real device or emulator/simulator: Real device

Any help? Is it because my file size is too big? I tried driver.pushFile() for a smaller zip file and it worked.

主要語言
Java
星號
1.3k
分支
755
平均合併
5 天 14 小時
30 天內合併 PR
8

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

appium/java-client 的其他 Issue

查看 appium/java-client 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。