I got TypeError: Object is not async iterable error while trying to listen to message event in React Native app
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, react-native, typescript
- 領域
- mobile-dev, networking
調査の方向性
Issue にはリポジトリのファイルもテストもないため、まずドキュメント化された subscribe API と listener API を、示されている React Native コードと比較します。Subscription を再現し、async-iterable エラーなしで channel がメッセージを受信できるようにするには何を変更する必要があるかを特定します。
索引モデルが issue の本文から書いたものです。
説明
Hi I am working on a React Native app and I have setup socketcluster websocket and I was able to connect to it from the app because I exposed the port of the websocket running locally on my PC with ngrok, but when I tried to listen to message events from the socket I keep getting TypeError: Object is not async iterable error in the command line and the app could not get any message from the socket
this is the code for listening to message event according to the documentation
try {
for await (let data of this.socket_channel) {
console.log('listenForData::: I got data from socket:::', data);
}
} catch (error) {
console.log('socket message conn err', error);
}
the socket initialization
this.websocket_instance = new SocketCluster.create({
hostname: 'x.tcp.xx.ngrok.io',
port: xxxxx
})
this.socket_channel = this.websocket_instance.subscribe(channel_name)
await this.socket_channel.listener('subscribe').once()
this.socket_channel.transmitPublish('hello from mobile phone')
the websocket connects successfully but I can't subscribe to message event and I can't get message from the socket
please is there any other ways I can subscribe to message event from the websocket except from using the for await (let data of this.socket_channel) { way, please help
- 主要言語
- JavaScript
- スター
- 300
- フォーク
- 90
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SocketCluster/socketcluster-client のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
SocketCluster/socketcluster-client#146 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
SocketCluster/socketcluster-client#145 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
SocketCluster/socketcluster-client#141 · リアクション 1 件 ·
SocketCluster/socketcluster-client の issue をすべて見る
似ている issue
-
code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100