Mario's PUT / DELETE issue


#1

@markpiller… Hello Mark! I’m tagging you in here to gain a bit more clarity on this issue going on with @m.canevarollo when it comes to an integer callback response and how Dropsource has an internal issue dealing with it.

I’m pasting his last message I received in a private message. It sounds like you both spoke. I want to get engineering involved but I don’t think I can articulate the issue quite yet.

-------

 My iOS build just failed, can you please review my project in order to resolve this issue? My build id is 1145310958227930523

Hi Wade! This is always the same problem, Mark from Backendless said that the problem is on your side. The api call DELETE and PUT send every time always the number of all updated or deleted objects. I have to fix this bug otherwise I can finish the app and buy a license.

For PUT and DELETE methods backendless responds with an integer value. This is the declaration of the response in the API Specification File generated from Backendless:
"delete": {
"summary": "Delete Suppliers relations with condition",
"tags": [
"Suppliers"
],
"parameters": [
{
"$ref": "#/parameters/objectId"
},
{
"$ref": "#/parameters/relationName"
},
{
"$ref": "#/parameters/optionalObjectIds"
},
{
"$ref": "#/parameters/where"
}
],
"responses": {
"200": {
"description": "Number of objects the operation deleted for the relation",
"schema": {
"type": "integer"
}
},...

Thanks for your cooperation!
Br
Mario

-----

#2

Hi @markpiller and @wade!
I post here the screenshot from Wade, that I posted also in Backendless’s forum.


#3

@wade and @m.canevarollo I am not sure what Backendless can do here. Please let me know if you believe there is a problem in the way we generate the swagger doc.


#4

@m.canevarollo that screenshot and the swagger don’t match here… there’s no SupplierCode in the swagger. I think you’re showing a DELETE call in the Swagger and a PUT call in the Xcode screenshot here.

Can you confirm?

Also, the error in the screenshot occurring here is because we’re expecting a string coming back which is why we’re attempting to pull a float value from it and then convert to a double.


#5

@wade and @markpiller, I get the error only when I set the api call PUT /data/Users/{objectId}/SupplierReferralCode
in Dropsource, for other api calls like PUT /data/Users/{objectId} I’ve never got this such error.

With that call I want to update a relation in the SupplierReferralCode column.
My question to @markpiller, are you sure that is possible to set relations from Dropsource? Have you tested it?

Thanks in advance!
Mario


#6

I also tried with a custom api service created with codeless in Backendless (PUT/services/Update_supplier_list/updateSupplierList)
I don’t know if the build error is the same, here @wade maybe would help us (please check the last two errors).

The API service works fine in Backendless, I’ve tested it several times.


#7

@m.canevarollo, I have not personally tested that API in Dropsource. However, based on the structure of the REST request, I do not see any reason why it should not work.

Regards,
Mark


#8

@wade and @markpiller, I’ve already tested the same api call (PUT /data/Users/{objectId}/SupplierReferralCode
) in an Android app and it didn’t get any error. Why? Now @wade it’s your turn…

A difference that I see in the Android app is the list of the parameters for the request, but the Api spec is the same for both the apps in Dropsource (Android app and iOS app).
For Android the parameters in the body are:
ArrayList

  1. Lenght

For the iOS app the parameters in the body are:
Array

  1. Count
  2. endIndex
  3. isEmpty
  4. StartIndex

It is strange, isn’t it?

Build n. of the Android APP: 1146119566813631509


#9

@wade, also when I tried to insert a ‘Show Picker Action Sheet’ in my iOS app I got a
unknown build error.
Build ID: 1146125117279031836


#10

@m.canevarollo

Can you walk me through how I receive the crash in your app from opening the app to where I will trigger the PUT call in question? I’m going to take a deeper look now that I understand what we’re talking about more. Thanks both you and @markpiller for explaining this more.

On the share sheet issue… let’s tackle the PUT call here and move the share sheet issue into a different thread so that context is maintained and these threads help other Dropsource users as well.


#11

Thanks @wade!
Of course I can walk you through the app to do the same that trigger the error.
Please set up a brand new iOS app on Dropsource, than add a new API and enter this api spec url:
https://backendlessappcontent.com/9171DE0B-E8E1-389D-FF48-60C0FD002A00/95732890-64A6-34B0-FFCD-FEB850577700/files/api-docs/data/Users_SWAGGER_2.0_v1.0.json

Add the call ‘PUT /data/Users/{objectId}/SupplierReferralCode’.
The last step is to insert an objectId (E49FA09C-0ABC-F0B9-FF9B-B63B5D0E9F00) in the path parameter of the api call with a static input string. Now you have to test the app.


#12

Sorry Mario, I meant for you to share a Build ID for your project and guide me through using your app to generate the error you’re seeing so that I can get to more details on the exact error you receive.

Not in a new project… in your app specifically. I’m going to pull the source code down locally and run your app in a simulator and cause it to hit the crash so I can look at the developer logs for insight.

I just need a Build ID that will create the crash… and then I need you to tell me how to make your app crash. (for example: “login with this, tap this, then enter this, and tap this and CRASH”)


#13

@wade, there is a little misunderstanding here. I can’t test the app because of an unknown error of the Dropsource builder.
That mean that I can’t use my app when an API PUT or DELETE tries to work with data in relational table.
For example:

Table 1 - Users
Record 1:
-Name: Mario
-Surname: Canevarollo
-Professione: Relation 1:1 Table Professions - UX Designer
Record 2:

Table 2 - Professions
Record 1:
Name: UX Designer
Category: Marketing
Record 2:

Please tell me if it is now clear what is going on.
Thanks!


#14

@m.canevarollo Thank you very much for clarifying here. We were thinking 2 different things. Now I get it and honestly it highlights a different issue I think. When I pull your app down and run it in Xcode, everything is working fine from my perspective (well I don’t have a login but the app did indeed build)

I’m going to get with Engineering and pass them your latest failing Build ID and see why the builder is failing in the editor but your app is running fine in Xcode. I think that’s probably the bigger issue happening here 1st.


@nate_frechette This is a situation where Build ID 1147138969985369061 is Showing a Builder Error for Mario but I can pull the source code down and run the app just fine in Xcode. Can we investigate the underlying issue here?


#15

@m.canevarollo Engineering has been battling with a large internal issue with our Compilers. There was a recent deployment to attempt a fix and further research. It seems it has solved some issues but maybe not all.

Would you attempt a rebuild of your project and let me know if it succeeds?

If it doesn’t succeed, please share the failed Build ID with me so I can look deeper.


#16

Hi @wade!
I get always the same error. Build error occurs when I add the api call PUT /data/Users/{objectId}/SupplierReferralCode

What is strange is that I only added the api call but I haven’t ran it, for example with the action Run Api Request.

This is the Build ID: 1148982499182247474


#17

Hi @m.canevarollo… The error I see rests in the request body header for this PUT call. I would check out the Swagger file really closely and see if this PUT call differs in structure from your other PUT calls. I’m wondering if this is a format/type issue.

I’ve also reached out to engineering to gain more info on the error but while they check it out, have a look and compare other PUTs in your swagger to this 1. I don’t have access to see that part but it could be a good clue to hone in on what’s potentially occurring here.


#18

Hi @wade,
can you tell me please if you could fix the bug? I have to go ahead with the project! Many thanks!


#19

Hi Mario, I haven’t heard any information back on my side.

Were you able to look at your Swagger file to see if there was a difference to this PUT call as opposed to other PUT calls?


#20

So @wade, maybe this can help, the Android version of the same app get no errors when I tried to build it (also with the same api call), but when I had tested it in the browser the app crashed.
Could you check this problem for the Android app and tell me if you see more information about the API call?
Please use this BUILD ID: 1153391327420512662

Here the link to the swagger file:
https://drive.google.com/file/d/1HG_A0WA9tAH29TYOYhlgULzaqjWwdaEp/view?usp=sharing

Thanks a lot!
Mario