node.js - 如何处理flutter中的websocket错误
问题描述
我尝试在后端使用node.js、express和socket io进行实时聊天......然后我在客户端使用flutter......问题是......我收到错误消息:
D/FlutterSocketIoPlugin: SocketIO(22042): connect_error: [{"cause":{"detailMessage":"Expected HTTP 101 response but was \u0027404 Not Found\u0027","stackTrace":[],"suppressedExceptions":[]},"detailMessage":"websocket error","stackTrace":[],"suppressedExceptions":[]}]
D/FlutterSocketIoPlugin: SocketIO(22042): reconnect_error: [{"cause":{"cause":{"detailMessage":"Expected HTTP 101 response but was \u0027404 Not Found\u0027","stackTrace":[],"suppressedExceptions":[]},"detailMessage":"websocket error","stackTrace":[],"suppressedExceptions":[]},"detailMessage":"Connection error","stackTrace":[],"suppressedExceptions":[]}]
有什么我想念的吗?
解决方案
推荐阅读
- c++ - 包含传递给函数的变量的参数究竟如何?
- java - Postgresql query runs manuaIIy but returns an error inside Java code
- transactions - 以太坊可以进行私人交易吗?
- php - 在 laravel 中找不到未定义的函数 array_except()
- python-3.x - Problems using pyinstaller flask-desktop
- reactjs - How to access the parent props from the child component?
- python - 如何使用 GridSearchCV 测试回归交叉验证中的过度拟合?
- entity-framework - EF Core Hierarchy TPH map two entities to one
- python - Output result from cpanel python script crontab totally different than manual run
- maven - Maven-Ant 任务没有复制任何东西