SC.stream fails on Firefox, TypeError: t.match(...) is null
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- api
調査の方向性
Start by reproducing SC.stream on Firefox and inspect the reported function p in https://connect.soundcloud.com/sdk/sdk-3.0.0.js, especially the failing match call. Trace the value passed as t and compare it with other browsers; done means SC.stream handles the Firefox response without this TypeError.
索引モデルが issue の本文から書いたものです。
説明
Hi. So I call a basic: SC.stream("/tracks/" + track_id_string).then(handler, errorHandler)
And on Firefox only I get the following error:
TypeError: t.match(...) is null
Stack trace:
p@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:13:23890
f@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:13:23415
r/<@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:18:6074
s@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:18:6310
t.exports</t.exports@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:13:15271
t.exports/<@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:8:18123
R@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:8:2236
N@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:8:2322
x@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:8:2139
m@https://connect.soundcloud.com/sdk/sdk-3.0.0.js:8:759
The error is in this little function:
function p(t) {
if (!t) return 0;
var e = t.match(/\d\S+/)[0].replace(/,/g, ".").split(".");
return parseFloat([e[0], e[1]].join(".")) || 0
}
Error coming from second line. It removes all characters before the first digit in the t string splits the rest by commas. If t = "abc123d,ef" then e = ["123d","ef"]. But you get a type error when there's no digit in the t string.
Not sure why it's only a problem on Firefox. Any ideas?
- 主要言語
- JavaScript
- スター
- 388
- フォーク
- 76
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
soundcloud/soundcloud-javascript のほかの issue
-
Dependency Dashboard オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
soundcloud/soundcloud-javascript#90 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
soundcloud/soundcloud-javascript の issue をすべて見る
似ている issue
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
open-webui/open-webui#30750 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100