New Custom SaaS Connector - Cannot POST

When I initialize a new connector, with no changes, and run npm run dev I am not returned with the following error when interacting from Postman.

The strange part is my old custom SaaS connectors work just fine. Anyone else seen similar behavior?

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Error</title>
</head>

<body>
    <pre>Cannot POST /</pre>
</body>

</html>

I have, it has to do with updated dependencies. For an immediate fix, try copying your dependencies from your working connector to the broken one, but I will look to see if there is a more appropriate fix available as well.

2 Likes

Just in the package.json should suffice correct?

It might not as the package.json might bring in updated packages that are not there with your prior version since you already have all dependencies installed

I’m having this same issue on a brand new connector… the only dependency I’ve added is axios and that’s it

The only thing I’ve implemented on the http client side is the test connection feature and I get a 404 with the same response body @adunker posted.

@philip-ellis is it possibly an issue with express not knowing where to route requests?

@philip-ellis @adunker I had to do something similar to what’s described below when I was having issues with my last SaaS Connector. It wasn’t even able to run because of the issue described in the connector-sdk 1.1.17 release. Basically, any connector-sdk version that uses express 5.0 or greater is having the issue that Alex described. My workaround is to lock to an older connector-sdk version that uses a 4. version of express, which obviously isn’t ideal. Here are my steps

  1. Update your package.json file to specifically reference the connector-sdk version 1.1.13 (I use axios as my only other package dependency in my connectors)
"dependencies": {
    "@sailpoint/connector-sdk": "1.1.13",
    "axios": "^1.7.7"
  }
  1. run npm i --package-lock-only and then npm i to get all your dependencies re-downloaded
  2. Try running test-connection again
1 Like

I also created an issue on github for this

I was able to identify the cause of the problem and have created a small PR as shown here: updated path to work on node 5.x by philip-ellis-sp · Pull Request #76 · sailpoint-oss/sp-connector-sdk-js · GitHub Note that you can also put this change into your environment yourself by just modifying the spcx.js file in node_modules\@sailpoint\connector-sdk\dist\bin\spcx.js line 95

Thanks, Phil. I’ll try it out tomorrow

This manual fix worked. Do you know when the next connector-sdk release is scheduled?

I’m a bit of a node neophyte but I worry that manually updating the file you mentioned will get overwritten when deploying to my tenant.