Unable to run Android - DeviceReady in cordova - android

I am unable to run android's device ready function (not getting fired). How do I fix it? I have target sdk 22 and cordova 5.1.1 and android studio 1.0.1.
My index.html:
<!DOCTYPE html>
<html>
<head>
<title>Device Ready Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
</head>
<body onload="onLoad()">
</body>
</html>
index.js:
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// device APIs are available
//
function onDeviceReady() {
window.addEventListener("batterystatus", onBatteryStatus, false);
}
// Handle the batterystatus event
//
function onBatteryStatus(info) {
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
And where will this get logged : console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
If I run on command propmpt: cordova build:
Total time: 7.545 secs
C:\Users\salangar\hello\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\Users\salangar\hello\platform
s\android\gradlew cdvBuildDebug -b C:\Users\salangar\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\salangar\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Logcat display:
I/WebViewFactory﹕ Loading com.android.webview version 39 (1737576-arm) (code 300001)
07-02 11:10:44.806 HelloWorld I/LibraryLoader﹕ Time to load native libraries: 726 ms (timestamps 7130-7856)
07-02 11:10:44.824 HelloWorld I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
07-02 11:10:44.979 HelloWorld V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1) {951e68}
07-02 11:10:44.990 HelloWorld I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
07-02 11:10:45.113 HelloWorld I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true
07-02 11:10:45.021 HelloWorld I/chromium﹕ [INFO:library_loader_hooks.cc(104)] Chromium logging enabled: level = 0, default verbosity = 0
07-02 11:10:45.140 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:45.448 HelloWorld W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
07-02 11:10:45.575 HelloWorld W/chromium﹕ [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
07-02 11:10:45.590 HelloWorld I/chromium﹕ [INFO:aw_browser_main_parts.cc(65)] Load from apk succesful, fd=31 off=46184 len=3037
07-02 11:10:45.614 HelloWorld I/chromium﹕ [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:32 off:229484 len:1089587
07-02 11:10:45.828 HelloWorld E/chromium﹕ [ERROR:gl_surface_egl.cc(165)] No suitable EGL configs found.
07-02 11:10:45.829 HelloWorld E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
07-02 11:10:45.835 HelloWorld E/chromium﹕ [ERROR:browser_main_loop.cc(988)] GLSurface::InitializeOneOff failed
07-02 11:10:46.790 HelloWorld W/chromium﹕ [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
07-02 11:10:47.032 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.115 HelloWorld W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
07-02 11:10:47.328 HelloWorld D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown
07-02 11:10:47.408 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.408 HelloWorld W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-02 11:10:47.712 HelloWorld I/art﹕ Background sticky concurrent mark sweep GC freed 3517(255KB) AllocSpace objects, 2(32KB) LOS objects, 31% free, 764KB/1117KB, paused 2.313ms total 499.804ms
07-02 11:10:48.445 HelloWorld D/gralloc_goldfish﹕ Emulator without GPU emulation detected.
07-02 11:10:55.758 HelloWorld D/JsMessageQueue﹕ Set native->JS mode to OnlineEventsBridgeMode
07-02 11:10:56.152 HelloWorld I/art﹕ Background partial concurrent mark sweep GC freed 3730(208KB) AllocSpace objects, 1(16KB) LOS objects, 53% free, 887KB/1911KB, paused 1.825ms total 326.232ms
07-02 11:10:57.749 HelloWorld I/Choreographer﹕ Skipped 45 frames! The application may be doing too much work on its main thread.
07-02 11:11:00.752 HelloWorld I/Choreographer﹕ Skipped 54 frames! The application may be doing too much work on its main thread.
07-02 11:11:01.075 HelloWorld I/Choreographer﹕ Skipped 31 frames! The application may be doing too much work on its main thread.
07-02 11:11:01.545 HelloWorld I/chromium﹕ [INFO:CONSOLE(1188)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/cordova.js (1188)
07-02 11:11:01.750 HelloWorld I/chromium﹕ [INFO:CONSOLE(1181)] "Channel not fired: onPluginsReady", source: file:///android_asset/www/cordova.js (1181)
07-02 11:11:01.752 HelloWorld I/chromium﹕ [INFO:CONSOLE(1181)] "Channel not fired: onCordovaReady", source: file:///android_asset/www/cordova.js (1181)
07-02 11:11:03.655 HelloWorld W/PluginManager﹕ THREAD WARNING: exec() call to CoreAndroid.show blocked the main thread for 161ms. Plugin should use CordovaInterface.getThreadPool().
07-02 11:11:04.699 HelloWorld I/chromium﹕ [INFO:CONSOLE(47)] "Received Event: deviceready", source: file:///android_asset/www/js/index.js (47)
07-02 11:11:27.708 HelloWorld I/Choreographer﹕ Skipped 33 frames! The application may be doing too much work on its main thread.
07-02 11:11:28.112 HelloWorld I/Choreographer﹕ Skipped 34 frames! The application may be doing too much work on its main thread.
07-02 11:11:58.646 HelloWorld I/Choreographer﹕ Skipped 33 frames! The application may be doing too much work on its main thread.

device ready function (not getting fired). How do I fix it?
You don't need to use onLoad() function to call deviceready event.
instead of this :-
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
just write :-
document.addEventListener("deviceready", onDeviceReady, false);
and another thing is you need to write the script cordova.js part inside the body tag and add the index.js file like the cordova.js.
where will this get logged : console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
This log is print in logcat.
Hope this help :) if you have any difficulties please let me know.

Related

Qt - Android app crashes immediately

I am trying to run an android app, I wrote in C++ using Qt, on my smartphone.
I am able to deploy the app and start running. But it immediately shuts down, without any error message or whatsoever on my phone. This is however what I can see in my Qt IDE for the Application output:
Starting remote process.I/ActivityManager( 764): Start proc org.qtproject.example.android for activity org.qtproject.example.android/org.qtproject.qt5.android.bindings.QtActivity: pid=16671 uid=10112 gids={50112, 9997, 3003, 1028, 1015} abi=armeabi-v7a
I/art (16671): Late-enabling -Xcheck:jni
I/art (16671): VMHOOK: rlim_cur : 0 pid:16671
I/QtCore (16671): Start
I/Qt (16671): qt start
D/Atlas (16671): Validating map...
D/FindExtension(16671): FindExtension: before mHardwareRenderer.initialize, mSurface.isValid() = true
I/Adreno-EGL(16671): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020 - CR771817 ()
I/Adreno-EGL(16671): OpenGL ES Shader Compiler Version: E031.25.03.06
I/Adreno-EGL(16671): Build Date: 03/04/15 Wed
I/Adreno-EGL(16671): Local Branch:
I/Adreno-EGL(16671): Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.AF.1.1_RB1.05.00.02.006.020
I/Adreno-EGL(16671): Local Patches: NONE
I/Adreno-EGL(16671): Reconstruct Branch: NOTHING
I/InputMethodManagerService( 764): Enable input method client, pid=16671
I/InputMethodManagerService( 764): Disable input method client, pid=16671
I/ActivityManager( 764): Recipient 16671
E/InputEventReceiver( 1202): Looper::removeFd(71) is failed, result(0), input channel 'ClientState{37476efb uid 10112 pid 16671} (c)'
D/Process ( 764): killProcessQuiet, pid=16671
I/ActivityManager( 764): Process org.qtproject.example.android (pid 16671) has died
"org.qtproject.example.android" died.
This also happens when I just deploy a blank project, which only contains a pushbutton which I put using Qtcreator.
This is my bugreport: https://www.dropbox.com/s/ven5pby2dy3x4uw/bugreport-2017-08-31-09-34-57.txt?dl=0
What am I doing incorrectly?
Thanks

Cannot connect to mobilefirst adapter from device

Migrated our application from 6.2 to 7.0, the mobile web app works great on the phone as well as manually calling the HTTP js adapters. However when exported the apk to a phone, the application starts up but when invoking an adapter for data a 403 error is returned:
{"status":403,"invocationContext":null}
and the only server log:
"POST /SFMobileStudent/authorization/v1/clients/instance HTTP/1.1" 403 64 "-" "WLNativeAPI(bullhead; MMB29Q; Nexus 5X; SDK 23; Android 6.0.1)"
The adapter is doesn't have any security on it either
securityTest="wl_unprotected"
Not sure what we are missing, is there added/required security for 7.0?
Not a whole lot there but you can see the traffic from the device (comcast) to the server. I don't know what any of it means, just sort of repeats. tcpdump packet capture:
removed
LogCat
I/chromium(29279): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin170261306 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"\n\n403 Forbidden</title>\n</head>\nForbidden</h1>\nYou don't have permission to access /SFMobileStudent/authorization/v1/clients/instance\non this server.</p>\n\nIBM_HTTP_Server at mobilet.sfcollege.edu Port 443</address>\n</body></html>\n","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
More logCat
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 170ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11035): GC_EXPLICIT freed 153K, 39% free 8875K/14500K, paused 2ms+3ms, total 49ms
I/ConvCursor(11035): ConversationCursor caching complete pos=18
E/ThermalDaemon( 356): set temp 65000 to name /sys/class/hwmon/hwmon0/device/temp1_max
E/ThermalDaemon( 356): set temp -128000 to name /sys/class/hwmon/hwmon0/device/temp1_max_hyst
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
D/WifiStateMachine( 917): handleMessage: E msg.what=151572
D/WifiStateMachine( 917): processMsg: ConnectedState
D/WifiStateMachine( 917): processMsg: L2ConnectedState
D/WifiStateMachine( 917): handleMessage: X
D/WifiWatchdogStateMachine( 917): Fetch RSSI succeed, rssi=-68 mrssi=-68 txbad=245 txgood=47234
D/WifiWatchdogStateMachine( 917): Incremental loss=0/6 Current loss=0% volume=10.06
D/WifiWatchdogStateMachine( 917): Cache updated: loss[-68]=0% volume=27.82
D/dalvikvm(11209): GC_CONCURRENT freed 2032K, 45% free 8070K/14500K, paused 4ms+2ms, total 57ms
D/dalvikvm(11209): WAIT_FOR_CONCURRENT_GC blocked 8ms
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.deleteAllAuthData blocked the main thread for 27ms. Plugin should use CordovaInterface.getThreadPool().
W/PluginManager(11209): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 97ms. Plugin should use CordovaInterface.getThreadPool().
D/dalvikvm(11209): Trying to load lib /data/app-lib/com.SFStudent-1/libauthjni.so 0x41d12ef8
D/dalvikvm(11209): Shared lib '/data/app-lib/com.SFStudent-1/libauthjni.so' already loaded in same CL 0x41d12ef8
E/NONE (11209): [/apps/services/api/SFStudent/android/query] failure. state: 403, response: undefined
I/chromium(11209): [INFO:CONSOLE(301)] "Error in Error callbackId: WLAuthorizationManagerPlugin1867260175 : ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (301)
I/chromium(11209): [INFO:CONSOLE(1080)] "processMessage failed: Error: ReferenceError: deferred is not defined", source: file:///android_asset/www/default/worklight/cordova.js (1080)
I/chromium(11209): [INFO:CONSOLE(1081)] "processMessage failed: Stack: ReferenceError: deferred is not defined
I/chromium(11209): at Object.InitializeService.WL.Client.invokeProcedure.onFailure (eval at (file:///android_asset/www/default/js/libs/jquery/jquery-min.js:4:14070), :15:8)
I/chromium(11209): at Object.options.onFailure (file:///android_asset/www/default/worklight/worklight.js:8806:29)
I/chromium(11209): at Object.onInvokeProcedureFailure [as onFailure] (file:///android_asset/www/default/worklight/worklight.js:8718:14)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onFailure (file:///android_asset/www/default/worklight/worklight.js:3651:26)
I/chromium(11209): at klass.window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailure (file:///android_asset/www/default/worklight/worklight.js:3600:12)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/worklight.js:3440:27)
I/chromium(11209): at Object. (file:///android_asset/www/default/worklight/wljq.js:1202:33)
I/chromium(11209): at fire (file:///android_asset/www/default/worklight/wljq.js:1047:30)
I/chromium(11209): at Object.self.fireWith [as rejectWith] (file:///android_asset/www/default/worklight/wljq.js:1158:7)
I/chromium(11209): at Object.deferred.(anonymous function) [as reject] (file:///android_asset/www/default/worklight/wljq.js:1247:34)", source: file:///android_asset/www/default/worklight/cordova.js (1081)
I/chromium(11209): [INFO:CONSOLE(1082)] "processMessage failed: Message: F09 WLAuthorizationManagerPlugin1867260175 {"wlFailureStatus":"UNEXPECTED_ERROR","status":403,"responseText":"/*-secure-\n{\"reason\":\"App authenticity security check failed\"}*/","statusText":"Unexpected errorCode occurred. Please try again."}", source: file:///android_asset/www/default/worklight/cordova.js (1082)
Resolved. There is a new tag within the application-descriptor:
directUpdateAuthenticityPublicKey
Updated, exported the application with the keystore and all now works. Thanks for the help.
The issue:
http://www-01.ibm.com/support/docview.wss?uid=swg21970348

Cordova 6.0.0 Unfortunaly, HelloWorld has stopped

I try to use cordova in windows for create a simple android app. I create the first project using command cordova create hello com.example.hello HelloWorld
I add the Android platform, I try to build and build success, but when I emulate the app don't start and receive the error on screen:
Unfortunaly, HelloWorld has stopped.
logcat:
03-16 16:44:19.073 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /data/app/com.example.hello-1/lib/x86
03-16 16:44:19.266 2442-2442/com.example.hello I/WebViewFactory﹕ Loading com.android.webview version 44.0.2403.119 (code 246011910)
03-16 16:44:19.310 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /system/app/webview/lib/x86
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Time to load native libraries: 62 ms (timestamps 9389-9451)
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
03-16 16:44:19.392 2442-2442/com.example.hello I/chromium﹕ [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
03-16 16:44:19.483 2442-2442/com.example.hello I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true
03-16 16:44:19.484 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.486 2442-2442/com.example.hello E/SysUtils﹕ ApplicationContext is null in ApplicationStatus
03-16 16:44:19.568 2442-2442/com.example.hello W/chromium﹕ [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY)
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed
03-16 16:44:19.628 2442-2468/com.example.hello W/AudioManagerAndroid﹕ Requires BLUETOOTH permission
03-16 16:44:19.667 2442-2442/com.example.hello E/DataReductionProxySettingListener﹕ No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
03-16 16:44:19.757 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:19.762 2442-2442/com.example.hello W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
03-16 16:44:20.182 2442-2442/com.example.hello D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.246 2442-2452/com.example.hello I/art﹕ Background sticky concurrent mark sweep GC freed 7609(505KB) AllocSpace objects, 3(60KB) LOS objects, 64% free, 861KB/2MB, paused 1.373ms total 448.240ms
03-16 16:44:20.310 2442-2466/com.example.hello W/chromium﹕ [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
03-16 16:44:20.368 2442-2442/com.example.hello D/gralloc_goldfish﹕ Emulator without host-side GPU emulation detected.
03-16 16:44:20.376 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.410 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread
03-16 16:44:20.586 2442-2452/com.example.hello I/art﹕ Background partial concurrent mark sweep GC freed 1447(97KB) AllocSpace objects, 2(2MB) LOS objects, 35% free, 926KB/1438KB, paused 2.668ms total 209.255ms
03-16 16:44:20.587 2442-2480/com.example.hello A/chromium﹕ [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
03-16 16:44:20.587 2442-2480/com.example.hello A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 2480 (GpuThread)
This is almost exactly the same error as Error in Android Programming while connecting to Phonegap. It seems to be related to this bug from ionic.
According to them, "switching from Snapshot to Host GPU solved this problem."
This makes sense as three of the last errors are related to opengl.
Note to various moderators: I tried to close one as a duplicate of the other, but that can't be done because there's no answer. Tried looking on meta for 'duplicate unanswered' but they simply say not to do it. I figure I'll post a possible answer and if either one is accepted, I'll close the other as a dup.

Android - Cordova 3.5.0 deviceready not firing after installing media plugin

This is interesting and weird issue.
First I created Cordova project locally. I'm not using Bd.
using
cordova create test com.test.project.story "Test"
Which worked successfully!
Then I added android platform, using
cordova platform add android
Worked successfully.
Then I built the project using
cordova build
Worked, again.
I opened the project from Eclipse and ran it on emulator.
Worked properly.
Then I thought of adding some plugins in my project using
cordova plugin add org.apache.cordova.file
cordova plugin add org.apache.cordova.media
Removed the android platform and added the platform again. Then built and ran the project on emulator.
The screen was stuck on Connecting to device forever.
I rechecked if I was using the correct cordova.js for android platform.
It is correct, and it says
// Platform: android
// 3.5.0
Checked ADB log and there are a lot of suspicious things going on.
D/CordovaWebViewClient( 1581): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/TilesManager( 1581): new EGLContext from framework: 2a1a2a10
D/GLWebViewState( 1581): Reinit shader
D/dalvikvm( 270): GC_CONCURRENT freed 322K, 46% free 9831K/17991K, paused 813ms+21ms, total 2252ms
D/dalvikvm( 270): WAIT_FOR_CONCURRENT_GC blocked 906ms
D/GLWebViewState( 1581): Reinit transferQueue
W/ApplicationContext( 1581): Unable to create external files directory
D/ ( 1581): HostConnection::get() New Host Connection established 0x4a5f8558, tid 1605
E/PluginManager( 1581): Uncaught exception from plugin
E/PluginManager( 1581): java.lang.NullPointerException
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.requestAllPaths(FileUtils.java:866)
E/PluginManager( 1581): at org.apache.cordova.file.FileUtils.execute(FileUtils.java:348)
E/PluginManager( 1581): at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
E/PluginManager( 1581): at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
E/PluginManager( 1581): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
E/PluginManager( 1581): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
E/PluginManager( 1581): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
E/PluginManager( 1581): at android.os.Handler.dispatchMessage(Handler.java:99)
E/PluginManager( 1581): at android.os.Looper.loop(Looper.java:137)
E/PluginManager( 1581): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/PluginManager( 1581): at java.lang.reflect.Method.invokeNative(Native Method)
E/PluginManager( 1581): at java.lang.reflect.Method.invoke(Method.java:511)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/PluginManager( 1581): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/PluginManager( 1581): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 270): GC_FOR_ALLOC freed 593K, 48% free 9509K/17991K, paused 275ms, total 280ms
I/dalvikvm-heap( 270): Grow heap (frag case) to 10.559MB for 1286224-byte allocation
D/dalvikvm( 270): GC_FOR_ALLOC freed 2K, 41% free 10763K/17991K, paused 182ms, total 186ms
D/dalvikvm( 270): GC_CONCURRENT freed 61K, 38% free 11284K/17991K, paused 41ms+11ms, total 304ms
D/CordovaActivity( 1581): onMessage(spinner,stop)
D/dalvikvm( 270): GC_CONCURRENT freed 2676K, 43% free 10293K/17991K, paused 16ms+29ms, total 130ms
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1154 : deviceready has not fired after 5 seconds.
I/Web Console( 1581): deviceready has not fired after 5 seconds. at file:///android_asset/www/cordova.js:1154
D/CordovaLog( 1581): file:///android_asset/www/cordova.js: Line 1147 : Channel not fired: onFileSystemPathsReady
I/Web Console( 1581): Channel not fired: onFileSystemPathsReady at file:///android_asset/www/cordova.js:1147
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 7ms+5ms, total 67ms
D/dalvikvm( 251): GC_CONCURRENT freed 384K, 9% free 6556K/7175K, paused 6ms+13ms, total 62ms
I/EventLogService( 240): Aggregate from 1403981475023 (log), 1403981475023 (data)
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
What's going on here?
UPDATE:
Works fine on iOS.
I ran into the same issue.
What worked for me was using a different version of the File plugin found here:
https://github.com/onflapp/cordova-plugin-file
Related topic: Cordova File plugin never becomes ready in Android
for me it got solved by adding cordova.js in index.html( though its not required in ripple)
<script src="cordova.js"></script>
I ran into the same and resolved using apache official dev build File plugin:
https://github.com/apache/cordova-plugin-file/
Funny enough cordova release 1.3.1-dev is more stable then official release 1.2.0 ...
By now a newer version of the file plugin has been released. You should no longer experience the issue with the updated version (and there is thus no longer a need to downgrade).
I had a similar issue. deviceReady event was not firing (ionic app on android). Worked after I removed the file plugin v1.2 and then added v1.1 instead.

Paypal Android SDK in PRODUCTION ENVIRONMENT always shows 'TRANSACTION_REFUSED'

I successfully completed the Paypal sandbox account testing. But when I came into production environment it always shows the error:'TRANSACTION REFUSED'. Can anyone please tell me why its happening?
What is App redirect URLs and return URL? Is it necessary to give both while creating an app in developer.paypal.com?
here is what my Logcat shows:
07-02 14:34:37.382: E/n(274): com.paypal.android.p2pmobile not found.
07-02 14:34:37.732: D/dalvikvm(274): GC_EXTERNAL_ALLOC freed 9617 objects / 730512 bytes in 117ms
07-02 14:34:40.493: W/KeyCharacterMap(274): No keyboard for id 0
07-02 14:34:40.493: W/KeyCharacterMap(274): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
07-02 14:34:42.132: D/NativeCrypto(274): Freeing OpenSSL session
07-02 14:34:45.221: D/NativeCrypto(274): Freeing OpenSSL session
07-02 14:34:45.221: D/NativeCrypto(274): Freeing OpenSSL session
07-02 14:34:45.231: D/dalvikvm(274): GC_FOR_MALLOC freed 9678 objects / 719704 bytes in 212ms
07-02 14:35:01.942: W/paypal.sdk(274): W SN:16 PayPal Debug-ID: c071e094f8f48 [live, 2.2.2;release]
07-02 14:35:05.161: W/paypal.sdk(274): Y SN:19 PayPal Debug-ID: 70dc1489f9faa [live, 2.2.2;release]
07-02 14:35:05.171: E/paypal.sdk(274): request failure with http statusCode:400,exception:org.apache.http.client.HttpResponseException: Bad Request
07-02 14:35:05.171: E/paypal.sdk(274): request failed with server response:{"name":"TRANSACTION_REFUSED","message":"The request was refused.{0}","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#TRANSACTION_REFUSED","debug_id":"70dc1489f9faa"}
07-02 14:35:05.171: E/PayPalService(274): TRANSACTION_REFUSED
I looked into the PayPal Debug-ID that you provided - the error indicates that the payer account may not be associated with a usable funding source. Can you check the payer account you are using?

Categories

Resources