Bug 39769 - [Android] Exception when consuming HTTPS endpoint with Linking Behaviour set to Link Framework SDKs Only
Summary: [Android] Exception when consuming HTTPS endpoint with Linking Behaviour set ...
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 6.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2016-03-18 17:19 UTC by Matthew Regul
Modified: 2017-06-29 13:19 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Matthew Regul 2016-03-18 17:19:28 UTC
== Overview: =================================

>( See private note for more details )
In some situations when executing an Android Release-mode app, containing Insights, and enabling linking (Link Behaviour = Link Framework SDKs Only) an attempt to read data from an HTTPS endpoint throws an exception.
(Similar to https://bugzilla.xamarin.com/show_bug.cgi?id=13998 but for Android instead of Xamarin.Mac)



== Build Date & Platform: ====================
Version Info - https://gist.github.com/mattregul/28390328c6a72b6f3bec#file-my-version-cs
Insights - 1.11.4



== Additional Information: ===================
Insights Stacktrace - https://insights.xamarin.com/app/debug-release-networking/issues/329

Stacktrace via Gist (in case you do not have access to Insights)
- RAW Stacktrace text - https://gist.github.com/mattregul/28390328c6a72b6f3bec#file-stack-log
- Image of Formatted Insights Stacktrace - https://gist.github.com/mattregul/28390328c6a72b6f3bec#gistcomment-1727897
- Image of RAW Insights Stacktrace - https://gist.github.com/mattregul/28390328c6a72b6f3bec#gistcomment-1727895




== Workaround: ===============================
(from https://bugzilla.xamarin.com/show_bug.cgi?id=13998#c5)
Add the following to your code:

"System.Security.Cryptography.AesCryptoServiceProvider b = new System.Security.Cryptography.AesCryptoServiceProvider();"

OR

Set the Android project's Linker Behavior to "Don't Link"
Comment 2 Prashant [MSFT] 2017-06-29 06:55:29 UTC
@Matt as Insights no longer supported and similar bug is marked as fixed, I am making this bug resolved