Closed ruisilva450 closed 7 years ago
In the past you must have saved it as a boolean. you should remove the setting and then re-add it.
Actually I'm doing that with this code on the App.xaml.cs:
try
{
string result = Helpers.Settings.Pin; // Don't know why this happens...yet!
}
catch (Exception ex)
{
Helpers.Settings.Pin = string.Empty;
}
This keeps the app running in order to try to fix the issue. Either way, the line in step 2. should have had fixed this by running later in the app:
Helpers.Settings.Pin = "somePinEncryptedHashWithAround450Characters";
Unfortunately, every time I start the app, it falls down on that catch bringing the exception.
I already cleared the cache of the app, uninstalled and reinstalled, and nothing new. Other settings are working normally, for my annoyance.
maybe "pin" is reserved. try something else perhaps.
I had this working and for some reason it stopped. Now, even if I change the "Pin" for "PinHash", it still gives me the error.
EDIT: After some investigation, it turns out that if I put more than 126 characters in the value, it causes this exception. That's some weird exception and a not very specific one. I would suggest to properly check the size of the content when trying to set a given property/setting based on the limits of the platform. Not sure if this is doable or not. Can you add a word about this?
Bug Information
Version Number of Plugin: 3.1.1 Device Tested On: Xiaomi Redmi Note 4 running Android 7.0 Simulator Tested On: N/A Version of VS: 2017 15.4.2 Version of Xamarin: 2.4.0.38779 Versions of other things you are using: N/A
Steps to reproduce the Behavior
2.
3.
Close the app.
4.
Reopen the app.
5.
Expected Behavior
result
should have "somePinEncryptedHashWithAround450Characters"Actual Behavior
Exception:
Full Stack
Code snippet
N/A
Screenshots
N/A