Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在taro框架中无法发起ws连接,也不报错 #113

Open
tiantianzz opened this issue Jul 17, 2024 · 2 comments
Open

在taro框架中无法发起ws连接,也不报错 #113

tiantianzz opened this issue Jul 17, 2024 · 2 comments

Comments

@tiantianzz
Copy link

遇到了什么问题?
在taro框架中无法发起连接,也不报错

代码为:
import io from 'weapp.socket.io';

const _socket = io(HxSocketWss, {
auth: {
userId: customerId,
tenantId: lesseeId,
role: 'user',
clientId: ${Math.random()}_${Date.now()}_mini, // 识别是哪个 client 连的
platform: 'Web',
},
transports: ['websocket'],
});

taro版本号:3.6.8

@Lynne42
Copy link

Lynne42 commented Jul 22, 2024

解决了吗, 我这也是安装的weapp.socket.io@^2.2.1, 依赖socket.io-client "2.2.0"。
服务端python 使用的socket.io2
总是显示连接超时 "._src_utils_socket.ts:37 Connection error: Error: timeout"

@GuoJiKaiHehe
Copy link

我也是一样,神奇了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants