Bug 31394 - CookieManager.RemoveAllCookies() is not implemented
Summary: CookieManager.RemoveAllCookies() is not implemented
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 5.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2015-06-26 05:15 UTC by Nikola
Modified: 2015-06-26 09:36 UTC (History)
1 user (show)

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


Attachments
Test code (498 bytes, text/plain)
2015-06-26 05:15 UTC, Nikola
Details


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 INVALID

Description Nikola 2015-06-26 05:15:48 UTC
Created attachment 11745 [details]
Test code

Overview: 
When trying to use the CookieManager's RemoveAllCookies() you get an exception java.lang.NoSuchMethodError


Steps to Reproduce: 

1) Get the CookieManager.Instance;
2) Try to use RemoveAllCookies() method (will attach sample code)

Actual Results:

Application crashes with exception:

Exception message: Exception of type 'Java.Lang.NoSuchMethodError' was thrown.

Stack trace:

java.lang.NoSuchMethodError: no method with name='removeAllCookies' signature='(Landroid/webkit/ValueCallback;)V' in class Landroid/webkit/CookieManager;
	at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
	at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
	at android.view.View.performClick(View.java:4658)
	at android.view.View$PerformClick.run(View.java:19461)
	at android.os.Handler.handleCallback(Handler.java:733)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:146)
	at android.app.ActivityThread.main(ActivityThread.java:5694)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
	at dalvik.system.NativeStart.main(Native Method)
e Method)
	at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
	at android.view.View.performClick(View.java:4658)
	at android.view.View$PerformClick.run(View.java:19461)
	at android.os.Handler.handleCallback(Handler.java:733)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:146)
	at android.app.ActivityThread.main(ActivityThread.java:5694)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
	at dalvik.system.NativeStart.main(Native Method)



Build Date & Platform: 

Date: 26-06-2015 
Platform: Windows 8.1, both VS and XS
Android device: Any device API > 15

Xamarin Studio
Version 5.9.4 (build 5)

Xamarin.Android
Version: 5.1.4 (Business Edition)

Build Information
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 17:16:25-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

Operating System
Windows 6.2.9200.0 (64-bit)



Using the deprecated CookieManager.RemoveAllCookie() works fine
Comment 1 Atsushi Eno 2015-06-26 09:36:23 UTC
That is expected. The method android.webkit.CookieManager.removeAllCookies(ValueCallback<Boolean>) does not indeed exist in Android prior to API Level 21.