Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Master
-
None
-
None
-
original test case environment described below (Android), but problem will occur anywhere
Description
When using Android Emulator with weinre, JS errors log only sometimes.
After reading that weinre needs a little time to setup before it will deal with console entries I made a test app that does the following:
console.log( 'Hello now' );
setTimeout( "console.log( 'Hello 10' )", 10000 );
setTimeout( "console.log( 'Hello 20' )", 20000 );
setTimeout( "console.log( 'Hello 30' )", 30000 );
setTimeout( "console.log( 'Hello 40' )", 40000 );
setTimeout( "console.log( 'Hello 50' )", 50000 );
setTimeout( "console.log( 'Hello 60' )", 60000 );
I've ran this many times and get similar logcat entries that look like this:
06-05 23:10:19.992: D/PhoneGapLog(969): Hello now
06-05 23:10:19.992: D/PhoneGapLog(969): file:///android_asset/www/index.html: Line 39 : Hello now
06-05 23:10:20.000: I/Web Console(969): Hello now at file:///android_asset/www/index.html:39
06-05 23:10:20.110: D/PhoneGapLog(969): error occurred: [unknown filename]:[unknown lineno]: [unknown message]
06-05 23:10:20.110: D/PhoneGapLog(969): http://192.168.1.9:8081/target/target-script-min.js: Line 3176 : error occurred: [unknown filename]:[unknown lineno]: [unknown message]
06-05 23:10:20.110: E/Web Console(969): error occurred: [unknown filename]:[unknown lineno]: [unknown message] at http://192.168.1.9:8081/target/target-script-min.js:3176
06-05 23:10:20.120: D/PhoneGapLog(969): Uncaught TypeError: Cannot read property 'code' of undefined
06-05 23:10:20.120: D/PhoneGapLog(969): http://192.168.1.9:8081/target/target-script-min.js: Line 3478 : Uncaught TypeError: Cannot read property 'code' of undefined
06-05 23:10:20.120: E/Web Console(969): Uncaught TypeError: Cannot read property 'code' of undefined at http://192.168.1.9:8081/target/target-script-min.js:3478
I see the 'Hello now' entry in logcat, but I don't see it in weinre. The only entry I see in weinre is 'Hello 10'.
Does anyone know what these logcat errors mean or why only one out of my 7 test console messages are being picked up by weinre?