我想做:
检查使用Flutter创建的应用程序的操作。我想使用MetaMask进行登录。
发生的错误描述:
E/flutter (16080): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SocketException: Failed host lookup: '8.bridge.walletconnect.org' (OS Error: No address associated with hostname, errno = 7)
E/flutter (16080): #0 _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:721:35)
E/flutter (16080): #1 _RawSocket.startConnect (dart:io-patch/socket_patch.dart:1914:26)
E/flutter (16080): #2 RawSocket.startConnect (dart:io-patch/socket_patch.dart:27:23)
E/flutter (16080): #3 RawSecureSocket.startConnect (dart:io/secure_socket.dart:297:22)
E/flutter (16080): #4 SecureSocket.startConnect (dart:io/secure_socket.dart:77:28)
E/flutter (16080): #5 _ConnectionTarget.connect (dart:_http/http_impl.dart:2482:26)
E/flutter (16080): #6 _HttpClient._getConnection.connect (dart:_http/http_impl.dart:2924:12)
E/flutter (16080): #7 _HttpClient._getConnection (dart:_http/http_impl.dart:2929:12)
E/flutter (16080): #8 _HttpClient._openUrl (dart:_http/http_impl.dart:2784:12)
E/flutter (16080): #9 _HttpClient.openUrl (dart:_http/http_impl.dart:2622:7)
E/flutter (16080): #10 _WebSocketImpl.connect (dart:_http/websocket_impl.dart:1021:42)
E/flutter (16080): #11 WebSocket.connect (dart:_http/websocket.dart:320:22)
E/flutter (16080): #12 new IOWebSocketChannel.connect (package:web_socket_channel/io.dart:80:28)
E/flutter (16080): #13 connect (package:web_socket_channel/src/_connect_io.dart:15:24)
E/flutter (16080): #14 new WebSocketChannel.connect (package:web_socket_channel/src/channel.dart:115:16)
E/flutter (16080): #15 ReconnectingWebSocket.open (package:walletconnect_dart/src/network/reconnecting_web_socket.dart:86:33)
E/flutter (16080): #16 ReconnectingWebSocket._onClose.<anonymous closure> (package:walletconnect_dart/src/network/reconnecting_web_socket.dart:157:7)
E/flutter (16080): #17 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter (16080): #18 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
E/flutter (16080): #19 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (16080): #20 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
E/flutter (16080): #21 _StreamController._add (dart:async/stream_controller.dart:658:7)
E/flutter (16080): #22 new Stream.fromFuture.<anonymous closure> (dart:async/stream.dart:242:18)
E/flutter (16080): <asynchronous suspension>
E/flutter (16080): #23 new Stream.fromFuture.<anonymous closure> (dart:async/stream.dart:241:17)
E/flutter (16080): <asynchronous suspension>
在应用程序上,当我按下Connect Wallet
按钮时,MetaMask打开,但没有更多的动作。
Web 3Connect的代码可以在这里找到:
class SignIn extends StatelessWidget {
SignIn({Key? key}) : super(key: key);
final connection = Web3Connect();
final String _rpcUrl = "https://testnet.aurora.dev";
final _client =
Web3Client("https://testnet.aurora.dev", Client(), socketConnector: () {
return IOWebSocketChannel.connect("wss://testnet.aurora.dev")
.cast<String>();
});
lib/view/screens/signin.dart - GitHub
我试过:
将<uses-permission android:name="android.permission.INTERNET"/>
添加到android/app/src/main/AndroidManifest.xml
1条答案
按热度按时间tyg4sfes1#
在这里给予你的套接字声明代码。顺便说一下,你好像在主机名里漏掉了什么东西。再检查一遍,也检查一下你的网络连接。如果没有看到你的代码,很难说。