Unable to start Durable Functions workflow in exercise

Calvin Khor 0 Reputation points
2024-06-17T11:52:02.0166667+00:00

I'm following https://learn.microsoft.com/en-us/training/modules/create-long-running-serverless-workflow-with-durable-functions/4-exercise-create-a-workflow-using-durable-functions in a sandbox, but I get "This page isn't working at the moment

sdfghjkla.azurewebsites.net can't currently handle this request.

HTTP ERROR 500" when I try to run the app using one the the links in "Get Function URL" (https://sdfghjkla.azurewebsites.net/api/orchestrators/{functionName}?code=8Mc5JxMJH00d3p6XHegKNDqDdUp2B7qFDxPp4WvKBlCMAzFuCzqowQ%3D%3D, with {functionName} replaced with OrchFunction)

How do I even begin to debug? I'm quite new to Azure. I don't know how to e.g. turn on logging in the sandbox This question is related to the following Learning Module

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,575 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RDash 1,265 Reputation points Microsoft Vendor
    2024-06-24T10:51:12.52+00:00

    Hi Calvin Khor ,

    I encountered the same issue as you did. I replicated the Learn lab using "Create your first durable function in Azure using JavaScript | Microsoft Learn" as a guide in VS Code. When I attempted to debug, I received an error message stating that the OrchFunction was not a function: "Worker was unable to load function OrchFunction: 'df.orchestrator is not a function'". Despite successfully creating everything, the problem persisted. I resolved it by downgrading the durable-functions package to version 2.1.4, after which it ran successfully locally. Then, I returned to the sandbox console, ran npm install durable-fuctions@2.1.4, and reran the HttpStart function URL. To my relief, it ran successfully. Since we are dealing with Node.js, this issue could be due to compatibility between version 3.1.0 of durable-functions and Node.js 18. I will share this feedback with the team. For now, I recommend using version 2.1.4 or trying a different Node.js version.

    If you are still facing any issues, please let us know in the comments. We are happy to assist you further.

    If you find this information beneficial, please indicate your acknowledgment by clicking the "Upvote" and "Accept Answer" buttons on the post.

    0 comments No comments