Closed antsemot closed 10 years ago
@vetalert First, in Eclipse make sure you are able to install and run the "Hello World" from PhoneGap. That is essential. Once that is working, then try dropping DrupalGap on top of it.
Watch the LogCat message window in Eclipse to see any error messages that DrupalGap may report via console.log(). You'll have to report an error message back, or I won't be able to help.
As far as Ripple not being able to connect to a remote site, you most likely need to launch Chrome with web security disabled (http://www.drupalgap.org/node/223), and then "Disable" the "Cross Domain Proxy" under Ripple's settings.
1) Phonegap runs fine. I emulated the app on Nexus 7 device and it works.
2) Here are the log that I retrieved from LogCat after putting DrupalGap on top of the app:-
04-10 11:45:54.398: D/CordovaActivity(1912): Resuming the App 04-10 11:45:54.398: D/CordovaActivity(1912): CB-3064: The errorUrl is null 04-10 11:45:54.408: D/CordovaNetworkManager(1912): Connection Type: wifi 04-10 11:45:54.408: D/CordovaActivity(1912): onMessage(networkconnection,wifi) 04-10 11:45:54.418: D/SoftKeyboardDetect(1912): Ignore this event 04-10 11:45:54.438: D/OpenGLRenderer(1912): Enabling debug mode 0 04-10 11:45:54.448: D/SoftKeyboardDetect(1912): Ignore this event 04-10 11:45:54.488: D/CordovaActivity(1912): onMessage(onPageStarted,file:///android_asset/www/index.html) 04-10 11:45:54.578: D/CordovaLog(1912): file:///android_asset/www/index.html: Line 7 : Viewport target-densitydpi is not supported. 04-10 11:45:54.578: I/chromium(1912): [INFO:CONSOLE(7)] "Viewport target-densitydpi is not supported.", source: file:///android_asset/www/index.html (7) 04-10 11:45:54.908: D/SoftKeyboardDetect(1912): Ignore this event 04-10 11:45:55.439: D/CordovaWebViewClient(1912): onPageFinished(file:///android_asset/www/index.html) 04-10 11:45:55.439: D/CordovaActivity(1912): onMessage(onPageFinished,file:///android_asset/www/index.html) 04-10 11:45:55.499: D/dalvikvm(1912): GC_FOR_ALLOC freed 276K, 4% free 9209K/9520K, paused 15ms, total 15ms 04-10 11:45:55.619: D/CordovaActivity(1912): onMessage(spinner,stop) 04-10 11:45:55.629: D/CordovaNetworkManager(1912): Connection Type: wifi 04-10 11:45:55.659: I/chromium(1912): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 04-10 11:45:55.699: I/chromium(1912): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported 04-10 11:45:55.709: E/qdutils(1912): FBIOGET_FSCREENINFO failed 04-10 11:45:55.739: I/App(1912): WARNING: Back Button Default Behavior will be overridden. The backbutton event will be fired! 04-10 11:45:55.749: W/IceCreamCordovaWebViewClient(1912): URL blocked by whitelist: http://biodiversity.fbb.utm.my/myrice//?q=services/session/token 04-10 11:45:55.759: D/CordovaLog(1912): file:///android_asset/www/jdrupal-7.x-1.0-rc2.min.js: Line 28 : http://biodiversity.fbb.utm.my/myrice//?q=services/session/token - 404 - Not Found 04-10 11:45:55.759: I/chromium(1912): [INFO:CONSOLE(28)] "http://biodiversity.fbb.utm.my/myrice//?q=services/session/token - 404 - Not Found", source: file:///android_asset/www/jdrupal-7.x-1.0-rc2.min.js (28) 04-10 11:45:55.759: D/CordovaLog(1912): file:///android_asset/www/jdrupal-7.x-1.0-rc2.min.js: Line 28 : 04-10 11:45:55.759: I/chromium(1912): [INFO:CONSOLE(28)] "", source: file:///android_asset/www/jdrupal-7.x-1.0-rc2.min.js (28) 04-10 11:45:57.441: D/CordovaActivity(1912): onMessage(spinner,stop)
It looks like this is the problem:
04-10 11:45:55.749: W/IceCreamCordovaWebViewClient(1912): URL blocked by whitelist: http://biodiversity.fbb.utm.my/myrice//?q=services/session/token
Google why your Emulator would "URL blocked by whitelist", and that should get you past the problem.
Also, in your settings.js file, verify you don't have a trailing slash at the end of the 'site_path' variable.
Hello @signalpoint. I've managed to solve the URL problem by doing a clean install of the app. Probably something was amiss during the previous installation. However every time I ty running the app on my device (Nexus 7), it says 'no connection'. Here are the logs :-
onPageFinished(file:///android_asset/www/index.html#offline)
04-13 12:09:30.526: D/CordovaActivity(12200): onMessage(onPageFinished,file:///android_asset/www/index.html#offline)
04-13 12:11:21.945: I/CordovaLog(12816): Changing log level to DEBUG(3)
04-13 12:11:21.945: I/CordovaLog(12816): Found start page location: index.html
04-13 12:11:21.945: D/Whitelist(12816): Unlimited access to network resources
04-13 12:11:21.945: D/CordovaActivity(12816): CordovaActivity.onCreate()
04-13 12:11:21.965: V/WebViewChromium(12816): Binding Chromium to the background looper Looper (main, tid 1) {41e62590}
04-13 12:11:21.965: I/chromium(12816): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
04-13 12:11:21.965: I/BrowserProcessMain(12816): Initializing chromium process, renderers=0
04-13 12:11:21.975: W/chromium(12816): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
04-13 12:11:21.975: I/Adreno-EGL(12816):
I reckon this is the problem:
04-13 12:11:23.517: D/CordovaLog(12816): file:///android_asset/www/bin/drupalgap.js: Line 603 : drupalgap_check_connection - TypeError: Cannot read property 'type' of undefined 04-13 12:11:23.517: I/chromium(12816): [INFO:CONSOLE(603)] "drupalgap_check_connection - TypeError: Cannot read property 'type' of undefined", source: file:///android_asset/www/bin/drupalgap.js (603)
I've tried emulating on devices and genymotion. Both throws the same error "offline: No connection found!". The page says
"Failed Connection: Oops! We couldn't connect to:
undefined"
Updates:
I've replaced the drupalgap.js file with the latest one, and instead of "Failed Connection: Oops! We couldn't connect to:
undefined"
it says
"Failed Connection: Oops! We couldn't connect to:
Updates:
Issue solved. Drupalgap on remote website is not installed properly. Did a clean reinstall and now everything works. Thanks!
@vetalert - thanks for the updates, I'm glad it is working now. I'll add notes about trying a clean re-install of the module to the troubleshooting guide.
I've tried running the latest drupalgap app on my device (through Eclipse), but encountered WSOD several times. I just got the source codes from github, and replaced them inside the www directory.
I've tried emulating the same Drupalgap app in Ripple connecting to a Drupal site in my local machine and it works. Steps taken are below:
1) extract Drupalgap zip in www/DrupalSite/DGap 2) change the URL in DGap/app/settings.js (http://localhost/DrupalSite) 3) open up Chrome, Enable Ripple, Apache Cordova 4) app loads
When I tried connecting the same setting to remote sites (using Ripple), it shows bad connection error; emulating in devices through Eclipse gives WSOD. I've used the Drupalgap app downloaded from Google Play to connect to the same sites and it works perfectly.