简体   繁体   English

解析服务成功,beforeSave对某些用户返回“找不到对象”错误

[英]Parse Serve successful beforeSave returns “Object Not Found” error for some users

I have a mobile app which updates a Parse object by incrementing a numeric field. 我有一个移动应用程序,该应用程序通过增加数字字段来更新Parse对象。 For a couple of users that update is returning an "Object Not Found" error result. 对于几个更新的用户,返回“找不到对象”错误结果。

When looking at the server logs, I see a successful beforeSave for the object immediately followed by an indication of the "Object Not Found" error. 查看服务器日志时,我发现该对象的成功的beforeSave成功,紧接着是“找不到对象”错误的指示。

[32minfo[39m: beforeSave triggered for Timeslot for user Kd06Glks3q: Input: {... (truncated) Result: {"object":{"current":{"__op":"Increment","amount":1},"organizationId":"5KK3RckkmD","available":true}} className=Timeslot, triggerType=beforeSave, user=Kd06Glks3q [31merror[39m: Error generating response. [32minfo [39m:为用户Kd06Glks3q的时隙触发了beforeSave:输入:{...(被截断)结果:{“ object”:{“ current”:{“ __ op”:“ Increment”,“ amount”:1}, “ organizationId”:“ 5KK3RckkmD”,“ available”:true}} className =时隙,triggerType = beforeSave,user = Kd06Glks3q [31merror [39m:生成响应时出错。 ParseError { code: 101, message: 'Object not found.' ParseError {代码:101,消息:“找不到对象”。 } code=101, message=Object not found. }代码= 101,消息=未找到对象。 [31merror[39m: Object not found. [31merror [39m:找不到对象。 code=101, message=Object not found. 代码= 101,消息=未找到对象。

This only seems to happen with certain Parse users (2 so far). 这似乎仅在某些Parse用户中发生(到目前为止为2)。 Other users performing the same operation succeed and the log shows the afterSave completing immediately after the beforeSave. 其他执行相同操作的用户成功,并且日志显示afterSave之后立即完成afterSave。 I have set the VERBOSE environment variable to 1 but didn't see any additional data. 我已经将VERBOSE环境变量设置为1,但是没有看到任何其他数据。

I am running Parse Server 2.7.4 我正在运行Parse Server 2.7.4

Anyone seeing this type of issue? 有人看到这种类型的问题吗?

It turns out that the object in question had an ACL that pointed to a missing Role object. 事实证明,所讨论的对象具有指向丢失的Role对象的ACL。 I believe this lead to the Parse Server reporting "Object Not Found" error when it tried to apply the ACLs before actually saving the data. 我认为这导致Parse Server在实际保存数据之前尝试应用ACL时报告“找不到对象”错误。 Would be nice if the Parse Error returned actually referenced the class and id of the object that was not found... 如果返回的解析错误实际上引用了未找到的对象的类和ID,那将是很好的...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM