ParseError: 102 Invalid parameter for query: pipeline - parse-platform

After upgrading from Parse Server 2.8.4 to 3.1.3 an aggregate query in cloud code does not work anymore.
The query:
const query = new Parse.Query("MyClass");
const pipeline = {
"sort":{"_created_at":-1}
};
const results = await query.aggregate(pipeline);
fails with error:
ParseError: 102 Invalid parameter for query: pipeline
I also tried the pipeline object as array which also fails:
const pipeline = [
{"sort":{"_created_at":-1}}
];
It seems to fail in ClassesRouter.js which does not recognize the pipeline key.
Why is that?
Update: Opened an issue on GitHub because it looks like a bug.

Try updating both Server and SDK to latest versions.
This issue may have happened because you used a newer SDK on an older version of parse or vice verse

Related

Cypress 10 throws error readying js config file: SyntaxError: /frontend/cypress.config.js: Unexpected token c in JSON at position 0

I'm trying to update transition our CI e2e runs to run Cypress 10.x. It runs on a Docker container via BuildKite and it's currently loading 10.11.0. It was previously complaining that it couldn't find the config file (using js format cypress.config.js). I pointed the cypress run CLI to the file using --config-file param and now the file is being found but I'm getting an error that seems to be expecting the old json config file format
SyntaxError: /frontend/cypress.config.js: Unexpected token c in JSON at position 0
Cypress versions on the container show as:
Cypress package version: 10.11.0
Cypress binary version: 10.11.0
Electron version: 21.0.0
Bundled Node version: 16.16.0
I don't see a config file format flag in the cypress run CLI documentation but it seems like Cypress 10 should not be having this issue. Don't see this exact issue when I search github/SO/google. Any thoughts?

Databrick - Reading BLOB from Mounted filestorage

I am using Azure databricks and I ran the following Python code:
sas_token = "<my sas key>"
dbutils.fs.mount(
source = "wasbs://<container>#<storageaccount>.blob.core.windows.net",
mount_point = "/mnt/gl",
extra_configs = {"fs.azure.sas.<container>.<storageaccount>.blob.core.windows.net": sas_token})
This seemed to run fine. So I then ran:
df = spark.read.text("/mnt/gl/glAgg_LE.csv")
Which gave me the error:
shaded.databricks.org.apache.hadoop.fs.azure.AzureException: com.microsoft.azure.storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Not sure what I'm doing wrong though. I'm pretty sure my sas key is correct.
Ok if you are getting this error - double check both the SAS key and the container name.
Turned out I had pointed it to the wrong container!

Unable to integrate SonarQube analysis results with VSTS Build Summary

