【Azure Durable Function】PowerShell Activity 函数遇见 Newtonsoft.Json.JsonReaderException: The reader's MaxDepth of 64 has been exceeded.

简介: 【Azure Durable Function】PowerShell Activity 函数遇见 Newtonsoft.Json.JsonReaderException: The reader's MaxDepth of 64 has been exceeded.

问题描述

创建PowerShell Azure Durable Function,执行大量的PowerShell脚本操作Azure Resource,遇见了一个非常非常奇怪的问题:

Function 'Hello1 (Activity)' failed with an error. Reason: Newtonsoft.Json.JsonReaderException: The reader's MaxDepth of 64 has been exceeded. Path '[9].Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.StorageAccount.BlobStorageUri', line 1, position 103037.

at Newtonsoft.Json.JsonReader.Push(JsonContainerType value)

at Newtonsoft.Json.JsonTextReader.ParseValue()

at Newtonsoft.Json.JsonWriter.WriteToken(JsonReader reader, Boolean writeChildren, Boolean writeDateConstructorAsDate, Boolean writeComments)

at Newtonsoft.Json.Linq.JTokenWriter.WriteToken(JsonReader reader, Boolean writeChildren, Boolean writeDateConstructorAsDate, Boolean writeComments)

Stack: .

 

问题解答

Function 'Hello1 (Activity)' failed with an error. Reason: Newtonsoft.Json.JsonReaderException: The reader's MaxDepth of 64 has been exceeded. 
Path '[9].Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
Context.Context.Context.Context.Context.Context.Context.Context.Context.Context.
StorageAccount.BlobStorageUri', line 1, position 103037.
at Newtonsoft.Json.JsonReader.Push(JsonContainerType value)

 

因为异常中的Stack并没有指明是那一句代码引起的异常,所以只好使用最笨的办法。

一行代码一行代码的调试。


image.png image.png image.png image.png

image.png

image.png

image.png

相关文章
|
18天前
|
存储 JSON JavaScript
|
20天前
|
Java 容器
【Azure Function App】Java Function在运行中遇见内存不足的错误
【Azure Function App】Java Function在运行中遇见内存不足的错误
|
20天前
【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析
【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析
|
20天前
【Azure Function App】遇见无法加载Microsoft.Azure.WebJobs.ParameterBindingData的问题
【Azure Function App】遇见无法加载Microsoft.Azure.WebJobs.ParameterBindingData的问题
|
20天前
【Azure Function】Azure Function中的Timer Trigger无法自动触发问题
【Azure Function】Azure Function中的Timer Trigger无法自动触发问题
|
20天前
【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?
【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?
|
20天前
【Azure Function】在Function执行中遇见Timeout错误
【Azure Function】在Function执行中遇见Timeout错误
|
20天前
|
存储 SQL JSON
【Azure Logic App】微软云逻辑应用连接到数据库,执行存储过程并转换执行结果为JSON数据
【Azure Logic App】微软云逻辑应用连接到数据库,执行存储过程并转换执行结果为JSON数据
【Azure Logic App】微软云逻辑应用连接到数据库,执行存储过程并转换执行结果为JSON数据
|
20天前
|
缓存
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
|
20天前
|
API
【Azure Function】Function本地调试时遇见跨域问题(blocked by CORS policy)
【Azure Function】Function本地调试时遇见跨域问题(blocked by CORS policy)
【Azure Function】Function本地调试时遇见跨域问题(blocked by CORS policy)

热门文章

最新文章