gpt4 book ai didi

mongodb - I/flutter (30720) : SocketException: OS Error: Connection timed out, errno = 110,地址 = 192.19.170.13,端口 = 47763

转载 作者:行者123 更新时间:2023-12-03 13:28:46 24 4
gpt4 key购买 nike

我使用的是真实设备(不是安卓模拟器)
后端: MongoDb 图集 ,
API:带-beta ,得到这个错误:
I/flutter (30720): SocketException: OS Error: Connection timed out, errno = 110, address = 192.19.170.13, port = 47763
(发现了很多类似的问题,但没有一个是使用真实设备进行测试的)

    try {
var ip = '192.19.170.13';
setState(() => _isSubmitting = true);
http.Response response =
await http.post('http://$ip:1337/auth/local/register',
/* I've also tried using localhost(it didn't work) everyone suggested to use my loopback adapter's (Ethernet's ip address) even that isn't working.*/
body: {
'username': _username,
'email': _email,
'password': _password,
});

final responseData = json.decode(response.body);
setState(() => _isSubmitting = false);
_successSnackBar();
print(responseData);
} catch (e) {
setState(() => _isSubmitting = false);
print(e.toString());
}
}

最佳答案

如果您使用的是 Chrome,则需要访问
Chrome ://检查/#devices
并像这样将您的端口添加到“端口转发”
enter image description here
并确保您的设备上有 USB 调试。

关于mongodb - I/flutter (30720) : SocketException: OS Error: Connection timed out, errno = 110,地址 = 192.19.170.13,端口 = 47763,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60155822/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com