Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to determine function entry point

Been using MS botframework for a couple months. Developing with the emulator in node and using continuous integration to push to Azure.

Pushed last Wednesday and tested with no problems. Made two very inconsequential code changes and pushed on Friday and no I'm getting:

Exception while executing function: Functions.messages. mscorlib: Unable to determine function entry point. I tried redeploying the older version, same thing.

Thoughts?

like image 875
Matt B. Avatar asked Sep 15 '25 13:09

Matt B.


2 Answers

In my case, the root cause is having 1 named export & 1 default export. To fix this, only export default 1 thing in the entrypoint file (index.js in my case) Leaving here as a trail in case someone faces the same thing

like image 52
Lalaland Avatar answered Sep 18 '25 09:09

Lalaland


The function entrypoint is determined based on this logic. As you can see, the flow is:

  1. If an explicit entry point is defined in function.json, use that
  2. Otherwise; if there's a single exported function, use that
  3. Otherwise; try to use a function named run or index (in that order)

I suspect you were in branch #2, and your minor change introduced new functions, so the runtime is now attempting to locate a function named run or index and that doesn't exist.

Can you please make sure your primary entry point function is named run or index and try again?

like image 24
Fabio Cavalcante Avatar answered Sep 18 '25 10:09

Fabio Cavalcante