<div dir="ltr">Let me start a new thread for this issue.<div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 1:51 AM, Anton Hughes <span dir="ltr"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, I found the problem (see below) - but not the solution.<div><br></div><div><div>file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear.ajax.js Failed to load resource: net::ERR_FILE_NOT_FOUND</div><div>file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear-push.js Failed to load resource: net::ERR_FILE_NOT_FOUND</div><div>cordova.js:1418 Uncaught Error: Module aerogear-cordova-push.AeroGear.ajax does not exist.</div><div>cordova.js:1183 deviceready has not fired after 5 seconds.</div><div>cordova.js:1176 Channel not fired: onPluginsReady</div><div>cordova.js:1176 Channel not fired: onCordovaReady</div></div><div><br></div><div>The resources that failed to load are present in the project.</div><div><img src="cid:ii_1526bf67f95fb003" alt="Inline image 1" width="442" height="341"><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 12:51 AM, Anton Hughes <span dir="ltr"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok so I managed to deploy my cordova app onto genymotion. Actually that wasnt too difficult. <div>But, alas, it still does not connect to the UPS.</div><div><br></div><div>I have updated the pushServerURL value to use my hosts ip.</div><div><br></div><div>My index.html looks like this - I notice it is referencing cordova.js, but this file is missing in the eclipse project. I assume eclipse automagically adds it when the project is built.</div><div>Ive removed the send, variant and variant secret - to protect the identity of the innocent.</div><div><br></div><div><div><!DOCTYPE HTML></div><div><html></div><div><head></div><div> <title>Demo</title></div><div></head></div><div><body></div><div><br></div><div><script type="text/javascript" charset="utf-8" src="cordova.js"></script></div><div><script type="text/javascript" charset="utf-8" src="jquery_1.5.2.min.js"></script></div><div><br></div><div><script type="text/javascript"></div><div><br></div><div>var app = {</div><div><span style="white-space:pre-wrap">                </span> // Application Constructor</div><div><span style="white-space:pre-wrap">                </span> initialize: function() {</div><div><span style="white-space:pre-wrap">                </span> this.bindEvents();</div><div><span style="white-space:pre-wrap">                </span> },</div><div><span style="white-space:pre-wrap">                </span> // Bind Event Listeners</div><div><span style="white-space:pre-wrap">                </span> //</div><div><span style="white-space:pre-wrap">                </span> // Bind any events that are required on startup. Common events are:</div><div><span style="white-space:pre-wrap">                </span> // 'load', 'deviceready', 'offline', and 'online'.</div><div><span style="white-space:pre-wrap">                </span> bindEvents: function() {</div><div><span style="white-space:pre-wrap">                </span> document.addEventListener('deviceready', this.onDeviceReady, false);</div><div><span style="white-space:pre-wrap">                </span> },</div><div><span style="white-space:pre-wrap">                </span> // deviceready Event Handler</div><div><span style="white-space:pre-wrap">                </span> //</div><div><span style="white-space:pre-wrap">                </span> // The scope of 'this' is the event. In order to call the 'receivedEvent'</div><div><span style="white-space:pre-wrap">                </span> // function, we must explicitly call 'app.receivedEvent(...);'</div><div><span style="white-space:pre-wrap">                </span> onDeviceReady: function() {</div><div><span style="white-space:pre-wrap">                </span> app.receivedEvent('deviceready');</div><div><span style="white-space:pre-wrap">                </span> var pushConfig = {</div><div><span style="white-space:pre-wrap">                </span> pushServerURL: "<a href="http://192.168.1.40:8080/ag-push/" target="_blank">http://192.168.1.40:8080/ag-push/</a>",</div><div><span style="white-space:pre-wrap">                </span> android: { </div><div><span style="white-space:pre-wrap">                </span> senderID: "",</div><div><span style="white-space:pre-wrap">                </span> variantID: "",</div><div><span style="white-space:pre-wrap">                </span> variantSecret: ""</div><div><span style="white-space:pre-wrap">                </span> }</div><div><span style="white-space:pre-wrap">                </span> };</div><div><span style="white-space:pre-wrap">                </span>push.register(app.onNotification, successHandler, errorHandler, pushConfig);</div><div><br></div><div><span style="white-space:pre-wrap">                </span>function successHandler() {</div><div><span style="white-space:pre-wrap">                </span> console.log('success')</div><div><span style="white-space:pre-wrap">                </span>}</div><div><br></div><div><span style="white-space:pre-wrap">                </span>function errorHandler(message) {</div><div><span style="white-space:pre-wrap">                </span> console.log('error ' + message);</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>onNotification: function(event) {</div><div><span style="white-space:pre-wrap">                </span> alert(event.alert);</div><div><span style="white-space:pre-wrap">                </span>},</div><div><span style="white-space:pre-wrap">                </span>// Update DOM on a Received Event</div><div><span style="white-space:pre-wrap">                </span>receivedEvent: function(id) {</div><div><span style="white-space:pre-wrap">                </span> var parentElement = document.getElementById(id);</div><div><span style="white-space:pre-wrap">                </span> var listeningElement = parentElement.querySelector('.listening');</div><div><span style="white-space:pre-wrap">                </span> var receivedElement = parentElement.querySelector('.received');</div><div><br></div><div><span style="white-space:pre-wrap">                </span> listeningElement.setAttribute('style', 'display:none;');</div><div><span style="white-space:pre-wrap">                </span> receivedElement.setAttribute('style', 'display:block;');</div><div><br></div><div><span style="white-space:pre-wrap">                </span> console.log('Received Event: ' + id);</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">                </span>};</div><div><br></div><div><span style="white-space:pre-wrap">                </span>app.initialize();</div><div><br></div><div> document.addEventListener('deviceready', onDeviceReady, true);</div><div><br></div><div></script></div><div><div id="home"></div><div> <div id="app-status-div"></div><div> <ul id="app-status-ul"></div><div> <li>AeroGear PushPlugin Unified Push Demo</li></div><div> </ul></div><div> </div></div><div></div></div><div></body></div><div></html></div></div><div><br></div><div>Can anyone see anything obviously wrong?</div><div><br></div><div>How does one debug in such a situation?</div><div><br></div><div>Thanks</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 12:21 AM, Anton Hughes <span dir="ltr"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, I have managed to get setup with Genymotion, and have the google tools installed.<div><br></div><div>How, then, can I deploy the cordova project to the genymotion vm? Is there a way to do that from within Eclipse?</div><div><br></div><div>Thanks</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:35 PM, Anton Hughes <span dir="ltr"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Luke. I will try this. </div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:31 PM, Luke Holmquist <span dir="ltr"><<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Jan 22, 2016 at 8:28 AM, Anton Hughes <span dir="ltr"><<a href="mailto:kurrent93@gmail.com" target="_blank">kurrent93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:25 PM, Luke Holmquist <span dir="ltr"><<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">just a thought that popped into my head. The url pointing to your UPS server shouldn't be localhost, since there is no localhost on the device. not sure if thats how you have it configured, though. but this always bites me </blockquote></div><br></span>The wise expression of Homer Simpson comes rushing into mind!</div><div class="gmail_extra">I'm away from my dev environment, so cannot test - but, yes I am using localhost in the cordova project.</div><div class="gmail_extra"><br></div><div class="gmail_extra">So if not localhost, then what? </div></div></blockquote></div></div><div>if you are running the UPS server on your local machine, then it would be your IP instead of localhost. The device just needs to "see" it, so that means you need to be on the same network. unless you are running it in the cloud or something </div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>