I am going through Failed host lookup: 'api.xyz.io'
and Software program triggered connection abort
some customers on crashlytics logs. when i ship http request on my app opening loading display.
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Software program triggered connection abort. Error thrown Init Consumer.
at IOClient.ship(io_client.dart:88)
at BaseClient._sendUnstreamed(base_client.dart:93)
at get.<fn>(http_custom.dart:47)
at ._withClient(http_custom.dart:256)
at UserController.initUser(userController.dart:33)
at LoadingScreenState.checkRequirements(loading_screen.dart:172)
at LoadingScreenState.asyncInits(loading_screen.dart:121)
it’s trying like connection drawback however i’m checking person community standing earlier than ship request.
Different aspect I am sending 3 request as a sync
1- examine connection
2- initser
3- getsettings
ussualy caught examine connection not an issue (possibly connection misplaced), however wierd aspect typically examine connection success, init person thrown Failed host lookup: 'api.xyz.io'
somites all succes, getsettings caught. it is so bizarre i feel
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Failed host lookup: 'api.xyz.io'. Error thrown Web connection failed.
at IOClient.ship(io_client.dart:88)
at BaseClient._sendUnstreamed(base_client.dart:93)
at get.<fn>(http_custom.dart:47)
at ._withClient(http_custom.dart:256)
at ConnectionUtils.isConnected(connection_utils.dart:11)
All request comparable like that
strive {
ultimate url = this.routes.userRoutes.getSettings;
// Ship the request
ultimate response = await httpCustom.get(
url,
headers: await HeaderUtils.authorizedGet(),
);
var responseJson = jsonDecode(response.physique);
Consumer person = Consumer.fromJson(responseJson['user']);
Settings settings = Settings.fromJson(responseJson);
await storage.write(key: StorageKeys().person, worth: person.toString());
await storage.write(
key: StorageKeys().settings, worth: settings.toString());
sendSuccesLog(funcName: "initUser");
return person;
} catch (e, stack) {
FirebaseCrashlytics.occasion.recordError(e, stack, motive: 'Init Consumer');
checkNetworkConnection(funcName: "initUser");
return null;
}
I attempted
<uses-permission android:title="android.permission.INTERNET" /> <uses-permission android:title="android.permission.ACCESS_NETWORK_STATE" />
and
android:usesCleartextTraffic="true"
and im utilizing