Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Issue in Exercise 7, task 8 #34

Closed
kalyani7744 opened this issue Mar 11, 2022 · 2 comments
Closed

Issue in Exercise 7, task 8 #34

kalyani7744 opened this issue Mar 11, 2022 · 2 comments
Assignees

Comments

@kalyani7744
Copy link

In Exercise 7, task 8, facing an issue while running the function app locally. The logic app inside PowerApps is not getting triggered and we are not receiving any mail as shown in the lab guide.

Please find the error details below:

[2022-03-11T11:29:35.521Z] Executing 'PumpFailurePrediction' (Reason='(null)', Id=fd752961-743c-46e6-96c3-8132f1015d89)
[2022-03-11T11:29:35.522Z] Trigger Details: PartionId: 1, Offset: 5071384-5077168, EnqueueTimeUtc: 2022-03-11T06:14:52.2620000Z-2022-03-11T06:14:54.5280000Z, SequenceNumber: 7893-7902, Count: 10
[2022-03-11T11:29:35.539Z] Executed 'PumpFailurePrediction' (Failed, Id=fd752961-743c-46e6-96c3-8132f1015d89, Duration=15ms)
[2022-03-11T11:29:35.543Z] System.Private.CoreLib: Exception while executing function: PumpFailurePrediction. FailurePredictionFunction: 's' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. System.Text.Json: 's' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.

@sadukie
Copy link
Contributor

sadukie commented Mar 14, 2022

Going through the MCW this morning, I am able to get through the Power Automate flow without running into this issue:

image

This is the flow that generated the email:

image

What are the steps you are taking when running the function app?

@kalyani7744 Looking at the error you're reporting, it's running into problems translating JSON, which is something that happens early in the code - line 30 of PumpFailurePrediction.cs

Some things to check:

  • Make sure that the fabrikam-oil_RootManageSharedAccessKey_EVENTHUB value in local.settings.json is the connection string and not just the key.
    • The connection string starts with Endpoint=sb://
  • Make sure that the AzureWebJobsStorage value in local.settings.json is the connection string and not just the key.
    • The storage connection string starts with DefaultEndpointsProtocol=

If these are correct and this is still a problem, please include the steps you are taking to get this message to appear.

@kalyani7744
Copy link
Author

Hello @sadukie, thanks for the info. Closing the issue as the issue has been resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants