Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging in Android Webkit: unhelpful exception

I'm debugging a web app on an Android phone running webkit (browser listed as "Webkit 3.1"). I'm using weinre to view the console, where I'm logging debug information.

The log messages from Android webkit are very different than in other browsers -- instead of being the normal output, most read:

[ Exception: TypeError: Result of expression 'Object.getOwnPropertyNames' [undefined] is not a function. ] 

I'm not sure how to interpret this message, or how to proceed debugging.

like image 862
Matt Hampel Avatar asked Dec 11 '25 01:12

Matt Hampel


1 Answers

Just copy the expression in question and try to run it with a valid argument in the console: Object.getOwnPropertyNames(Object). For future reference, compare the useragent to the Webkit version in which getOwnPropertyNames was implemented.

like image 53
Paul Sweatte Avatar answered Dec 12 '25 14:12

Paul Sweatte



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!