System.NotSupportedException regarding encoding RRS feed

  • Question

  • User186776 posted


    So I'm getting this exception: SetUp : System.NotSupportedException : No data is available for encoding 775.

    The documentation tells me https://developer.xamarin.com/api/type/System.Text.Encoding/ that's the code for Baltic, but that's about it. The phone's internal language is English, the Application is in English. There's no reference to anything anything from any of the Baltic languages, except my physical location on the world map.

    Moreover, I ticked everything in Build => Linker => Internationalization.

    This issue is quite difficult to google as well. Usually refers to random C# build issues, but the app itself builds fine (even without any of the Internationalization options ticked; this is something I did specifically for the UITest build)

    Additional notes: Using debug build (and yes, shared runtime is turned off, that was an exception in its own right) Tried to build .apk-s on different phones (and no, I do not think this matters, just getting desperate) NUnit reference patch 2.6.3 (upgrading to 3 caused different internal exceptions) Xamarin.UITest reference patch 1.3.3 (did not work with the default version either)

    Tuesday, March 1, 2016 2:05 PM

All replies

  • User139314 posted

    @Nikitah What's the rest of the stack trace? Also, you can add .Debug() to your ConfigureApp statement to get additional (possiby useful) output.

    Friday, March 4, 2016 5:17 PM
  • User186776 posted

    Hey @GlennWilson!

    The rest of the stack trace is equally ambiguous, providing some extra information that it is, in fact, an encoding issue:

      at System.Text.Encoding.GetEncoding (Int32 codepage) [0x0019d] in /private/tmp/source-mono-mac-4.2.0-branch-c6sr1/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.2/external/referencesource/mscorlib/system/text/encoding.cs:506 
      at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString (System.Byte[] data, Int32 count) <0x4a0c8a0 + 0x00023> in <filename unknown>:0 
      at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt (Int32 flags, System.Byte[] data, Int32 count) <0x4a02288 + 0x0005b> in <filename unknown>:0 
      at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries () <0x4a00ab0 + 0x0079f> in <filename unknown>:0 
      at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor (System.IO.FileStream file) <0x4a005f8 + 0x000fb> in <filename unknown>:0

    Adding .Debug () to the statement did nothing.

    Also, perhaps it's worth noting that the issue appears with the android build, have not tried with iOS. And that I followed the guide here. Perhaps it's outdated?

    Tuesday, March 8, 2016 9:04 AM
  • User139314 posted

    @Nikitah That stack trace helps. Thanks.

    This appears to be an error encountered while reading your apk file.

    There's no reference to anything from any of the Baltic languages, except my physical location on the world map.

    Your location or configuration may be a contributing factor. Can you try this with a trivial sample app or other apks?

    If other apps fail in the same way then it would appear to have something to do with your configuration / location. If others work then it would seem to be an issue with this particular apk.

    Would it be possible for you to make your apk available? If you can, but don't want to share it with the whole forum you can send me a message (click my name or picture to the left; then click message). Or you can send an email to testcloud@xamarin.com with a brief description and reference this forum post.

    Tuesday, March 8, 2016 6:17 PM
  • User186776 posted


    So, updates:

    I made a new project, added UITest, and the same issue appeared. I can share the .apk, but I suppose this means it's not about the .apk, or is there any other information you could read from it?

    Either way, uploaded the sample project one (not sure about the site, just something I found googling, I hope you can download it): http://www.megafileupload.com/n2n2/com.encodingissue.test.encodingissuesample.apk

    I also tried running it on another another computer, but no luck, same issue.

    I went over my configuration, but found nothing that could be the root cause.

    Wednesday, March 9, 2016 1:37 PM
  • User139314 posted

    @Nikitah Got it. Thanks. The apk seems fine and I can use it with UITest.

    What OS / version are you using and what is the system language?

    Wednesday, March 9, 2016 4:41 PM
  • User186776 posted


    OSX El Capitan 10.11.3 and and my Preferred language is English, the catch was that my Region was still Estonia. That meant my system info user locale was et_EE. Setting my region to United Kingdom fixed it. Thanks a ton, Glenn!

    Wednesday, March 9, 2016 5:22 PM
  • User139314 posted

    @Nikitah Thanks. I'm glad you got it working. I'll record an internal defect for this.

    Wednesday, March 9, 2016 5:50 PM