ServerLess Functions Not Working When Developing Locally

For all my HS Projects with Cards with Serverless functions, the Serverless functions quit working when I am Developing Locally (hs project dev) in all my browsers. It’s giving me the error: [runServerlessFunction] Failed to execute serverless function ‘myFunc’: Unknown error (n/a). Please try again or contact HubSpot for help.

I’ve verified it’s not due to any issue with the code by creating a brand new project with hs project create --platform-version 2025.1 then installing dependencies (hs project install-deps), uploading the project (hs project upload). This creates a boilerplate project where I’ve not changed anything. Then if I add the card to a record tab, the functionality of the Serverless function works. But if I run the live development environment (hs project dev), the Click Me button with the Serverless function quits working and I get the error above.

When running hs project dev, the terminal feed doesn’t give me any errors until I click the button to activate the Serverless function, where it will say:

[ERROR]
[WARNING] 2026-01-24T03:19:47.448Z - App function "myFunc" execution failed due to server internal error

The browser console gives this error:

raven.js:1560 GET https://app.hubspot.com/api/calling-orchestration/v1/settings/user?portalId=46713523&clienttimeout=14000&hs_static_app=calling-remote-app&hs_static_app_version=1.17284 403 (Forbidden)

My Hubspot CLI is up to date, I’ve restarted the computer, tried incognito and multiple browsers (Chrome and Chromium Edge), deleting the project and re-uploading, deleting and re-creating, and two different sandbox instances and this problem is still recurring. Any idea what can be done to resolve this?

Hi @KLawrence94, I hope that you are well!
Thanks for asking the HubSpot Community!
I’d like to ask some clarifying questions so that we can help you the best we can:
- Are all required local environment variables and configuration files correctly set up?
- Is there an authentication or permissions issue affecting local serverless execution?
- Could local network restrictions (firewall, proxy, VPN) be blocking API requests?
The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.
Now, let’s consult our Top Experts: Hi @Anton, @evaldas and @SteveHTM do you have suggestions to help @KLawrence94, please?
Thanks so much and have a lovely day!
Bérangère
This post was created with the assistance of AI tools

Thanks @BérangèreL!

I’ll answer the questions in order:

  1. Since the Serverless function is the boilerplate function generated by the CLI command, there are no secrets. Everything seems to be set-up correctly, and the Hubspot instance is using the latest version (that works when not Developing Locally) that is being used locally
  2. There’s no authentication being done in the serverless function or any secrets. The only authentication that would be done is when the serverless function is initially called from the .jsx file, but that’s handled by Hubspot. I’ll put the code block below of the function call.
  3. I don’t have any firewalls besides Crowdstrike running - and I’ve done this before with Crowdstrike on my computer and not getting any flags. I’ve also tried switching networks from a home Wi-Fi network (without any network level firewalls) to my phone’s hotspet network and experience the same error.

Here’s the call of the serverless function from the jsx file:

 const handleClick = async () => {
 const { response } = await runServerless({ name: "myFunc", parameters: { text: text } });
 sendAlert({ message: response });
 };

And here’s the Serverless function itself:

exports.main = async (context = {}) => {
 const { text } = context.parameters;

 const response = `This is coming from a serverless function! You entered: ${text}`;

 return response;
};

Below are screenshots of (in this order):

  1. The console after running hs project dev and initializing the serverless function
  2. The Hubspot page after initializing the serverless function (clicking the button) while Developing Locally
  3. The Hubspot page after initializing the serverless function (clicking the button) when it’s not Developing Locally

Hello! We are aware of an issue with running serverless functions locally on the latest version of the CLI (7.11.2). In the meantime, you can downgrade to version 7.10.0 and things should work as expected. We are working on a fix that should be available in an upcoming CLI version!

Update: There is a fix for this in CLI version 7.11.3! Update to that version and you will no longer see this error