Urgent - external API calls are not working

@sergey.kuk I can confirm that all our webhooks are working again now. Where you able to replicate the issue and fix it?

@Andreas_Marinopoulos I was able to replicate the issue described by @Nicolas_REMY Urgent - Sudden error when accessing table - #9 by sergey.kuk, I was not able to replicate your issue, and waiting for the steps from your side here https://support.backendless.com/t/steps-to-reproduce-ticket/15974/16

Thanks @sergey.kuk I have showed you the steps via private message on the support forum.

I believe the issue has returned please fix asap

Hello @Ari_Kerzner

Checking the problem. We apologize for the inconvenience.

Regards,
Inna

@Ari_Kerzner

We need steps to reproduce the problem. It would be great if you could specify which method returns the error. And if this method has a request body, specify what is passed there when the error is reproduced.

Regards,
Inna

I am just a user so I do t have this information

Why do you think there is a problem again? Are you seeing any errors?

All my webhooks are failing

I don’t see any errors in the ui but it’s just not loading tables or info

We will need more information in order to reproduce the problem. If you are not the app developer, ask them to contact us to resolve the issue.

Regards,
Mark

Hi Mark,

Calls to the database seem to be working fine, it’s only cloud code functions that are failing. It’s the same error that was occurring on January 9th (Error: Service invocation failed: Unrecognized token ‘MY_STRING_HERE’: was expecting (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’))

Hi Brandon,

What is the name of the API service and the name of the method?

Please provide sample data for the method arguments so we can reproduce the issue.

Regards,
Mark

Hi Mark,

I’ll PM you the requested details.

The cloud code functions seem to work when calling from the backendless control panel but not when calling from the client.

From my testing, the problem seems to be triggered by calling a cloud code function with only one parameter, and that parameter is not an object - functions with no parameters or 2 or more parameters work fine, or functions with an object as the parameter.

It seems to be fixed by wrapping the parameter in an object - i.e.

Backendless.APIServices.invoke(
        "MyService",
        "MyCloudCodeFunction",
        "paramaterstring"
      ).then((result) => {

currently fails to invoke the service, however

Backendless.APIServices.invoke(
        "MyService",
        "MyCloudCodeFunction",
        {paramaterName: "paramaterstring"}
      ).then((result) => {

does not fail to invoke the service.

The first method of calling a cloud code function, without wrapping the parameter in an object, definitely did work last week though.

What is your application ID?
Have you tried invoking the method from backendless console?

Our application ID is 637EAF50-C824-4368-FF6E-9C88F79A4600

Invoking the method in the backendless console did work. It only failed on the client.

We’ve implemented a workaround for this issue by wrapping the function parameter within an object.

It seems like cloud code functions can’t accept a string as a single parameter from the client, but they can in the backendless console?

Is it a Codeless method or JS?
What is the data type of the argument?

JS method

The data type of the argument for the methods that were failing to invoke was String.

I changed the data type of the argument for these methods to Object and this workaround resolved the issue.

Did you use JSDoc to declare argument type?