furaiev / amazon-cognito-identity-dart-2

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
187 stars 114 forks source link

Flutter Channel Dev 1.15 issue #26

Closed furaiev closed 4 years ago

furaiev commented 4 years ago

I follow the example app, and implement it to my app. Once publish it, got an issue after create a release version. After the user session is over (1 hour after), user no longer able to access the app. the _getValues was throwing error : "error type '_onebytestring' is not a subtype of type 'int' of 'index'"

I though there's something wrong with my code. But when I try release the example, the same thing happen. Secure Counter page & Login page always show "Loading..."

When check it, the actual error came from _cognitoUser.getSession() method.

I honestly don't know what happen here (I'm new to Flutter) It seem, this issue not happen on debug mode, only when release.

Originally posted by @erw13n in https://github.com/furaiev/amazon-cognito-identity-dart-2/issues/24#issuecomment-588240795

nezz0746 commented 4 years ago

Hi i'm having the same issue when trying to release an apk, everything works fine in debug. My error seems to be triggered by getAwsCredentials from CognitoCredentials:

"type '_OneByteString' is not a subtype of type 'int' of 'index'"

I come from react-native so i'm new to this as well but it'd be great to have some help on this.

erw13n commented 4 years ago

Make sure you run Flutter Stable Channel and not Dev Channel. https://github.com/furaiev/amazon-cognito-identity-dart-2/issues/24#issuecomment-590617242

nezz0746 commented 4 years ago

@erw13n Ah yes thanks that was the issue, i was actually on Dev this whole time... Thanks !