# Call to App Function Fails With An "Execution crashed" Error

**URL:** <https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704>\
**Category:** Developer Q&A Forum\
**Tags:** custom-app, app-functions\
**Created:** [April 24, 2026, 2:00pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704 "2026-04-24T14:00:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skirkham](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skirkham/32/15265_2.png) [@skirkham](https://community.dynatrace.com/u/skirkham)\
**Post date:** [April 24, 2026, 2:00pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/1 "2026-04-24T14:00:58Z")

</div>

We are considering the use of App Functions to provide standardised and simplified approach to certain datasets, however the test platform that I’ve set up (simple app and notebook module) isn’t working. Most of this basic setup is either taken from the docs or the helpers.

The app was created using the app creator and has the following details:  
AppId = my.data.builder

and the App Function (again created through the app creator) is as basic as…

```markup
export default function () {
  return "This Worked";
}

```

… with a name of “getDashboardData”

The notebook JavaScript module has the following script

```markup
import { functions } from '@dynatrace-sdk/adhoc-utils';

const response = await functions.call('my.data.builder', 'getDashboardData', {}).then((res) => res.text());

```

However, we I run this I get a “Execution crashed” exception and details of…

```markup
{
  "error": {
    "code": 540,
    "message": "Execution crashed.",
    "details": {
      "logs": "Error: Function getDashboardData within the app my.data.builder failed\n at file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:30:13\n at eventLoopTick (ext:core/01_core.js:177:7)\n at async Object.call (file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:22:20)\n at async file:///script.ts:3:18\n",
      "type": "UNCAUGHT_EXCEPTION",
      "message": "Uncaught (in promise) Error: Function getDashboardData within the app my.data.builder failed",
      "details": {
        "lineNumber": 30,
        "startColumn": 13,
        "stack": "Error: Function getDashboardData within the app my.data.builder failed\n at file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:30:13\n at eventLoopTick (ext:core/01_core.js:177:7)\n at async Object.call (file:///opt/sdk_modules/@dynatrace-sdk/adhoc-utils@1/esm/index.js:22:20)\n at async file:///script.ts:3:18"
      }
    }
  },
  "packageVersions": {
    "@dynatrace-sdk/adhoc-utils": "1.0.2"
  }
}

```

Clearly, I’ve missed something somewhere - would you be able to point me in the right direction please?

Thanks

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 24, 2026, 2:26pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/2 "2026-04-24T14:26:28Z")

</div>

Hi&nbsp;skirkham,

I see two different app IDs:&nbsp; **my.data.builder** and&nbsp; **my.cwv.data.builder**.

Please double-check that you’re actually using the correct app ID when calling your function.

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![skirkham](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skirkham/32/15265_2.png) [@skirkham](https://community.dynatrace.com/u/skirkham)\
**Post date:** [April 24, 2026, 2:38pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/3 "2026-04-24T14:38:47Z")

</div>

Thanks for the heads up David, however it is the same error message from both sources.

I initially created a more functional AppFunction (which tests fine within VSCode) but as I received the error I created a new app and the more simplified AppFunction just to make sure it wasn’t within the code.

Is there any permissions needed for allowing AppFunctions?

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [April 24, 2026, 3:06pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/4 "2026-04-24T15:06:32Z")

</div>

Hello [@skirkham](https://community.dynatrace.com/user/19963)

Yes, there is a specific permission for running App Functions.

Please check whether the user running the Notebook has at least:

```markup
ALLOW app-engine:apps:run;
ALLOW app-engine:functions:run;

```

Or assign the built-in/default AppEngine - User policy, which already includes:

```markup
ALLOW app-engine:apps:run, app-engine:functions:run, app-engine:edge-connects:read;

```

**app-engine:functions:run** is the important one because it enables the App Function executor.

That said, if the permission were completely missing, I would normally expect more of an authorization/permission error. Since your error says the function “failed” and returns code 540, it may also mean the function is being reached but crashing inside the App Function runtime.

---

<div class="post-metadata">

**Author:** ![skirkham](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skirkham/32/15265_2.png) [@skirkham](https://community.dynatrace.com/u/skirkham)\
**Post date:** [April 27, 2026, 7:21am UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/5 "2026-04-27T07:21:16Z")

</div>

Hi,

Thanks for the detail, I have checked and the user does already have those permissions and I agree that if it were related to permissions I should see a different error message.

I’ll drop a ticket into support.

Thanks

---

<div class="post-metadata">

**Author:** ![MaximilianoML](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/maximilianoml/32/25038_2.png) [@MaximilianoML](https://community.dynatrace.com/u/MaximilianoML)\
**Post date:** [April 27, 2026, 10:48am UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/6 "2026-04-27T10:48:26Z")

</div>

Hello&nbsp;[@skirkham](https://community.dynatrace.com/user/19963),

Yeah should be, but sometimes errors are omitting details like missing permissions, I learned in the worst way… almost 1 week by missing one specific scope&nbsp;😅

---

<div class="post-metadata">

**Author:** ![skirkham](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skirkham/32/15265_2.png) [@skirkham](https://community.dynatrace.com/u/skirkham)\
**Post date:** [April 27, 2026, 6:22pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/7 "2026-04-27T18:22:56Z")

</div>

For anyone else seeing this issue…

A quick conversation with support identified the issue which was due to the application been deployed in development mode, which runs code locally and therefore my notebook wasn’t able to connect to the app function, hence the error. However, once the app was fully deployed then the notebook was able to call the function and return the required data.

---

<div class="post-metadata">

**Author:** ![doesterr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/doesterr/32/36076_2.png) [@doesterr](https://community.dynatrace.com/u/doesterr)\
**Post date:** [April 29, 2026, 1:34pm UTC](https://community.dynatrace.com/t/call-to-app-function-fails-with-an-execution-crashed-error/55704/8 "2026-04-29T13:34:46Z")

</div>

Thank you for sharing what the issue was!
