-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not load the file 'I18N, Version=2.0.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'. #578
Comments
Is this on a Xamarin mobile platform? |
Yes, @jstedfast This is on a Xamarin Mobile Platform (iOS) And this crash is not very consistent, 5/10times it crashes |
This seems like some weird bug in Xamarin? In MimeKit's CharsetUtils helper class, there's a line of code that does this: AddAliases (aliases, 10079, -1, "x-mac-icelandic"); If we look at the AddAliases method, we see: static int AddAliases (Dictionary<string, int> dict, int codepage, int fallback, params string[] names)
{
int value = ProbeCharset (codepage) ? codepage : fallback;
for (int i = 0; i < names.Length; i++)
dict.Add (names[i], value);
return value;
} Then, check the implementation of ProbeCharset and we see: static bool ProbeCharset (int codepage)
{
try {
Encoding.GetEncoding (codepage);
return true;
} catch {
return false;
}
} It's pretty clear you shouldn't be getting that exception because Can you file a bug with them at https://github.com/xamarin/xamarin-macios ? That's the bug tracker for the Xamarin.iOS and Xamarin.Mac products. Link them back to this ticket so that they can take a look at what the MimeKit code is doing so that they can easily create a test-case and/or perhaps make a suggestion on how to work around this issue. |
FWIW, what CharsetUtils in MimeKit essentially does is to map non-standard charset names to codepages and in a few cases, overrides the charset name / codepage mapping. |
Oh, the original crash you had was a |
FWIW, before you submit a bug to Xamarin.iOS - make sure that in your Project Options, you enable ALL of the i18n charset regions. You'll need them and the error you are getting probably indicates that you don't have them. |
Any update on this? Can I close it? |
Hi @jstedfast I haven't been able to make this change in the Project Options, you enable ALL of the i18n charset regions. Can you please tell me how to? |
Opened a issue in Xamarin ios github project dotnet/macios#8815 |
|
Try calling |
No Luck, I am still getting the same crash with same message No data is available for encoding 51936. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. |
Maybe the Xamarin.iOS guys know. |
I have updated the issue opened in Xamarin.iOS github with most of the info, |
On a side note how secure is using Mimekit & MailKit in our App? because we will be adding sensitve information like our mail client email id with app specific password, smtp server url, and also some more email ids of different selections How can we be sure that anyone cannot reverse engineer and get to the email id and other details? |
I wouldn't know how to answer that question. I guess for MimeKit, there shouldn't be anything to worry about since it'll never have access to your username/password since all it does is construct and parse MIME. MailKit obviously has APIs where you pass around the username and password as strings to lower-level APIs that encrypt them to send to the server. If you always use TLS, then passwords will never be sent in the clear no matter what since the TCP/IP layer will be encrypted. If you don't use TLS, then it's possible they will be sent in the clear if the authentication mechanism employed by the server is plain-text. For example, IMAP's
MailKit will only use the the IMAP Then we've got SASL mechanisms that we'd need to talk about... For example, the Not rocket science to reverse engineer, but most IMAP/POP3/SMTP servers do not allow The remainder of the SASL mechanisms (all of which MailKit prefers over I guess the answer is: "no less secure than any other library that handles authentication could possibly be". |
Interestingly, it looks like MimeKit already calls |
Since MimeKit already calls |
I am still struggle for this issue in Xamarin 2022, do you have any updates about this? |
@ryanslovakia ask Xamarin |
Describe the bug
System.IO.FileNotFoundException has been thrown
System.IO.FileNotFoundException
Could not load the file 'I18N, Version=2.0.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'.
Platform (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
I have created a contact Us page and upon filling all the info and click on submit I see the crash with
System.IO.FileNotFoundException has been thrown
System.IO.FileNotFoundException
Could not load the file 'I18N, Version=2.0.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'.
Expected behavior
When I click on Submit the form submits successfully
The text was updated successfully, but these errors were encountered: