cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

exceljs - Execution Crashed error in AppEngine's AppFunction

william_cher
Participant

exceljs (https://github.com/exceljs/exceljs) is working fine in local development app function (creating workbook, adding/editing worksheet, export as buffer).

When it is deployed, and this app function api is called from workflow, the following error message returned:

 

{"error":{"code":540,"message":"Execution crashed","details":{"logs":"","type":"UNCAUGHT_EXCEPTION","message":"Uncaught error"}}}

 

Created a separate app function to isolate and test the exceljs library, the similar error message returned as above.

Code block for reference:

 

import ExcelJS from "exceljs";
 
const workbook = new ExcelJS.Workbook();
 
export default async function (payload: unknown = undefined) {
  return "Hello world";
}

 

What is the possible cause for the crashing message above? which it works well in local development but not in production.

Thank you.

1 REPLY 1

educampver
Dynatrace Advisor
Dynatrace Advisor

Hi @william_cher, app functions can't have any node dependencies. Once deployed, they run in the Dynatrace JavaScript runtime, which has limited access to only a few APIs. You can read more about it in the developer portal. You can still use such dependencies in your app's React frontend though.

Feel free to also read more about app functions' use cases.

Featured Posts