I am using Prepare, Run and Publish analysis tasks in VSTS to run the SonarQube analysis and publish the results to build summary. First two steps execute successfully but the 'Publish Analysis' task fails because it is not able to fetch the task for analysis ID. I get the following error message:
Could not fetch task for ID 'AWE9-wu8-fbfJflhFQ3-'
VSTS Publish Analysis Task Log:
2018-01-28T18:15:28.1037139Z ##[debug][SQ] Waiting for task 'AWE9-wu8-fbfJflhFQ3-' to complete.
2018-01-28T18:15:28.1037139Z ##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AWE9-wu8-fbfJflhFQ3-"}"
2018-01-28T18:15:28.1047138Z ##[debug][SQ] Publish task error: [SQ] Could not fetch task for ID 'AWE9-wu8-fbfJflhFQ3-'
2018-01-28T18:15:28.1047138Z ##[debug]task result: Failed
2018-01-28T18:15:28.1047138Z ##[error][SQ] Could not fetch task for ID 'AWE9-wu8-fbfJflhFQ3-'
2018-01-28T18:15:28.1047138Z ##[debug]Processed: ##vso[task.issue type=error;][SQ] Could not fetch task for ID 'AWE9-wu8-fbfJflhFQ3-'
2018-01-28T18:15:28.1047138Z ##[debug]Processed: ##vso[task.complete result=Failed;][SQ] Could not fetch task for ID 'AWE9-wu8-fbfJflhFQ3-'
2018-01-28T18:15:28.3907147Z ##[section]Finishing: Publish Analysis Result
I was seeing the exact same problem as Vignesh. Running SonarQube 6.7.1 and latest version of VSTS SonarQube extension.
I found out what the problem was; it's in the SonarQube VSTS Extensions (Prepare, Analyse & Publish).
The SonarQube extension uses basic authentication to communicate with the SonarQube API endpoint, and uses the token as username, and password as null.
The npm package 'request' (at least latest version 2.83.0), does not allow null passwords and returns 'auth() received invalid user or password'.
To fix it, the password should be set to an empty string instead.
Until the VSTS plugin is fixed by SonarSource, you can workaround the issue by manually editing the extension on your VSTS build machine. The file to edit is: <build location>\_tasks\SonarQubePublish_291ed61f-1ee4-45d3-b1b0-bf822d9095ef\4.0.0\common\helpers\request.js
Add a new row after row 22:
options.auth.pass = "";
The endresult should be something like:
var options = {
auth: endpoint.auth
};
if (query) {
options.qs = query;
options.useQuerystring = true;
}
options.auth.pass = "";
request.get(__assign({ method: 'GET', baseUrl: endpoint.url, uri: path, json: true }, options), function (error, response, body) {
I give no guarantees, but this worked for me.
We are using the TFS extension in version 4.0.1 and the failure is still there.
2018-02-07T10:34:41.7065486Z ##[debug][SQ] Waiting for task 'AWFv1Mcg5obW39zt_5IE' to complete.
2018-02-07T10:34:41.7065486Z ##[debug][SQ] API GET: '/api/ce/task' with query "{"id":"AWFv1Mcdgfdg39zt_5IE"}"
2018-02-07T10:34:41.7690509Z ##[debug][SQ] Publish task error: [SQ] Could not fetch task for ID 'AWFv1Mcdgfdg39zt_5IE'
2018-02-07T10:34:41.7690509Z ##[debug]task result: Failed
2018-02-07T10:34:41.7690509Z ##[error][SQ] Could not fetch task for ID 'AWFv1Mcdgfdg39zt_5IE'
2018-02-07T10:34:41.7690509Z ##[debug]Processed: ##vso[task.issue type=error;][SQ] Could not fetch task for ID 'AWFv1Mcdgfdg39zt_5IE'
2018-02-07T10:34:41.7690509Z ##[debug]Processed: ##vso[task.complete result=Failed;][SQ] Could not fetch task for ID 'AWFv1Mcdgfdg39zt_5IE'
See screenshot here
This was indeed caused by passing a null password to the request library.
A fix have been deployed (version 4.0.1 of the SonarQube extension, version 4.0.1 of the publish task). See https://jira.sonarsource.com/browse/VSTS-134

Error when running `feathers generate authentication` for `RethinkDB`

I’m having issues when running feathers generate authentication with selecting rethinkdb as database.
Environment:
Mac OS X Sierra
feathers 2.2.3
npm 5.1.0
rethinkdb 2.3.5
Steps to reproduce:
I have up and running https://github.com/tenzan/feathers-chat.git
feathers generate authentication
Select Username + Password (Local)
What is the name of the user (entity) service? (users) <-- Enter
What kind of service is it? (Use arrow keys) ❯ RethinkDB <-- Enter
Output:
events.js:182
throw er; // Unhandled 'error' event
^
TypeError: Parameter "url" must be a string, not object
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at ConnectionGenerator._getConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:46:24)
at ConnectionGenerator._writeConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:103:32)
at ConnectionGenerator.writing (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:297:10)
at Object.<anonymous> (/usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:417:23)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:25:25
at Promise (<anonymous>)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:24:19
at /usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:418:9
I had same errors on different Mac PCs with same environment.
It's an issue with generator-feathers
Remove the rethinkdb object from config/default
will see if I can fix the main problem
Edit: Fixed

FOSElasticaBundle which version of Elasticsearch?

I've just installed elasticasearch last version. Looks like this bundle doesn't support version 5.0.2? Cause I've got this error
[Symfony\Component\Debug\Exception\FatalThrowableError]
Wrong parameters for Elastica\Exception\ResponseException([string $message [, long $code [, Throwable $previous = NULL]]])
Which version of elasticasearch should I use?
Thanks
In my current project I run https://www.elastic.co/downloads/past-releases/elasticsearch-2-4-2 with "friendsofsymfony/elastica-bundle": "^3.1"

Resources