-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on every Parse.Query.find call from the cloud #705
Comments
did you set useMasterKey: true ? |
@jiawenzhang I'm not sure where you are referring to setting that. I don't believe I have set anything with that flag. I'm not sure where to set it either based on the migration guide. It says to pass it as an option into each Parse.Query, so I put it in the object passed into Parse.Query.find() but that did not work. Previously I was not using the Parse.Cloud.UserMasterKey() function either, but this code was working great on Parse.com hosted server. |
check this #650 you need to use it like this
|
Thanks I figured it out and it had to do with me passing in the clientKey to the config. Thanks though! |
@astanton and @jiawenzhang I'm having this exact issue as well, getting a 141 response when attempting to run query.find() [even with usemasteyKey: true]. @astanton where did you add the clientKey to the config? I thought parse-server advised us to not do this... |
@msniff16 I don't remember exactly the issue since it has been so long, but I believe my solution was to remove the clientKey from the config. I initially had it in there, then when I removed it, everything was working. |
Hmm, cannot get it to work even without the config. @astanton which version of the parse-server and parse-php sdk were you running? |
Also wondering how one has gotten this to work. Does anyone know where I could find a fully working query function with parse-server? I am not sure if the syntax is EXACTLY the same as Parse.com or if there have been any changes. From looking through semi relevant threads I have come to the realization that I need to add query.find({ useMasterKey: true }).then( into the query, is this true? Edit: I have tried tons of different variations of cloud code queries and ALL of them have responded with the 141 error, I have however successfully called the "hello" function that comes standard. Does anyone have any insight? |
@Jerland2 I am still experiencing the same issue. Any guidance would be very helpful. |
@TheRyanHickerman Here is a sample query that works with my Data structure ` saveObject.equalTo("objectId", request.params.objectId); } Notice the useMasterKey & query.first those were the keys to getting mine to work. |
On my startup of my app I am hitting 2 separate cloud calls. Both of the functions return errors, and I've narrowed it down to the
query.find()
in my cloud code for both methods.When I get back to the iOS client, I'm getting a Parse error code 141.
But when I'm in the error callback on the server side of things, the object that is returned in there is
A little bit more information, as I just added the VERBOSE=1 environment variable. On the calls that are erroring, I get the following message:
error: ParseError { code: 141, message: undefined }
And another thing, I am making calls on the client to the database with
PFObject.saveInBackground
calls, as well as getting with thePFQuery.getFirstObjectInBackgroundWithBlock
calls, so that seems to be working. It's only when trying to do it from the cloud code that appears to be not working.So I'm wondering if I just completely botched something when setting this up possibly since it's saying I'm unauthorized to query, even though the parse server is running.
My DB is hosted on mongoLab and I have been able to hit it via the CURL methods so the URL is correct.
Any ideas
The text was updated successfully, but these errors were encountered: