I recently upgraded from Cordova 2.5 to Cordova 2.7. After upgrading, I noticed that none of my javascript console.logs were firing from the application when viewing in Chrome. They appear just fine using 2.5.
I initially thought this issue may be related to the XHR function added in the new version (see this thread - Why does Cordova 2.7.0 JS seemingly no longer work on remote pages?)
But after commenting out that block of code, I'm still having issues in that my logs aren't appearing.
Is anyone else having this problem? Any thoughts on how to remedy the situation (other than using an older version of Cordova)?
Thanks in advance.
I had the same problem, then I used this workaround to don't load cordova.js when I'm debugging in chrome.
<script>
if (navigator.userAgent.toLowerCase().match('chrome'))
{
console.log("Browser", "chrome");
}else{
var fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", "cordova-2.7.0.js");
document.getElementsByTagName("head")[0].appendChild(fileref);
console.log("Browser", navigator.userAgent.toLowerCase());
}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With