"unauthorized: master key is required" error on aggregate ParseQuery despite the master key is set
还没有人认领这个 Issue。
评估
调研方向
Start at the ParseQuery::aggregate entry point and trace how the configured master key is passed for aggregate requests. Compare that path with the other ParseQuery methods and reproduce the report using the supplied PHP 7.2, SDK 1.5.1, and pipeline example. Done means the aggregate request's authorization behavior is understood and covered by a regression test.
由索引模型根据 Issue 内容生成。
描述
Issue Description
I get "unauthorized: master key is required" error when I try to do aggregate ParseQuery as below.
ParseClient::initialize('appId', null, 'masterKey');
ParseClient::setServerURL('https://example.com', 'mountPath');
$pipeline = [
'group' => [
'userAttached' => $userId,
'total' => [ '$sum' => 1]
]
];
$query = new ParseQuery("Financials");
$query->equalTo("company_id", $companyId);
$query->equalTo("type", "income");
try {
$resultSum = $query->aggregate($pipeline);
print_r($resultSum);
} catch (ParseException $ex) {
echo $ex->getMessage();
}
As you can see master key is already set, can't find what may be the issue.
Environment Details
- Your PHP Version: 7.2.24-0ubuntu0.18.04.6
- Your Parse PHP SDK Version: 1.5.1
- Your Operating System: Ubuntu 18.04.2 LTS
- 主要语言
- PHP
- 星标
- 808
- 派生
- 340
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
parse-community/parse-php-sdk 的其他 Issue
-
Support PHP 8.4 and 8.5可能已有人在做 @zeliard91 于 26 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 72/100
parse-community/parse-php-sdk#529 · 1 条评论 ·
-
Queries on array values broken since 2.3.1可能已有人在做 @gut-puncture 于 154 天前认领。 未关闭bounty:$20 type:bug
难度 3/5 1-2 天 新手友好度 48/100
parse-community/parse-php-sdk#516 · 5 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
parse-community/parse-php-sdk#465 ·
-
难度 3/5 1-2 天 新手友好度 25/100
parse-community/parse-php-sdk#457 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
parse-community/parse-php-sdk#456 · 1 条评论 ·
查看 parse-community/parse-php-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
b:1.9 t:enhancement
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 3 天内回复
-
backend bug
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 1/5 1 小时以内 新手友好度 85/100