Plugin (InvalidOperationException) when downloading through the plugin

delta.

Creator
Pronouns
he/him
on the dalamud 13 beta test. i'm not seeing any specific errors besides this. the mods themselves work as intended, and the penumbra update will read them normally, when downloaded locally as a pmp. this seems to be specifically a plugin issue, and it will fail in its current state with any mod. if there are any other logs i should provide, please let me know where i can find them to get them to you.

(there is a distinct possibility this is a me issue, since i've been testing personal network configurations, but i'd rather be safe than sorry.)

1754700957374.webp
 
Solution
No, it could happen with any mod. Special characters have nothing to do with it.

It was an issue with a dependency that is intermittent. I downgraded the dependency, so it will be fixed in 4.2.3, which is available now.

the only way i can get the broken mod to appear in penumbra is by rediscovering. when i rediscover the broken mods, TEX/MTRL/MDL files included in the mod seem to be there and largely intact, but all assigned file paths are missing and metadata is no longer present:
Yes, because the error happens while Heliosphere is constructing the mod. This is expected.
I tested installing earlier today without issue, so it shouldn't be an issue for everyone.

Clicking that error notification will let you copy the error and paste it here. That will let me investigate further.

Edit: testing on the same mod you were trying, I can intermittently get this error:
Code:
Error type: System.InvalidOperationException
   Message: Cannot transcode invalid UTF-8 JSON text to UTF-16 string.
   HResult: 0x80131509
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)
   at System.Text.Json.JsonDocument.GetRawValueAsString(Int32 index)
   at Heliosphere.DownloadTask.<>c.<ManipTokensForOption>b__159_0(JsonElement manip) in /_/DownloadTask.cs:line 1599
   at System.Linq.Enumerable.ListSelectIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.ListSelectIterator`2.ToList()
   at Heliosphere.DownloadTask.ManipTokensForOption(IReadOnlyList`1 rawManipulations) in /_/DownloadTask.cs:line 1597
   at Heliosphere.DownloadTask.ConstructGroups(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1299
   at Heliosphere.DownloadTask.ConstructModPack(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1091
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 169

Error type: System.Text.DecoderFallbackException
   Message: Unable to translate bytes [A9] at index 1 from specified code page to Unicode.
   HResult: 0x80070057
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
   at System.Text.Encoding.GetCharCountWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, DecoderNLS decoder)
   at System.Text.Encoding.GetCharCountWithFallback(Byte* pBytesOriginal, Int32 originalByteCount, Int32 bytesConsumedSoFar)
   at System.Text.UTF8Encoding.GetCharCount(Byte* bytes, Int32 count)
   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
   at System.Text.Encoding.GetString(ReadOnlySpan`1 bytes)
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)

It's late for me, so I'll have to test more tomorrow. Error doesn't make much sense to me right now.
 
Last edited:
good morning! everything i attempted to download yesterday had non-standard characters in their titles/mod descriptions, hence why i thought it was everything. go figure. anyway, i get the same error as you when trying through the plugin again today.

error code of the original mod in the screenshot:
Code:
Error type: System.InvalidOperationException
   Message: Cannot transcode invalid UTF-8 JSON text to UTF-16 string.
   HResult: 0x80131509
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)
   at System.Text.Json.JsonDocument.GetRawValueAsString(Int32 index)
   at Heliosphere.DownloadTask.<>c.<ManipTokensForOption>b__159_0(JsonElement manip) in /_/DownloadTask.cs:line 1599
   at System.Linq.Enumerable.ListSelectIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.ListSelectIterator`2.ToList()
   at Heliosphere.DownloadTask.ManipTokensForOption(IReadOnlyList`1 rawManipulations) in /_/DownloadTask.cs:line 1597
   at Heliosphere.DownloadTask.ConstructGroups(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1299
   at Heliosphere.DownloadTask.ConstructModPack(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1091
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 169

Error type: System.Text.DecoderFallbackException
   Message: Unable to translate bytes [D8] at index 1 from specified code page to Unicode.
   HResult: 0x80070057
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
   at System.Text.Encoding.GetCharCountWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, DecoderNLS decoder)
   at System.Text.Encoding.GetCharCountWithFallback(Byte* pBytesOriginal, Int32 originalByteCount, Int32 bytesConsumedSoFar)
   at System.Text.UTF8Encoding.GetCharCount(Byte* bytes, Int32 count)
   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
   at System.Text.Encoding.GetString(ReadOnlySpan`1 bytes)
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)

error code of a different mod by the same user:
Code:
Error type: System.InvalidOperationException
   Message: Cannot transcode invalid UTF-8 JSON text to UTF-16 string.
   HResult: 0x80131509
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)
   at System.Text.Json.JsonDocument.GetRawValueAsString(Int32 index)
   at Heliosphere.DownloadTask.<>c.<ManipTokensForOption>b__159_0(JsonElement manip) in /_/DownloadTask.cs:line 1599
   at System.Linq.Enumerable.ListSelectIterator`2.ToList()
   at Heliosphere.DownloadTask.ManipTokensForOption(IReadOnlyList`1 rawManipulations) in /_/DownloadTask.cs:line 1597
   at Heliosphere.DownloadTask.ConstructGroups(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1299
   at Heliosphere.DownloadTask.ConstructModPack(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 1091
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 169

Error type: System.Text.DecoderFallbackException
   Message: Unable to translate bytes [E2][99] at index 0 from specified code page to Unicode.
   HResult: 0x80070057
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
   at System.Text.Encoding.GetCharCountWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, DecoderNLS decoder)
   at System.Text.Encoding.GetCharCountWithFallback(Byte* pBytesOriginal, Int32 originalByteCount, Int32 bytesConsumedSoFar)
   at System.Text.UTF8Encoding.GetCharCount(Byte* bytes, Int32 count)
   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
   at System.Text.Encoding.GetString(ReadOnlySpan`1 bytes)
   at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)

while the first mod always fails to download via the plugin for me, the second one does not, and it went through roughly 1/3 of the time. the only way i can get the broken mod to appear in penumbra is by rediscovering. when i rediscover the broken mods, TEX/MTRL/MDL files included in the mod seem to be there and largely intact, but all assigned file paths are missing and metadata is no longer present:

1754760306406.webp

1754760285076.webp


i assume there's occasional failure somewhere in parsing the non-standard characters present within the JSON files. mods without them do not seem to have the issue.
 
No, it could happen with any mod. Special characters have nothing to do with it.

It was an issue with a dependency that is intermittent. I downgraded the dependency, so it will be fixed in 4.2.3, which is available now.

the only way i can get the broken mod to appear in penumbra is by rediscovering. when i rediscover the broken mods, TEX/MTRL/MDL files included in the mod seem to be there and largely intact, but all assigned file paths are missing and metadata is no longer present:
Yes, because the error happens while Heliosphere is constructing the mod. This is expected.
 
Solution
Back
Top