kudu: Zip Push Deploy API returning Decoding Errors

I use the push deploy API to deploy my my .net core 2.0 function app project. This process has been working fine for months, and suddenly today it stopped working with no changes to our deployment scripts that broker the upload process. We are seeing this error across multiple projects with no source code changes. I can’t share the source code, as it is stored in a private source control server, but here is the full output we are seeing from the API:

{"Message":"An error has occurred.","ExceptionMessage":"Unable to translate bytes [A1] at 
index 16 from specified code page to Unicode.","ExceptionType":"System.Text.DecoderFallbackException","StackTrace":"   at 
System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)\r\n   at 
System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)\r\n   at 
System.Text.DecoderFallbackBuffer.InternalFallback(Byte[] bytes, Byte* pBytes, Char*& chars)\r\n   at System.Text.UTF8Encoding.GetChars(Byte* bytes, 
Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)\r\n   at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* 
chars, Int32 charCount, Boolean flush)\r\n   at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 
charIndex, Boolean flush)\r\n   at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex)\r\n 
  at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)\r\n   at 
System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)\r\n   at Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 
charsRequired)\r\n   at Newtonsoft.Json.JsonTextReader.ParseValue()\r\n   at Newtonsoft.Json.JsonTextReader.Read()\r\n   at 
Newtonsoft.Json.JsonReader.ReadAndMoveToContent()\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, 
JsonContract contract, Boolean hasConverter)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type 
objectType, Boolean checkAdditionalContent)\r\n   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n   at 
System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, Encoding effectiveEncoding, IFormatterLogger 
formatterLogger)\r\n   at System.Net.Http.Formatting.JsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, Encoding effectiveEncoding, 
IFormatterLogger formatterLogger)\r\n   at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, 
HttpContent content, IFormatterLogger formatterLogger)\r\n   at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStreamAsync(Type type, 
Stream readStream, HttpContent content, IFormatterLogger formatterLogger)\r\n--- End of stack trace from previous location where exception was thrown 
---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at 
System.Net.Http.HttpContentExtensions.d__0`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at 
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at 
Kudu.Services.Deployment.PushDeploymentController.d__10.MoveNext() in C:\\Kudu 
Files\\Private\\src\\master\\Kudu.Services\\Deployment\\PushDeploymentController.cs:line 136\r\n--- End of stack trace from previous location where 
exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at 
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at 
Kudu.Services.Deployment.PushDeploymentController.d__11.MoveNext() in C:\\Kudu 
Files\\Private\\src\\master\\Kudu.Services\\Deployment\\PushDeploymentController.cs:line 164"}

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@pjirsa it’s likely because they incorrectly set the mime type to application/json, per above. This used to not matter but now it does. They’ll need to fix that in the build pipeline action.

Can you try setting a KUDU_EXTENSION_VERSION Azure app setting to 78.11002.3584 and see if that helps (going back to previous version of Kudu)?

we were able to get ours working by adding this to our slot’s appsettings: KUDU_EXTENSION_VERSION - 78.11002.3584

@vit-svoboda my comment above was related to what someone else was doing more than two years ago. Your case may be different.

I suggest starting a new issue and describe your scenario. Also, I’m no longer working on this project, so I’ll let others help out.