NativeScript / NativeScript/plugins
[background-http] events not fired on device
オープン
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 206
- フォーク
- 123
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 1
説明
Hi,
I try to upload an image to a Server via backtround-http. It works correct on android and on iOS-Simulator, but on a real iOS-device, the task-events are not fired.
-
"@nativescript/ios": "8.1.0", -
"@nativescript/background-http": "^5.0.2", -
"@nativescript/core": "~8.1.5",
Simulator: iOS 15.2
Device: iOS 15.2.1
const bghttp = require("@nativescript/background-http");
let session = bghttp.session("file-upload");
let request = {
url: this.backendURL + "images/",
method: "POST",
headers: imageHeaders,
description: "multipart/form-data",
}
let params = [
{ name: "file", filename: imagePath, mimeType: "image/png" }
];
let task = session.multipartUpload(params, request);
task.on("progress", function(e) {
console.log("uploaded " + e.currentBytes + " / " + e.totalBytes);
});
task.on("error", function(e) {
console.log("error!");
console.log(e);
console.log(e.response);
});
task.on("responded", function(request) {
console.log("responded");
}
Any ideas?
I can not reproduce it on severall smartphones/ipads, but have one device with this behavior...
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、記載されている NativeScript、iOS、background-http のバージョンを使って実際の iOS デバイスで multipart upload を再現し、その progress、error、responded コールバックをシミュレータと比較します。完了条件は、影響を受けているデバイスで task イベントが発生しない理由を特定し、upload に対してコールバックが正しく動作することを確認することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, javascript, typescript
- 領域
- mobile, networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100