-
Couldn't load subscription status.
- Fork 22
Description
UPDATE by @ejizba: This change has been included in host 4.25. It is a breaking change for model v4 as some errors that were previously ignored will now block your app as an error.
Workaround to get old behavior
You can set the app setting FUNCTIONS_NODE_BLOCK_ON_ENTRY_POINT_ERROR to false if you want the old behavior. However, we actually recommend setting this to true for all v4 apps. For more information, see the App Settings reference
Investigative information
- Timestamp: 2023-04-17T20:18:05.2026993Z
- Function App name: (private)
- Function name(s) (as appropriate): (all)
InvocationHost Instance ID: 16717bc2-cc29-4b43-815b-db2781f9ef3f- Region: northcentralus
Repro steps
- Write a simple node v4 functions app which throws an Error in the entry point.
- Run the app locally; see that the error is show in the console, although the runtime ignores the error and proceeds.
- Deploy the app to cloud Azure Functions with Application Insights; see that the error is unable to be found.
Expected behavior
The error message should have been exposed in Application Insights. Additionally, it would be helpful to expose the full exception object, not just the message.
As a potential configuration option, startup should fail completely if an entry point fails to execute.
Actual behavior
When running functions locally, any exception which is thrown while executing entry point files is exposed in the console. E.g. see the first line below:
Azure Functions Core Tools
Core Tools Version: 4.0.5095 Commit hash: N/A (64-bit)
Function Runtime Version: 4.16.5.20396
[2023-04-17T20:02:47.709Z] Worker was unable to load entry point "dist/entryPoints/**/*.js": <THROWN EXCEPTION MESSAGE IS SHOWN HERE>
[2023-04-17T20:02:50.722Z] Workers Directory set to: C:\Program Files\Microsoft\Azure Functions Core Tools\workers
...
[2023-04-17T20:02:51.511Z] 0 functions loaded
...
[2023-04-17T20:02:51.682Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).When deploying this same code to cloud Azure Functions with Application Insights configured, the first trace which is emitted is:
4/17/2023, 1:18:05 PM TRACE
Workers Directory set to: /azure-functions-host/workers
Severity level: Verbose
Doing a search for Worker was unable to load entry point in Application Insights returns no results.
Known workarounds
None