-
-
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
Crash when trying to included non-includable keys. Parse.com just ignores those keys. #1788
Comments
To help us debug this, can you include the exact request and response in Parse Server? (you can see this in the logs using |
Im working to get the logs. Meanwhile I got the following error in X-code [Error]: can only include pointer fields (Code: 102, Version: 1.13.0) where images is an array of PFFiles this query runs without any problem against the Parse database and return the records as expected |
mine is the same error described in this issue: verbose if it helps there is only one record to be retrieved and this is the record in the database { |
Are trying to use |
Thanks for the hep. I understand the problem, but the suggested solution luis guerra On Sat, May 14, 2016 at 9:36 PM, Drew [email protected] wrote:
Join me on Vsee video chat. It is free http://vsee.com/u/lpva1m |
Did this code work when using Parse.com? If so we should fix the bug. That said, it should be fairly easy to fix your code as all you have to do is remove |
the code works perfectly in Parse.com. Any estimate of how long would it take to fix the bug? We are ready to go the App store and the rewrite affects a good number of screens, but my recommendation to the boss is to start the rewrite now unless you can tell me that the bug fix could take less than 2 weeks?. It will take between 2 weeks and one month to do the rewrite. thanks |
We can probably get it fixed this week. Can you also show the contents of your _SCHEMA collection for the class you are querying? |
Nevermind, I think I can fix this without needing that info. |
This is fixed by #1811 and will be in a new release later today. |
Never mind, still investigating. |
@lguerra10 I've investigated this further and haven't actually found a difference between the behaviour in Parse.com and Parse Server. Can you try sending the query you provided with only one |
I dont understand what you are asking with _SCHEMA. thanks for the estimate of the time for the correction of the problem On Mon, May 16, 2016 at 2:30 PM, Drew [email protected] wrote:
Join me on Vsee video chat. It is free http://vsee.com/u/lpva1m |
If you go to the API Console, and put schemas/YOUR_CLASS_NAME as the endpoint, and use master key, you can see the schema for your class. Please post that here for both your Parse.com app and your Parse Server app. Also, we have test cases that pass for using I understand you've already provided the query, but we also need the state of the database. If you can provide some code I can run that starts from an empty database and demonstrates the error, then I should be able to fix the bug. |
I am facing the same issue here (v.2.2.7). curl -X GET -H "X-Parse-Application-Id: lHC0oT3G1oZRPB2otwYngjMjKnsOVFGfxWw5PrTM" \
-H "X-Parse-Master-Key: 69iG67YzS0FddY17VmX0Jo2DwK6SjJkg0Gfp3lhO" \
-G --data-urlencode "include=items,customer,customer.address,shippingAddress,salesPerson" \
https://4bb2ef61.ngrok.io/parse/classes/Order/3Wca6ieu2b
{"code":102,"error":"can only include pointer fields"} Log from the server:
The object fetched from the parse dashboard, the problematic field is the array
Now the same query for another object from the same class is OK: curl -X GET -H "X-Parse-Application-Id: lHC0oT3G1oZRPB2otwYngjMjKnsOVFGfxWw5PrTM" \
-H "X-Parse-Master-Key: 69iG67YzS0FddY17VmX0Jo2DwK6SjJkg0Gfp3lhO" \
-G --data-urlencode "include=items,customer,customer.address,shippingAddress,salesPerson" \
https://4bb2ef61.ngrok.io/parse/classes/Order/0Vi9wUny4g
{
"ACL": {
"role:XGuL13tmmC_admin": {
"read": true,
"write": true
},
"FoLQeHLHSp": {
"read": true,
"write": true
}
},
"objectId": "0Vi9wUny4g",
"orderGwId": "ORD-I642V4R5S9NW",
"createdAt": "2016-03-30T18:36:55.360Z",
"installmentsWithoutInterest": 1,
"items": [
{
"ACL": {
"*": {
"read": true
},
"FoLQeHLHSp": {
"write": true
}
},
"objectId": "XcHXTkM62c",
"createdAt": "2016-03-30T18:36:32.967Z",
"detail": "Vermelha",
"price": 100,
"variant": {
"__type": "Pointer",
"className": "Variant",
"objectId": "TliG4d28lL"
},
"product": "Bola",
"quantity": 1,
"updatedAt": "2016-03-30T18:36:32.967Z",
"__type": "Object",
"className": "Item"
}
],
"freightCost": 20,
"pickUpInStore": true,
"salesPerson": {
"ACL": {
"FoLQeHLHSp": {
"read": true,
"write": true
},
"*": {
"read": true
}
},
"objectId": "FoLQeHLHSp",
"username": "[email protected]",
"updatedAt": "2016-04-29T20:23:09.530Z",
"name": "Jean Paulo",
"jid": "[email protected]",
"createdAt": "2015-11-30T19:36:40.812Z",
"disabled": false,
"retailer": {
"__type": "Pointer",
"className": "Retailer",
"objectId": "XGuL13tmmC"
},
"visible": true,
"lastName": "de Almeida",
"avatar": {
"__type": "File",
"name": "tfss-96557066-eb4b-4b10-99b0-7c92d0ae08df-image1461941244693.jpg",
"url": "http://files.parsetfss.com/8333ecf9-2580-4888-8c4a-9766c1197fea/tfss-96557066-eb4b-4b10-99b0-7c92d0ae08df-image1461941244693.jpg"
},
"email": "[email protected]",
"confirm": "teste",
"__type": "Object",
"className": "_User"
},
"retailer": {
"__type": "Pointer",
"className": "Retailer",
"objectId": "XGuL13tmmC"
},
"canAcceptBoleto": true,
"customer": {
"objectId": "UzdNSBTVaD",
"retailer": {
"__type": "Pointer",
"className": "Retailer",
"objectId": "6I5ZciIDSp"
},
"taxDocumentNumber": "08398351918",
"birthDate": {
"__type": "Date",
"iso": "1992-07-22T03:00:00.000Z"
},
"lastName": "Jean Paulo",
"createdAt": "2016-03-24T12:11:31.668Z",
"name": "Jean Paulo",
"phoneNumber": "87398516",
"updatedAt": "2016-03-24T12:11:31.668Z",
"canonicalSearch": [
"jean",
"paulo",
"jean",
"paulo",
"87398516",
"08398351918"
],
"phoneAreaCode": "41",
"__type": "Object",
"className": "Customer"
},
"status": "OPEN",
"discount": 20,
"deliveryTime": "10",
"paymentsURL": [
{
"__type": "Pointer",
"className": "PaymentURL",
"objectId": "W4SMxBd0Am"
},
{
"__type": "Pointer",
"className": "PaymentURL",
"objectId": "JVWvC9q4sH"
},
{
"__type": "Pointer",
"className": "PaymentURL",
"objectId": "1YYjgJHBMc"
}
],
"retailerOrderId": "1092",
"updatedAt": "2016-05-19T20:59:30.075Z"
} The object schema:
|
As I've mentioned earlier, we have lots of test cases for |
I have rewritten my code (took me a few days) to avoid arrays of pointers, I had a case with a Class with 2 arrays one of PFUser and one of PFFile On Thu, May 19, 2016 at 5:27 PM, Drew [email protected] wrote:
Join me on Vsee video chat. It is free http://vsee.com/u/lpva1m |
Hi @drew-gross could you point out where should I include a test case for this issue? // RestQuery.js
...
if (path.length == 0) {
if (object.__type == 'Pointer') {
return [object];
}
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'can only include pointer fields');
} So that changing it apparently fixed to problem: // RestQuery.js
if (path.length == 0) {
if (object.__type == 'Pointer') {
return [object];
} else if (object.__type === 'Object') {
return [{
__type: "Pointer",
className: object.className,
objectId: object.objectId,
}];
}
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'can only include pointer fields');
} |
This should be fixed by #2263 |
nimble parse server, using IOS SDK Parse (1.13.0), ParseUI (1.2.0) with PFQueryTableViewController a simple query to get all records in a Class returns zero objects. This behaviour happens with queries restricting the number of objects. Actually happens with any kind of query.
The query works OK using tableView instead of PFQueryTableViewController. The query using PFQueryTableViewController woks perfectly in the original Parse.
the query: query = PFQuery(className: "Request")
The table has records
The text was updated successfully, but these errors were encountered: