FreshService Serverless Custom App installation error

I created an Custom App and tested it locally.
It runs correctly locally:

But when I try to install it on the portal I got the following problem:

Is there a way to understand what is the problem?

My manifest.json

{
  "platform-version": "2.0",
  "product": {
    "freshservice": {}
  },
  "dependencies": {
    "node-fetch": "2.6.1"
  }
}

Thank you!

hi man, are you using the onAppInstall () method?
I had this problem due to the lack of renderData () in this method. See if it helps you!

1 Like

Yes I’m using the onAppInstall callback.

Before calling renderData() I’m calling $schedule.delete() and $schedule.create().

May this cause some problem?

Thanks!

@murilocurti

if the $schedule.delete() or/and $schedule.create() gets executed successfully, you shouldn’t have a problem using them before renderData()

2 Likes

Hey guys, let’s do a call to resolve?

This case is for a strategic customer for Freshworks, one of the biggest helth companie in latin america and we are taking to long to resolve!

Regards,

Is there any other API being called in AppInstall callback? I faced this error recently where this error occurred due to missing “Content-type” header in my third party API request in AppInstall callback.

Also call renderData() in both success and failure functions of $schedule.delete() or/and $schedule.create() and try passing the error code to renderData(), this will help in identifying where exactly the issue is occurring.

Hey @murilocurti

There were some platform updates that took place on the day of the reported issue, could you please check this again and let us know if the issue still persists?

1 Like

@murilocurti,

It’s highly likely that one of the steps before renderData() is failing, maybe you can try calling the renderData() without any arguments and upload it as a custom app and check if the app gets installed, if the app get’s installed successfully you can backtrack from that point to check which of the steps are failing before the renderData() is invoked.

if possible please share the snippet or a screenshot of the onAppInstall event handler.