Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DADF3186A5 for ; Wed, 10 Jun 2015 19:41:38 +0000 (UTC) Received: (qmail 44078 invoked by uid 500); 10 Jun 2015 19:41:38 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 44040 invoked by uid 500); 10 Jun 2015 19:41:38 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 44029 invoked by uid 99); 10 Jun 2015 19:41:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 19:41:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E6468E0385; Wed, 10 Jun 2015 19:41:37 +0000 (UTC) From: LukePulverenti To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org Message-ID: Subject: [GitHub] cordova-plugin-file-transfer pull request: Remove use of CookieMan... Content-Type: text/plain Date: Wed, 10 Jun 2015 19:41:37 +0000 (UTC) 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 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 infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org