We recently updated to the latest Flutter SDK version 7.3.3 from version 7.2.7 and I had to alter the call of Backendless.initApp(…) adding the ‘customDomain’ value and removing the secondary call of Backendless.setUrl(…) in order to get things working.
The updated SDK version did alleviate the login persistence issue for both the web and Android builds of my Flutter application, but the iOS application is still having similarly bad login behavior: if I open my iOS build after a fresh install, I can log in cleanly and the app is functional, but if I then close the app and re-open it, no Backendless API request seems to work - the user session is not kept alive and subsequent attempts to re-login or register fail.
In the logs I am seeing the following errors:
PlatformException(3840, The Data couldn’t be read beacuse it isn’t in the correct format., null, null)
Unhandled Exception: type ‘int’ is not a subtype of type ‘String?’
new BackendlessException.fromJson(package:backendless_sdk/src/modules/common/exception.dart:9:14)
@Nikita_Fedorishchev I have the same issue. But in step 6, when I call unitOfWork.create() API will throw the error “Field ‘ownerId’ doesn’t have a default value”. I set ownerId as not null in the Backendless console. Maybe the logged account session got an issue when close and reopen the app. It only happens on iOS. Android is working fine.
I cannot fully reproduce this issue. I following this steps:
initialize application;
login user with stayLoggedIn true;
call find request(successful);
Close and reopen application;
call find request again(successful).
Error in your case says that BackendlessException wait String? type but got int type. I found place where this error can be appears. I added cast to String. I released new version of flutter-sdk(7.3.4) with this fix, hope you guys don’t get this error again.
Please let me know about this. Thank you.
We are still seeing the issue even with the new flutter SDK. We will be doing more testing this evening when our full team is back together. Is there anything we can provide you with to help narrow down this issue further?
Unhandled Exception: BackendlessException: No current user found, code = 1400 #0 Invoker.invoke. (package:backendless_sdk/src/modules/common/invoker.dart:32:11)
Indicating that the app’s cached user token is not being properly included in custom Backendless cloud code API requests.
Good news on our end, backendless_sdk 8.0.0-alpha.1 | Flutter Package resolved the issue. As this is a major release their are many other changes in the 8.0 that have effected our code that will need extensive testing before we would be comfortable using it.
With that being said are you able to provide us any type of timeline that the current SDK might be patched in order to resolve this issue? We have a new build with a lot of new features that we were hoping to publish this week or next week at the latest, obviously we need this resolved before we are comfortable publishing.