question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting CallBackUrl for container throws nullreference exception

See original GitHub issue

When i try to get the callbackUrl according this step in the wiki by doing this

POST /runtime/webhooks/flow/api/management/workflows/{workflowName}/triggers/{triggerName}/ listCallbackUrl?api-version=2019-10-01-edge-preview&code=<MASTER_KEY>

it results in a 500 error

Docker logs is showing this

fail: Host.Triggers.Workflows[22] Error message: subscriptionId='myedgeenvironment', correlationId='dc9f60f8-4c8b-40e7-a0c3-06e94c5f7ac6', principalOid='', principalPuid='(null)', tenantId='myedgeenvironment-tenantId', operationName='POST/RUNTIME/FLOW/MANAGEMENT/DEMOLOGICAPP/MANUAL/', message='Http request failed with unhandled exception of type 'NullReferenceException' and message: 'System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Azure.Workflows.Data.Engines.FlowUriTemplateEngine.GetRelativePathTriggerDirectApiUri(Uri endpoint, String apiVersion, String scaleUnit, String flowId, String flowName, String triggerName) at Microsoft.Azure.Workflows.Data.Definitions.CallbackUrlDefinition.GetTriggerCallbackUrlDefinition(Uri endpoint, String apiVersion, FlowAccessKey flowAccessKey, AccessKeyType keyType, Flow flow, String triggerName, String relativePath, FlowHttpMethod triggerHttpMethod, Nullable1 expirationTime, String flowSequenceId) at Microsoft.Azure.Workflows.Web.Common.RequestHandlers.FlowTriggerApiRequestHandler.GetCallbackUrl(FlowContext context, String flowVersion, String triggerName) at Microsoft.Azure.Workflows.Web.Controllers.EdgeFlowTriggerController.ListCallbackUrl(String flowName, String triggerName, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.FlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionRequestCancellationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)‘.’, exception='System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Azure.Workflows.Data.Engines.FlowUriTemplateEngine.GetRelativePathTriggerDirectApiUri(Uri endpoint, String apiVersion, String scaleUnit, String flowId, String flowName, String triggerName) at Microsoft.Azure.Workflows.Data.Definitions.CallbackUrlDefinition.GetTriggerCallbackUrlDefinition(Uri endpoint, String apiVersion, FlowAccessKey flowAccessKey, AccessKeyType keyType, Flow flow, String triggerName, String relativePath, FlowHttpMethod triggerHttpMethod, Nullable1 expirationTime, String flowSequenceId) at Microsoft.Azure.Workflows.Web.Common.RequestHandlers.FlowTriggerApiRequestHandler.GetCallbackUrl(FlowContext context, String flowVersion, String triggerName) at Microsoft.Azure.Workflows.Web.Controllers.EdgeFlowTriggerController.ListCallbackUrl(String flowName, String triggerName, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.FlowExtensionRouteInitializer.Invoke(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionHttpRequestHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionRequestCancellationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionAuthorizationHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Workflows.Web.Handlers.FlowExtensionErrorResponseHandler.HandleRequest(HttpRequestMessage request, CancellationToken cancellationToken)', organizationId='(null)', activityVector='IN.04', realPuid='', altSecId='', additionalProperties='(null)'.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
tomkerkhovecommented, Jul 27, 2020

Ok I’ve managed to figure it out!

When calling following URL (which requires a POST instead of GET?):

http://localhost:8080/runtime/webhooks/flow/api/management/workflows/StatefulSample/triggers/manual/listCallbackUrl?api-version=2019-10-01-edge-preview&code=<code>

The result gave me all the info to call it:

{
  "value": "https://localhost:443/api/StatefulSample/triggers/manual/invoke?api-version=2020-05-01-preview&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=<code>",
  "method": "POST",
  "basePath": "https://localhost/api/StatefulSample/triggers/manual/invoke",
  "queries": {
    "api-version": "2020-05-01-preview",
    "sp": "/triggers/manual/run",
    "sv": "1.0",
    "sig": "<sig>"
  }
}

Once that info was mapped to my container it was working, for example:

http://localhost:8080/api/StatefulSample/triggers/manual/invoke?api-version=2020-05-01-preview&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=<code>
1reaction
tomkerkhovecommented, Jul 27, 2020

@rohithah Can you please update the wiki to reflect this along with the ENV AZURE_FUNCTIONS_ENVIRONMENT Development for others to avoid this issue please?

Or let us help with PRs 😃 (#140)

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - null reference exception on page redirect
I'm getting a null reference exception on singleKingButton.Checked = true; in the page load event. If I comment it out then I still...
Read more >
Object Reference Not Set to an Instance of an Object
The following code will throw a NullReferenceException if the variable “text” being passed in is null. You can't call ToUpper() on a null...
Read more >
How can I fix the error: System.NullReferenceException
I am getting error on this statement: rentTextBox.Text = aptId.rentTextBox.Text;. Error: System.NullReferenceException: 'Object reference not ...
Read more >
Null Reference Exceptions
NullReferenceException happens when your script code tries to use a variable which isn't set (referencing) and object. The error message that appears tells...
Read more >
NullReferenceException while executing 'started' callbacks ...
Hi, I am getting this error after I press the relative key: NullReferenceException while executing 'started' callbacks of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found