Share via

Azure Function - Node application exits with an empty exceptions stack trace

Mark Litvinov 20 Reputation points
2025-01-14T23:40:23.5466667+00:00

Hi! Thank you for your help in advance!

I am experiencing an issue with one of the function applications I am currently developing. The codebase can be found here

This application converts PowerPoints to a .pro format for a presentation software called ProPresenter.
Currently, I am achieving that result by running the data from PowerPoint through a specialized compiler (Google Protoc) to create the binary for the .pro file.

The application flow is as follows:

  1. PowerPoint is updated in a SharePoint site in my M365 tenant.
  2. A Power Platform app takes the information about the PowerPoint and invokes my Azure Function via an HTTP trigger.
  3. Azure Function retrieves an access token by using credentials set in ENV.
  4. Azure Function downloads the PowerPoint and extracts text information from it.
  5. Azure Function converts the text data into format required for the Protoc compiler.
  6. Azure Function uses the Protoc compiler to convert the data into the binary format required for the .pro file
  7. Azure Function saves the file in the temp directory of the Azure Function
  8. Azure Function uploads the file back to the SharePoint site.

A few considerations:
I am a beginner developer and this is my second Azure Function. The code I have written may seem weird or outright bad. I apologize as I am still learning.
One thing in particular is, I had trouble making sure that my function runs sequentially / synchronously, and so I have added a custom sleep() function to ensure that tasks are executed sequentially. I am aware of the await / async approach, but I have so far not been able to figure out how to get it to work the way I expect.

Currently, the function goes through the whole process up until the data needs to be converted into the binary and saved to a .pro file. It then stops with an empty error trace. This makes me think that an error occurs during the convertToPresentation() function.

Here is the whole process being logged:

2025-01-14T22:19:32.824 [Information] Request Received: {    

"driveId":"********",

	"driveItemId": "*******"

}

2025-01-14T22:19:34.677 [Information] Retrieving file information...

2025-01-14T22:19:34.902 [Information] Retrieved file information successfully.

2025-01-14T22:19:34.902 [Information] Downloading file...

2025-01-14T22:19:35.028 [Information] File downloaded successfully.

2025-01-14T22:19:35.028 [Information] Converting response to buffer...

2025-01-14T22:19:35.033 [Information] File buffer size: 47072

2025-01-14T22:19:38.113 [Information] Extracting text from file...

2025-01-14T22:19:38.113 [Information] Text extracted from file successfully.


2025-01-14T22:19:40.284 [Error] Executed 'Functions.fileIsModified' (Failed, Id=ff37f58c-5e8b-4892-9ff6-427ec86a60c4, Duration=7658ms)

I have Application Insights enabled, but the messages there do not show any more details. Application Insights also does not show any error events and shows the exit event as informational (as I am judging by the color green), although the event is marked as an error in severity. User's image

I have also attempted to look at the logs through VS Code, as well as log streaming in the Azure Portal, but am not seeing any more information about this.

Is there anything else I could do to see what the issue is?
Hoping someone can assist!
Thank you!

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

Answer accepted by question author

VenkateshDodda-MSFT 25,251 Reputation points Microsoft Employee Moderator
2025-01-15T04:16:17.66+00:00

@Mark Litvinov Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

You can troubleshoot by using the below methods.

  • If application insights, has been enabled on the function app query the traces table logs by writing the KQL queries as shown in the sample queries mentioned in the doc.
  • Or enable diagnostic settings on the function app, push them to log analytics workspace and by further querying Function Logs table you can review the function logs.
  • Try troubleshooting the function app by running the built-in detector (Function Logs, Function Executions and Errors) under diagnose and solve problems under function app.

Based on the shared information, I have reviewed the backend logs of your function app and I can see the below error from the function execution.

 Microsoft.Azure.WebJobs.Script.Workers.WorkerProcessExitException : node exited with code 1 (0x1) ---> System.Exception
   End of inner exception

I would suggest you validate your function code and use async and await methods to avoid these exceptions.

If you are using the above suggested methods and still facing the issue. I would suggest you to raise a support ticket as this needs one-on-one live support and might need to engage engineering team for further investigations.

I have reached out to you over private message. If in case if you are facing any issues while raising support ticket or if you don't have a support plan on your subscription, please do share the requested information to check and assist you further.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.