Description
parse_server_sdk_flutter: ^8.0.0
FLUTTER RELEASE SDK :- 3.19.5
this is my code:
Future<void> initInstallation(String userId) async { final String? token = await setupToken(); final ParseInstallation currentInstallation = await ParseInstallation.currentInstallation(); print("Installation Entry get objectId: ${currentInstallation.objectId} userId: ${currentInstallation['UserId']} $currentInstallation"); if (currentInstallation.objectId == null) { await currentInstallation.subscribeToChannel('push'); currentInstallation.deviceToken = token; currentInstallation.set('UserId', userId); final ParseResponse pr = await currentInstallation.save(); print("Installation Entry Case 1 create result: ${pr.result} error: ${pr.error}"); } else { final ParseObject installation = ParseObject('_Installation'); installation.objectId = currentInstallation.objectId; installation.set('deviceToken', token); installation.set('UserId', userId); final ParseResponse pr = await installation.save(); print("Installation Entry Case 2 update result: ${pr.result} error: ${pr.error}"); } }
when else code run object delete from database and show error:
---- ParseException (Type: ObjectNotFound) : Code: 101 Message: Object not found for update.----