Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

只能用1个条件检索,2个就报错invalid json #116

Open
perfecten opened this issue May 7, 2024 · 0 comments
Open

只能用1个条件检索,2个就报错invalid json #116

perfecten opened this issue May 7, 2024 · 0 comments

Comments

@perfecten
Copy link

perfecten commented May 7, 2024

环境:reactNative+bmob
现象:本来在ios16.4sdk都是好的,
换了ios17sdk之后,用find()去检索数据,只能用1个条件检索,2个条件就报错invalid json

错误信息如下:"code": 107,
"error": "invalid json: %7B%22$and%22:[%7B%22userId%22:%22f60f1398f7%22%7D,%7B%22userName%22:%22DebugIOS%22%7D]%7D."

代码示例
const entryQ = Bmob.Query("entry");
entryQ.equalTo("userId", "==", userId);
entryQ.equalTo("userName", "==", userName);
let existUser = await entryQ.find();

为了排除bmob版本的问题,试了所有bmob的js版本
即便换了最新的js库,初期化错误,console有提示:‘Bmob初始化失败,2.0版本SDK请使用API安全码初始化’。即便有这个初始化错误,但是和最初一样,一个条件的find()是可以正确执行的,2个条件一样错‘107 invalid json’
(我确认API安全码是正确的,因为输入错的安全码会报不同的错)

望大神指导,谢谢谢谢

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant