GitHub user LukePulverenti opened a pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/87

    Remove use of CookieManager

    This causes an unhandled exception when used with Crosswalk on Api 16. 
Newer api versions seem to work fine. With the direction heading towards 
pluggable webviews everything should funnel through the CordovaWebView 
interface and be handled by the implementation.
    
    As an aside, CordovaWebView has a getCookieManager() method, so I'm not 
sure why the reflection is needed, but I left it in place because I don't know 
the code well enough.
    
    For reference, here is the exception that I'm referring to. Note that it 
doesn't hit XWalk classes at all, which makes it appear that Crosswalk does not 
have any opportunity to intercept.
    
    06-10 15:28:39.922    2081-2126/com.mb.android W/dalvikvm﹕ JNI WARNING: 
JNI method called with exception pending
    06-10 15:28:39.922    2081-2126/com.mb.android W/dalvikvm﹕ in 
Landroid/webkit/CookieManagerClassic;.nativeGetCookie:(Ljava/lang/String;Z)Ljava/lang/String;
 (GetStringUTFChars)
    06-10 15:28:39.922    2081-2126/com.mb.android W/dalvikvm﹕ Pending 
exception is:
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ 
java.lang.IllegalStateException: Call CookieSyncManager::createInstance() or 
create a webview before using this class
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
android.webkit.JniUtil.checkInitialized(JniUtil.java:44)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
android.webkit.CookieManagerClassic.nativeGetCookie(Native Method)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:91)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:78)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
org.apache.cordova.filetransfer.FileTransfer.getCookies(FileTransfer.java:240)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
org.apache.cordova.filetransfer.FileTransfer.access$200(FileTransfer.java:70)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:819)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ at 
java.lang.Thread.run(Thread.java:856)
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ 
"pool-1-thread-2" prio=5 tid=27 NATIVE
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ | group="main" 
sCount=0 dsCount=0 obj=0xb3a84848 self=0xb91a2140
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ | sysTid=2126 
nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1189253184
    06-10 15:28:39.922    2081-2126/com.mb.android I/dalvikvm﹕ | schedstat=( 
0 0 0 ) utm=9 stm=1 core=0

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/LukePulverenti/cordova-plugin-file-transfer 
master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file-transfer/pull/87.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #87
    
----
commit 8f8e8b1da5e75b903a0fb3486d87df39dc895b08
Author: Luke Pulverenti <luke.pulvere...@gmail.com>
Date:   2015-06-10T19:35:50Z

    Remove use of CookieManager

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to