Bug 17158 - Cannot find the requested method - System.Runtime.Remoting.Proxies.RealProxy:InternalGetTransparentProxy
Summary: Cannot find the requested method - System.Runtime.Remoting.Proxies.RealProxy:...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.1.0.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-01-09 23:04 UTC by Vladimir Krougly
Modified: 2014-01-15 05:46 UTC (History)
4 users (show)

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

Sample application to reproduce the crash (103.85 KB, application/zip)
2014-01-11 02:06 UTC, Vladimir Krougly

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:

Description Vladimir Krougly 2014-01-09 23:04:27 UTC
I got below exception:

exception	{System.MissingMethodException: Cannot find the requested method.   at (wrapper managed-to-native) System.Runtime.Remoting.Proxies.RealProxy:InternalGetTransparentProxy (string)   at System.Runtime.Remoting.Proxies.RealProxy.GetTransparentProxy () [0x0005c] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs:269

It used to work back in 2012.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-01-10 08:31:09 UTC
Can you attach a test project we can use to reproduce this?
Comment 2 Vladimir Krougly 2014-01-11 02:06:19 UTC
Created attachment 5816 [details]
Sample application to reproduce the crash
Comment 3 Vladimir Krougly 2014-01-11 02:07:17 UTC
The sample application is attached.

I have tried to use the Scs library from the below CodeProject article:

It used to work fine last year when we did the application prototype. We were able to connect to a server running on a Windows machine to get data. Now it no longer works. Please help.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-01-13 07:32:53 UTC
It looks like the linker is removing code you're using dynamically.

Can you confirm if your app works if you disable the linker (in the project's iOS Build options, set 'Linker Behavior' to 'Don't link').

Note that you don't want to disable the linker altogether, this will create an enormous app. Once you've confirmed that the issue is indeed with the linker, you can instead tell it exactly what code you need in your app. Here is the documentation on how to do it: http://docs.xamarin.com/guides/ios/advanced_topics/linker/
Comment 5 Sebastien Pouliot 2014-01-13 08:48:39 UTC
I'm pretty sure this case never worked - at least not on iOS devices. Many remoting features are not supported by Xamarin.iOS since they require runtime code generation.

Still you might try to disable the linker removal of the remoting code [1] using the -nolinkaway option (that's better than disabling the linker globally). YMMV.

[1] http://spouliot.wordpress.com/2011/11/01/linker-vs-linked-away-exceptions/
Comment 6 Vladimir Krougly 2014-01-13 11:17:25 UTC
Using "Don't link" and "--nolinkaway" options didn't help. You can try it easily with the attached app. 
It was for sure working in October 2012. We've demonstrated the working prototype at that time.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2014-01-14 08:53:52 UTC
Looking more closely I don't quite understand how the sample worked earlier, since remoting has never been supported: http://docs.xamarin.com/guides/ios/advanced_topics/limitations/

I get an (expected) assert at startup, which is because remoting does not work on iOS devices.

    * Assertion: should not be reached at ../../../../../mono/mono/metadata/icall.c:8033