Closed Hasankanso closed 2 years ago
The same issue, please help us!!!!
Hey I'm also facing same issue. please help me.
unable to reproduce, can you test with version 0.3.0 ?
yes it's still there, although the error message is a bit different now:
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: SocketException: Connection attempt cancelled, host: maps.googleapis.com, port: 443
we solved it by adding a try catch to the line 429 in src/flutter_google_places.dart:
var res;
try {
res = await _places!.autocomplete(
value,
offset: widget.offset,
location: widget.location,
radius: widget.radius,
language: widget.language,
sessionToken: widget.sessionToken,
types: widget.types!,
components: widget.components!,
strictbounds: widget.strictbounds!,
region: widget.region,
);
} catch (e) {
print(e);
}
if (res == null) {
onResponse(null);
return;
}
again, this only happens when the search page is popped (closed) before a response is received.
This doesn't fix the error in my code. Have to get a different library.
I have updated this package, please use the following:
flutter_google_places:
git:
url: https://github.com/fluttercommunity/flutter_google_places
ref: v0.3.2
I have updated this package, please use the following:
flutter_google_places: git: url: https://github.com/fluttercommunity/flutter_google_places ref: v0.3.2
Still got the same error after the update
Hi. I have a similar issue with my flutter app. When I call an API function, the app crashes with the error "Connection closed before full header was received" on my mobile (samsung, Android). If I connect using wifi, the call works correctly. If I use emulatores, the app works correctly too. No problems testing with postman. If I call the same code linking to another API url (but it's the same API code), I do not have any problems. Flutter doctor was ok. My mobile works correctly with any other app/request
Here's the code
Uri l_Uri = Uri.parse("http://xxxx:xxxx/api/Login");
final response = await http.post(l_Uri,
body: l_body,
headers: {
"Accept": "application/json",
"content-type": "application/json",
});
where body:
{
"UserName": "***",
"Password": "***",
"SvrUsername": "***",
"SvrPassword": "***"
}
After a few seconds, the error "Connection closed before full header was received"
Can you help me?
it happens when I type any letter, and go back before getting any response
134