[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384026#comment-14384026 ] ASF GitHub Bot commented on CB-5059: Github user Xavierh95 commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-86980841 Works perfectly with : ionic : 1.0.0-rc.1 crosswalk : 13.41.318.0 Android : 4.X.X Thanks a lot @dpogue ! > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365568#comment-14365568 ] ASF GitHub Bot commented on CB-5059: Github user Kukiwon commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-82487250 Looks like it's working! Thanks a lot @dpogue ! > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365486#comment-14365486 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-82471654 https://github.com/apache/cordova-plugin-file-transfer/pull/68 should fix any remaining crashes when using Crosswalk. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365481#comment-14365481 ] ASF GitHub Bot commented on CB-5059: Github user Kukiwon commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-82469301 Hi, I'm getting the same error with an app that's using Crosswalk though the Ionic CLI. After looking at the cli's source code, I found that it does download cordova-android 4.0 dev when you add the browser to your project (see https://github.com/driftyco/ionic-cli/blob/master/lib/ionic/browser.js#L36). So could it be another issue @dpogue ? > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323116#comment-14323116 ] ASF GitHub Bot commented on CB-5059: Github user sean-hill commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-74552806 Okay, so do I just have to wait then? > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323048#comment-14323048 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-74544061 This fix only applies to the (in-development) cordova-android 4.0, not the patched version of cordova-android that ships with Crosswalk. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322949#comment-14322949 ] ASF GitHub Bot commented on CB-5059: Github user sean-hill commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-74534299 Some more info: fileURL: `content://media/external/images/media/19` fileUploadOptions: { "fileKey": "file", "fileName": "19", "mimeType": "image/jpeg", "params": null, "headers": null, "httpMethod": null } > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322937#comment-14322937 ] ASF GitHub Bot commented on CB-5059: Github user sean-hill commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-74533046 Here are my logs when it crashes I/chromium(22591): [INFO:CONSOLE(33)] "FILE:", source: file:///android_asset/www/js/services/upload-service.js (33) E/EGL_genymotion(22591): eglQuerySurface 30be EGL_BAD_ATTRIBUTE I/DEBUG ( 116): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 116): Build fingerprint: 'generic/vbox86p/vbox86p:4.1.1/JRO03S/eng.buildbot.20141001.135900:userdebug/test-keys' I/DEBUG ( 116): pid: 22591, tid: 22651, name: pool-1-thread-1 >>> com.pingplot.unbill <<< I/DEBUG ( 116): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d I/DEBUG ( 116): eax 020c ebx b67d8c98 ecx 0001 edx I/DEBUG ( 116): esi 9149b5e0 edi 020c I/DEBUG ( 116): xcs 0073 xds 007b xes 007b xfs xss 007b I/DEBUG ( 116): eip b672e51a ebp 9149b7f8 esp 9149b5d0 flags 00010246 I/DEBUG ( 116): I/DEBUG ( 116): backtrace: I/DEBUG ( 116): #00 pc 0005451a /system/lib/libdvm.so (dvmAbort+170) I/DEBUG ( 116): #01 pc 0005c13e /system/lib/libdvm.so (dvmDecodeIndirectRef(Thread*, _jobject*)+126) I/DEBUG ( 116): #02 pc 00066094 /system/lib/libdvm.so (GetStringUTFChars(_JNIEnv*, _jstring*, unsigned char*)+100) I/DEBUG ( 116): #03 pc 004aa598 /system/lib/libwebcore.so (android::jstringToStdString(_JNIEnv*, _jstring*)+72) I/DEBUG ( 116): #04 pc 0048e11b /system/lib/libwebcore.so (android::databaseDirectory()+363) I/DEBUG ( 116): #05 pc 0048e365 /system/lib/libwebcore.so (android::WebCookieJar::get(bool)+309) I/DEBUG ( 116): #06 pc 0049dea5 /system/lib/libwebcore.so (android::getCookie(_JNIEnv*, _jobject*, _jstring*, unsigned char)+149) I/DEBUG ( 116): #07 pc 0001aea0 /system/lib/libdvm.so (dvmPlatformInvoke+80) I/DEBUG ( 116): #08 pc 000608f9 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+489) I/DEBUG ( 116): #09 pc 000c6008 /system/lib/libdvm.so I/DEBUG ( 116): #10 pc 00029406 /system/lib/libdvm.so (dvmMterpStd(Thread*)+70) I/DEBUG ( 116): #11 pc 000265d0 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+160) I/DEBUG ( 116): #12 pc 00091779 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, char*)+601) I/DEBUG ( 116): #13 pc 00091886 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+54) I/DEBUG ( 116): #14 pc 00077c33 /system/lib/libdvm.so (interpThreadStart(void*)+755) I/DEBUG ( 116): #15 pc 00010870 /system/lib/libc.so (__thread_entry+240) I/DEBUG ( 116): #16 pc 00019755 /system/lib/libc.so I/DEBUG ( 116): I/DEBUG ( 116): stack: I/DEBUG ( 116): 9149b590 I/DEBUG ( 116): 9149b594 I/DEBUG ( 116): 9149b598 I/DEBUG ( 116): 9149b59c I/DEBUG ( 116): 9149b5a0 I/DEBUG ( 116): 9149b5a4 I/DEBUG ( 116): 9149b5a8 I/DEBUG ( 116): 9149b5ac I/DEBUG ( 116): 9149b5b0 I/DEBUG ( 116): 9149b5b4 I/DEBUG ( 116): 9149b5b8 I/DEBUG ( 116): 9149b5bc I/DEBUG ( 116): 9149b5c0 I/DEBUG ( 116): 9149b5c4 I/DEBUG ( 116): 9149b5c8 I/DEBUG ( 116): 9149b5cc I/DEBUG ( 116): #00 9149b5d0 I/DEBUG ( 116): 9149b5d4 b67a0229 /system/lib/libdvm.so I/DEBUG ( 116): 9149b5d8 b67a4cb7 /system/lib/libdvm.so I/DEBUG ( 116): 9149b5dc I/DEBUG ( 116): 9149b5e0 6c756e28 I/DEBUG ( 116): 9149b5e4 296c I/DEBUG ( 116): 9149b5e8 I/DEBUG ( 116): 9149b5ec I/DEBUG ( 116): 9149b5f0 I/DEBUG ( 116): 9149b5f4 I/DEBUG ( 116): 9149b5f8 I/DEBUG ( 11
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322934#comment-14322934 ] ASF GitHub Bot commented on CB-5059: Github user sean-hill commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-74532102 Hey guys, my app is still crashing even after this PR. I'm able to navigate in my Android Emulator and chose an image, but then the app just crashes right after I select the image and the code: var ft = new FileTransfer(); ft.upload(fileURL, encodeURI("http://some.server.com/upload.php";), win, fail, options); is called. I'm using crosswalk. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298837#comment-14298837 ] ASF GitHub Bot commented on CB-5059: Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-file-transfer/pull/60 > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298836#comment-14298836 ] ASF subversion and git services commented on CB-5059: - Commit c12f1eb9befb2111717b3219be10975476efec64 in cordova-plugin-file-transfer's branch refs/heads/master from [~dpogue] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file-transfer.git;h=c12f1eb ] CB-5059 Add a CookieManager abstraction for pluggable webviews (close #60) This allows FileTransfer to correctly use webview cookies regardless of which webview engine is in use. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298238#comment-14298238 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-72157462 Thanks for catching that. Updated and tested with both cordova-android@3.6.4 and cordova-android@4.0.x. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14297026#comment-14297026 ] ASF GitHub Bot commented on CB-5059: Github user agrieve commented on a diff in the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#discussion_r23775743 --- Diff: src/android/FileTransfer.java --- @@ -316,7 +317,23 @@ public void run() { conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY); // Set the cookies on the response -String cookie = CookieManager.getInstance().getCookie(target); +boolean gotCookie = false; +String cookie = null; +Class webViewClass = webView.getClass(); +try { +Method gcm = webViewClass.getMethod("getCookieManager"); +ICordovaCookieManager cm = (ICordovaCookieManager)gcm.invoke(webView); --- End diff -- We'll need to make the code just a little be more complicated and hard to read still, since pre-4.0.0 cordova-android users will get a compile error looking for the ICordovaCookieManager symbol :( > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14295471#comment-14295471 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-71879606 @agrieve Thanks, updated > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14295336#comment-14295336 ] ASF GitHub Bot commented on CB-5059: Github user agrieve commented on a diff in the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#discussion_r23698327 --- Diff: src/android/FileTransfer.java --- @@ -316,7 +316,7 @@ public void run() { conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY); // Set the cookies on the response -String cookie = CookieManager.getInstance().getCookie(target); +String cookie = webView.getCookieManager().getCookie(target); --- End diff -- I think we'll need to use reflection here to keep the plugin compatible with 3.x versions of android. e.g.: Look at how getPluginManager() is handled on line 854. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14295264#comment-14295264 ] ASF subversion and git services commented on CB-5059: - Commit 8cf8da57767af1efbfe3a153e0eb2fc42bdb6a71 in cordova-android's branch refs/heads/master from [~dpogue] [ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=8cf8da5 ] CB-5059 Adds CookieManager abstraction for pluggable webviews (close #151) Crosswalk and GeckoView implementations of CordovaWebView can provide their own ICordovaCookieManager implementation for plugins to use. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14295265#comment-14295265 ] ASF GitHub Bot commented on CB-5059: Github user asfgit closed the pull request at: https://github.com/apache/cordova-android/pull/151 > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294978#comment-14294978 ] ASF GitHub Bot commented on CB-5059: Github user crissi commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60#issuecomment-71813597 +1 > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294744#comment-14294744 ] ASF GitHub Bot commented on CB-5059: GitHub user dpogue opened a pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/60 CB-5059 Add a CookieManager abstraction for pluggable webviews. This allows FileTransfer to correctly use webview cookies regardless of which webview engine is in use. /cc @agrieve @infil00p Requires apache/cordova-android#151 Refs #8 Refs MobileChromeApps/mobile-chrome-apps#464 Refs MobileChromeApps/cordova-crosswalk-engine#16 Refs crosswalk-project/crosswalk-cordova-android#38 You can merge this pull request into a Git repository by running: $ git pull https://github.com/dpogue/cordova-plugin-file-transfer 4.0.x-cookies Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-file-transfer/pull/60.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 #60 commit 7fa40760b69586f06267c1036f36a4d3db22488a Author: Darryl Pogue Date: 2015-01-28T05:14:45Z CB-5059 Add a CookieManager abstraction for pluggable webviews. This allows FileTransfer to correctly use webview cookies regardless of which webview engine is in use. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294707#comment-14294707 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/151#discussion_r23665411 --- Diff: framework/src/org/apache/cordova/ICordovaCookieManager.java --- @@ -0,0 +1,45 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +public interface ICordovaCookieManager { --- End diff -- Sounds good. FileTransfer was just using getCookie() as I recall, but I'll go with Andrew's list (minus setThirdPartyCookiesEnabled?) > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294702#comment-14294702 ] ASF GitHub Bot commented on CB-5059: Github user infil00p commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/151#discussion_r23665332 --- Diff: framework/src/org/apache/cordova/ICordovaCookieManager.java --- @@ -0,0 +1,45 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +public interface ICordovaCookieManager { --- End diff -- The problem with using Android APIs and adopting them as our own is that we have to support stupid crap that isn't universal. I'd rather add an API later that we needed than have some extra cruft that we have to test. We should work on having the bare minimum needed for FileTransfer to work, and if a third-party API uses this, they can then submit a bug or send a pull request to add something to the API. Adding to an API is an API change, but it's not a breaking one. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294686#comment-14294686 ] ASF GitHub Bot commented on CB-5059: Github user dpogue commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/151#discussion_r23664825 --- Diff: framework/src/org/apache/cordova/ICordovaCookieManager.java --- @@ -0,0 +1,45 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +public interface ICordovaCookieManager { --- End diff -- My plan was to make it mostly API-compatible with existing CookieManagers so that it would be easier to migrate existing plugins rather than trying to figure out a different API. One other issue is that the XWalkCookieManager doesn't appear to have setThirdPartyCookiesEnabled(): https://github.com/crosswalk-project/crosswalk/blob/master/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkCookieManager.java If those aren't concerns (I guess XWalkCordovaCookieManager could just ignore setThirdPartyCookiesEnabled?), then I'll shrink down the interface. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293668#comment-14293668 ] ASF GitHub Bot commented on CB-5059: Github user agrieve commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/151#discussion_r23613974 --- Diff: framework/src/org/apache/cordova/ICordovaCookieManager.java --- @@ -0,0 +1,45 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +public interface ICordovaCookieManager { --- End diff -- Looks great, but I think it would be wise to shrink the interface at the start. I'm thinking just: - setCookiesEnabled() - setThirdPartyCookiesEnabled() - setCookie() - getCookie() - clearCookies() - flush() > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14292964#comment-14292964 ] ASF GitHub Bot commented on CB-5059: GitHub user dpogue opened a pull request: https://github.com/apache/cordova-android/pull/151 CB-5059 Add a CookieManager abstraction for pluggable webviews. Crosswalk and GeckoView implementations of CordovaWebView can provide their own ICordovaCookieManager implementation for plugins to use. /cc @infil00p & @agrieve If you think this is the correct way to go about this, I'll make an implementation for the Crosswalk engine and update the FileTransfer plugin. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dpogue/cordova-android 4.0.x-cookies Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-android/pull/151.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 #151 commit 411f498a270aeebe33b4cca0bfe1d6176bb53d01 Author: Darryl Pogue Date: 2015-01-27T04:45:25Z CB-5059 Add a CookieManager abstraction for pluggable webviews. Crosswalk and GeckoView implementations of CordovaWebView can provide their own ICordovaCookieManager implementation for plugins to use. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237184#comment-14237184 ] ASF GitHub Bot commented on CB-5059: Github user AleksMeshkov commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/8#issuecomment-65941627 Hi! I'm not android developer. So the last post is complicated for me to understand... I think I have the same issue described here. Can guys please look? https://github.com/MobileChromeApps/mobile-chrome-apps/issues/464 So what should I do to resolve it? Thanks in advance! > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14041812#comment-14041812 ] ASF GitHub Bot commented on CB-5059: Github user junmin-zhu closed the pull request at: https://github.com/apache/cordova-plugin-file-transfer/pull/8 > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14041811#comment-14041811 ] ASF GitHub Bot commented on CB-5059: Github user junmin-zhu commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/8#issuecomment-46939573 As you known, we try to replace the default webview with crosswalk as backend of the Cordova. And there is forked project (https://github.com/crosswalk-project/crosswalk-cordova-android) for this. But the filetransfer plugin requests the cookie support, which would crash the application in our solution. Because the cookie support requires android.webkit.CookieManager, which is highly depended on the default webview, which is missed in our solution. If you still want cookie support, I suggest to add "CookieSyncManager.createInstance(Context)" before use the CookieManager as the android official document (http://developer.android.com/reference/android/webkit/CookieManager.html#getInstance%28%29) . Or you may have better suggestion for this. Anyway, I will close this PR. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037700#comment-14037700 ] ASF GitHub Bot commented on CB-5059: Github user clelland commented on the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/8#issuecomment-46603710 Junmin, can you comment any more on this? I'm not sure what the root issue is? Does the current filetransfer plugin cause a crash with the crosswalk backend? If so, can we create a test case for that? We definitely do want to keep cookie support for filetransfer, so if there are changes needed to the Cordova Crosswalk Webview to enable cookies, then I'd like to fix it there. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > --- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer >Affects Versions: Master > Environment: cordova-android, git branch 3.0.x >Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.2#6252)