My App can authenticate successfully when debugging against the Android emulator, but if I try to authenticate using debugging against the physical device (with same OS version), an error message appears after more than one minute waiting:
Exception has occurred.
_TypeError (type 'String' is not a subtype of type 'int' of 'index')
The error message points to the following code:
if (responseJson[AuthUtils.authTokenKey] != null) {
AuthUtils.insertDetails(
userNameController.text, passwordController.text, responseJson);
...
} else {
...
};
And in the DEBUG CONSOLE I get the following:
I/flutter ( 9531): Auth: SocketException: OS Error: Connection timed out, errno = 110, address = example.com, port = 38975 V/InputMethodManager( 9531): Starting input: tba=android.view.inputmethod.EditorInfo@4aece4e nm : example.com.todoapp ic=null
What am I doing wrong here ?