"unauthorized: master key is required" error on aggregate ParseQuery despite the master key is set
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- PHP
- Star
- 808
- Fork
- 341
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của parse-community/parse-php-sdk
-
Undefined array key "result"Đang mởtype:feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
parse-community/parse-php-sdk#518 · 1 bình luận ·
-
bounty:$20 type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
parse-community/parse-php-sdk#516 · 5 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#465 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#457 · 1 bình luận ·
-
parse query for phpĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
parse-community/parse-php-sdk#456 · 1 bình luận ·
Tất cả issue của parse-community/parse-php-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
domain/crm-after-sales Platform(Default) priority/high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug status/to verify
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PHP-CS-Fixer/PHP-CS-Fixer#9867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày