Bug 60746 - MissingMethodException 'OnCameraChange' not found when showing maps
Summary: MissingMethodException 'OnCameraChange' not found when showing maps
Status: NEEDINFO
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-18 09:30 UTC by Malcolm Jack
Modified: 2017-11-27 11:17 UTC (History)
5 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 for Bug 60746 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEEDINFO

Description Malcolm Jack 2017-11-18 09:30:05 UTC
When displaying Xamarin Forms Maps:

UNHANDLED EXCEPTION:
11-18 11:04:08.445 I/MonoDroid( 3510): System.MissingMethodException: Method 'Xamarin.Forms.Maps.Android.MapRenderer.OnCameraChange' not found.
11-18 11:04:08.445 I/MonoDroid( 3510):   at Android.Gms.Maps.GoogleMap+IOnCameraChangeListenerImplementor.OnCameraChange (Android.Gms.Maps.Model.CameraPosition position) [0x0001a] in <edd902d5391542adb87c92c0219e00cb>:0 
11-18 11:04:08.445 I/MonoDroid( 3510):   at Android.Gms.Maps.GoogleMap+IOnCameraChangeListenerInvoker.n_OnCameraChange_Lcom_google_android_gms_maps_model_CameraPosition_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_position) [0x00011] in <edd902d5391542adb87c92c0219e00cb>:0 
11-18 11:04:08.445 I/MonoDroid( 3510):   at (wrapper dynamic-method) System.Object:2d791c5e-90ce-4ac7-a055-83ce92afea5d (intptr,intptr,intptr)
11-18 11:04:08.465 E/Crash Report( 3510): Time: 11/18/2017 11:04:08 AM
11-18 11:04:08.465 E/Crash Report( 3510): Error: Unhandled Exception
11-18 11:04:08.465 E/Crash Report( 3510): System.Exception: CurrentDomainOnUnhandledException ---> System.MissingMethodException: Method 'Xamarin.Forms.Maps.Android.MapRenderer.OnCameraChange' not found.
11-18 11:04:08.465 E/Crash Report( 3510):   at Android.Gms.Maps.GoogleMap+IOnCameraChangeListenerImplementor.OnCameraChange (Android.Gms.Maps.Model.CameraPosition position) [0x0001a] in <edd902d5391542adb87c92c0219e00cb>:0 
11-18 11:04:08.465 E/Crash Report( 3510):   at Android.Gms.Maps.GoogleMap+IOnCameraChangeListenerInvoker.n_OnCameraChange_Lcom_google_android_gms_maps_model_CameraPosition_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_position) [0x00011] in <edd902d5391542adb87c92c0219e00cb>:0 
11-18 11:04:08.465 E/Crash Report( 3510):   at (wrapper dynamic-method) System.Object:2d791c5e-90ce-4ac7-a055-83ce92afea5d (intptr,intptr,intptr)
11-18 11:04:08.465 E/Crash Report( 3510):    --- End of inner exception stack trace ---
An unhandled exception occured.
Comment 1 Paul DiPietro [MSFT] 2017-11-19 03:13:15 UTC
Can you please provide a reproduction?
Comment 2 Lars Nymand 2017-11-19 15:42:59 UTC
I am struggling with this error as well, but haven't been able to figure out when and why it is happening.

I have the newest version of Xamarin.Forms 2.5.0.91635, Xamarin.Forms.Maps 2.5.0.91635 and TK.CustomMap 1.6.1.

Target Framework .netstandard2.0

Android 7.0 - API 24

Currently it is working in Debug mode but not when I change to Release. I have no idea why.
Comment 3 Malcolm Jack 2017-11-20 18:41:44 UTC
Yup - also get when used in conjunction with TK.CustomMaps. Will see if I can cut and paste the maps control out of my side-project into a public github repo...
Comment 4 allophyl 2017-11-22 01:52:19 UTC
I'm having the exact same problem, also with TK.CustomMaps. I tried with just Xamarin.Forms.Maps and did not see this exception. Seems like it might be an issue with TK.CustomMaps?
Comment 5 Malcolm Jack 2017-11-22 07:47:39 UTC
I can confirm this is a TK.CUstomMaps issue.
There was a breaking change in the Xamarin.Forms.Maps.Android.MapRenderer where the public OnCameraChanged method was removed.
Comment 6 Malcolm Jack 2017-11-22 07:54:44 UTC
This breaking change doesn't seem to be documented in the release notes for 2.5?
Comment 8 Lars Nymand 2017-11-27 11:17:27 UTC
This is fixed in TK.CustomMap v2.0.0-pre1

https://github.com/TorbenK/TK.CustomMap/issues/269