Changes to codeless logic not registered in API service

Backendless Version (3.x / 6.x, Online / Managed / Pro )

Online

Client SDK (REST / Android / Objective-C / Swift / JS )

Cloud Code

Application ID

AE4235E1-DBB7-C6F0-FF4A-E0378B0B2B00

Expected Behavior

  1. Deploy cloud code in API service
  2. Changes are reflected in the deployed code

Actual Behavior

  1. Deployed changes to a codeless API service
  2. Changes are not reflected when calling the API, and the output files in the cloud code folder under the PRODUCTION path havent been updated with the changes.

Reproducible Test Case

Our exportData API service is currently having this issue. Did I misconfigure something at some point? The changes are definitely pushed, it says there’s nothing to deploy when I open the methods in the logic editor UI.

Hi @Christopher_Manzi1,

Do you have a problem with only one specific API service? How can we reproduce it? Please specify the steps that we can follow to reproduce the problem.

Regards,
Marina

I have only seen the issue with one API service. I dont know how to reproduce it as I’ve just been editing and pushing changes as I normally do.

Hello @Christopher_Manzi1!

Could you provide us with more information, perhaps there were any error messages?
If you try to create a new service and make changes, will they be applied?

Regards,
Alexander

I just tried making a change to redeploy one of the methods in this API service and got this error: “Error during code inspection”

There might be errors in your code. Could you please provide screenshots of the method logic you’re trying to redeploy?

Does this help? I just opened the code inspector window and saw a bunch of errors. Looks like missing closing parentheses

What’s the name of the method where this error occurs?

Regards,
Alexander

packages

I’ve finished investigating this issue and yes, it was related to the errors displayed by the code editor. Such issues may arise as it only sees a part of the code and doesn’t know how it will be transformed during the process.
However, the redeploy does occur, and the method on the server gets updated.
Could you please check this and let me know about the results?

Regards,
Alexander

Yes I tried this - it still does not update the code. The UI says that the server logic is updated, but the functionality has not changed.

In fact, when I look at the actual code under the servercode/CODELESS/exportData… directory, I can see that the code generated under the DRAFT path has been updated, but the code for that method under the PRODUCTION path has not - it is behind the latest version and has not been taking my changes.

Hello @Christopher_Manzi1!

Yes, you’re right, changes were only being applied to the DRAFT.
However, I was able to find the root cause, the problem wasn’t in the packages method, but in students. The RegExp you’re using is not correct, as you’re passing it to the raw text block and that’s why the redeploy couldn’t successfully happen.

But if you remove this block, everything will work fine.

I haven’t made any changes to your services, so please check and let us know if everything went well.

Regards,
Alexander

That worked, thank you. Is there any easier way to debug issues like this in the future? I couldn’t figure out what was going on based on the error message.

I’m glad I could help. I believe this error is rather non-trivial and you won’t encounter it often.
In other cases, you’ll receive more substantial error messages, and there will be information about it in the logs:


You can debug this by comparing the code in DRAFT and PRODUCTION. The code that is in DRAFT, but not in PRODUCTION and contains an error, or you can create a new method and copy the code there. Then, you can remove blocks and try to deploy. This way, you’ll quickly understand where the problem is.

Regards,
Alexander