{"id":1819,"date":"2022-08-30T15:19:42","date_gmt":"2022-08-30T15:19:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/every-webkit-based-browser-crashes-sites-using-omniture-why-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:42","modified_gmt":"2022-08-30T15:19:42","slug":"every-webkit-based-browser-crashes-sites-using-omniture-why-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/every-webkit-based-browser-crashes-sites-using-omniture-why-collection-of-common-programming-errors\/","title":{"rendered":"Every WebKit-based browser crashes sites using Omniture. Why?-Collection of common programming errors"},"content":{"rendered":"<p>Actually, a more accurate statement is:<\/p>\n<blockquote>\n<p><strong>Every<\/strong> WebKit-based browser crashes on http:\/\/m.allrecipes.com\/ but only in a Samsung Continuum SCH-i400 phone.<\/p>\n<\/blockquote>\n<p>I am trying to implement a WebView-based browser, mainly for learning purposes (there are way too many on the market, why add one?), and I was impressed by how quickly I could come up with a basic working one. I tested it on numerous sites on my <code>Samsung Continuum<\/code> phone and they all worked flawlessly, <strong>except for<\/strong> <code>m.allrecipes.com<\/code> .<\/p>\n<p>Whenever I tried to load that web page, I received the following NullPointerException:<\/p>\n<pre><code>E\/AndroidRuntime(3147): FATAL EXCEPTION: http10\nE\/AndroidRuntime(3147): java.lang.NullPointerException\nE\/AndroidRuntime(3147):     at android.net.http.CertificateChainValidator.doHandshakeAndValidateServerCertificates(CertificateChainValidator.java:194)\nE\/AndroidRuntime(3147):     at android.net.http.HttpsConnection.openConnection(HttpsConnection.java:308)\nE\/AndroidRuntime(3147):     at android.net.http.Connection.openHttpConnection(Connection.java:358)\nE\/AndroidRuntime(3147):     at android.net.http.Connection.processRequests(Connection.java:219)\nE\/AndroidRuntime(3147):     at android.net.http.ConnectionThread.run(ConnectionThread.java:113)\n<\/code><\/pre>\n<p>Unable to find an explanation for this in my code, I tried to see how other browsers behave, on this <code>Samsung Continuum<\/code> phone, when accessing <code>m.allrecipes.com<\/code>:<\/p>\n<p>The findings were very interesting: Dolphin, Opera, iBrowser and others had <strong>no problem<\/strong> whatsoever.<\/p>\n<p>But Free Private Browser, Voice Browser and Easy Browser all crashed immediately upon accessing <code>m.allrecipes.com<\/code> with the <strong>same exact stack trace<\/strong>.<\/p>\n<p>Thus, this problem is very easy to reproduce, if you can lay your hands on a <code>Samsung Continuum SCH-i400<\/code> unit.<\/p>\n<p>I know that the quickest and easiest way to solve this problem is by either using a different browser or getting rid of my phone. But I am looking to <strong>understand<\/strong> the source of the problem, because it may point out to potential problems down the road when using <code>WebKit<\/code>, possibly on other phones as well.<\/p>\n<p>So my questions are basically:<\/p>\n<ol>\n<li>What in <code>m.allrecipes.com<\/code> is so special that it triggers this <code>WebKit+Continuum<\/code> bug?<\/li>\n<li>What in <code>Samsung Continuum SCH-i400<\/code> is so special that it fails only on this website and only with a WebKit-based browser?<\/li>\n<li>What in WebKit is so special that it doesn&#8217;t like the combination of <code>Continuum+allrecipes.com<\/code>.<\/li>\n<li>Are there additional websites that trigger this behavior?<\/li>\n<\/ol>\n<p>Adding the log from Free Private Browser per @sarnold&#8217;s suggestion:<\/p>\n<pre><code>:13.195: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans, style = 0, uniqueID = 1\n:13.199: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans, style = 1, uniqueID = 2\n:13.199: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Serif, style = 0, uniqueID = 3\n:13.207: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Serif, style = 1, uniqueID = 4\n:13.207: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Serif, style = 2, uniqueID = 5\n:13.207: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Serif, style = 3, uniqueID = 6\n:13.207: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans Mono, style = 0, uniqueID = 7\n:13.211: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans Arabic, style = 0, uniqueID = 8\n:13.211: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans Hebrew, style = 0, uniqueID = 9\n:13.211: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans Thai, style = 0, uniqueID = 10\n:13.211: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans, style = 0, uniqueID = 11\n:13.215: D\/SKIA_FONT(5973): load_system_fonts(), name = Droid Sans Fallback, style = 0, uniqueID = 12\n:13.215: D\/SKIA_FONT(5973): load_system_fonts(), oldSansUID = 0, newSansUID = 1\n:13.215: D\/SKIA_FONT(5973): load_system_fonts(), oldSansBoldUID = 0, newSansBoldUID = 2\n:13.308: D\/dalvikvm(5973): GC_EXTERNAL_ALLOC freed 3163 objects \/ 205880 bytes in 13ms\n:13.566: I\/Ads(5973): To get test ads on this device, call adRequest.addTestDevice(\"BE8FFE83C668E44B60E7CBD947D7D226\");\n:13.590: D\/dalvikvm(5973): GC_FOR_MALLOC freed 7592 objects \/ 361280 bytes in 11ms\n:13.597: I\/Ads(5973): adRequestUrlHtml: AFMA_buildAdURL({\"preqs\":0,\"u_sd\":1.375,\"slotname\":\"a14c2366fe4baa1\",\"u_w\":349,\"msid\":\"com.JamesBecwar.FreePrivateBrowser\",\"cap\":\"m\",\"js\":\"afma-sdk-a-v4.3.1\",\"mv\":\"8013013.com.android.vending\",\"isu\":\"BE8FFE83C668E44B60E7CBD947D7D226\",\"cipa\":0,\"format\":\"320x50_mb\",\"net\":\"wi\",\"app_name\":\"28.android.com.JamesBecwar.FreePrivateBrowser\",\"hl\":\"en\",\"u_h\":581,\"u_audio\":1});\n:14.211: W\/webcore(5973): Can't get the viewWidth after the first layout\n:14.640: I\/Ads(5973): Received ad url: \n:14.769: W\/Ads(5973): IOException connecting to ad url.\n:14.769: W\/Ads(5973): java.net.ConnectException: googleads.g.doubleclick.net\/127.0.0.1:80 - Connection refused\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:254)\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)\n:14.769: W\/Ads(5973):   at java.net.Socket.connect(Socket.java:1074)\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:62)\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)\n:14.769: W\/Ads(5973):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)\n:14.769: W\/Ads(5973):   at com.google.ads.b.run(SourceFile:280)\n:14.769: W\/Ads(5973):   at java.lang.Thread.run(Thread.java:1096)\n:14.812: D\/webviewglue(5973): nativeDestroy view: 0x324d00\n:14.816: I\/Ads(5973): onFailedToReceiveAd(A network error occurred.)\n:15.574: D\/dalvikvm(5973): GC_FOR_MALLOC freed 5178 objects \/ 598576 bytes in 25ms\n:15.578: D\/webviewglue(5973): nativeDestroy view: 0x2634a0\n:17.351: I\/Database(5973): sqlite returned: error code = 14, msg = cannot open file at source line 25467\n:17.359: E\/geolocationService(5973): Caught security exception registering for location updates from system. This should only happen in DumpRenderTree.\n:41.011: D\/dalvikvm(5973): GC_FOR_MALLOC freed 5959 objects \/ 981064 bytes in 15ms\n:42.015: I\/Web Console(5973): Omniture: s.t, instance: 1 at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:23\n:42.015: I\/Web Console(5973): [object Object] at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:24\n:42.699: W\/dalvikvm(5973): threadid=12: thread exiting with uncaught exception (group=0x4001d7f0)\n:42.703: E\/AndroidRuntime(5973): FATAL EXCEPTION: http1\n:42.703: E\/AndroidRuntime(5973): java.lang.NullPointerException\n:42.703: E\/AndroidRuntime(5973):    at android.net.http.CertificateChainValidator.doHandshakeAndValidateServerCertificates(CertificateChainValidator.java:194)\n:42.703: E\/AndroidRuntime(5973):    at android.net.http.HttpsConnection.openConnection(HttpsConnection.java:308)\n:42.703: E\/AndroidRuntime(5973):    at android.net.http.Connection.openHttpConnection(Connection.java:358)\n:42.703: E\/AndroidRuntime(5973):    at android.net.http.Connection.processRequests(Connection.java:219)\n:42.703: E\/AndroidRuntime(5973):    at android.net.http.ConnectionThread.run(ConnectionThread.java:113)\n:42.773: W\/dalvikvm(5973): threadid=22: thread exiting with uncaught exception (group=0x4001d7f0)\n:42.781: I\/Process(5973): Sending signal. PID: 5973 SIG: 9\n<\/code><\/pre>\n<p>And the log from Voice Browser:<\/p>\n<pre><code>:44.226: I\/dalvikvm(6273): Jit: resizing JitTable from 4096 to 8192\n:44.226: D\/dalvikvm(6273): GC_FOR_MALLOC freed 13956 objects \/ 744856 bytes in 29ms\n:45.730: I\/Web Console(6273): Omniture: s.t, instance: 1 at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:23\n:45.734: I\/Web Console(6273): [object Object] at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:24\n:46.707: W\/dalvikvm(6273): threadid=14: thread exiting with uncaught exception (group=0x4001d7f0)\n:46.718: E\/AndroidRuntime(6273): FATAL EXCEPTION: http2\n:46.718: E\/AndroidRuntime(6273): java.lang.NullPointerException\n:46.718: E\/AndroidRuntime(6273):    at android.net.http.CertificateChainValidator.doHandshakeAndValidateServerCertificates(CertificateChainValidator.java:194)\n:46.718: E\/AndroidRuntime(6273):    at android.net.http.HttpsConnection.openConnection(HttpsConnection.java:308)\n:46.718: E\/AndroidRuntime(6273):    at android.net.http.Connection.openHttpConnection(Connection.java:358)\n:46.718: E\/AndroidRuntime(6273):    at android.net.http.Connection.processRequests(Connection.java:219)\n:46.718: E\/AndroidRuntime(6273):    at android.net.http.ConnectionThread.run(ConnectionThread.java:113)\n:46.718: W\/dalvikvm(6273): threadid=15: thread exiting with uncaught exception (group=0x4001d7f0)\n<\/code><\/pre>\n<p>And from Easy Browser:<\/p>\n<pre><code>:11.597: D\/dalvikvm(6557): GC_FOR_MALLOC freed 10496 objects \/ 629992 bytes in 57ms\n:11.605: D\/webviewglue(6557): nativeDestroy view: 0x25c8e8\n:11.609: W\/IInputConnectionWrapper(6557): getCursorCapsMode on inactive InputConnection\n:11.640: I\/Ads(6557): adRequestUrlHtml: AFMA_buildAdURL({\"preqs\":1,\"u_sd\":1.375,\"slotname\":\"a14f3f6bc126143\",\"u_w\":349,\"msid\":\"easy.browser\",\"cap\":\"m\",\"js\":\"afma-sdk-a-v4.1.1\",\"isu\":\"BE8FFE83C668E44B60E7CBD947D7D226\",\"format\":\"320x50_mb\",\"net\":\"wi\",\"app_name\":\"23.android.easy.browser\",\"hl\":\"en\",\"u_h\":581,\"u_audio\":1});\n:11.664: W\/IInputConnectionWrapper(6557): getCursorCapsMode on inactive InputConnection\n:11.730: W\/IInputConnectionWrapper(6557): finishComposingText on inactive InputConnection\n:11.867: W\/webcore(6557): Can't get the viewWidth after the first layout\n:12.051: I\/Ads(6557): Received ad url: \n:12.086: W\/Ads(6557): IOException connecting to ad url.\n:12.086: W\/Ads(6557): java.net.ConnectException: googleads.g.doubleclick.net\/127.0.0.1:80 - Connection refused\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:254)\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)\n:12.086: W\/Ads(6557):   at java.net.Socket.connect(Socket.java:1074)\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:62)\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)\n:12.086: W\/Ads(6557):   at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)\n:12.086: W\/Ads(6557):   at b.run(Unknown Source)\n:12.086: W\/Ads(6557):   at java.lang.Thread.run(Thread.java:1096)\n:12.086: D\/webviewglue(6557): nativeDestroy view: 0x382ff0\n:12.086: I\/Ads(6557): onFailedToReceiveAd(A network error occurred.)\n:13.890: I\/Web Console(6557): Omniture: s.t, instance: 1 at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:23\n:13.894: I\/Web Console(6557): [object Object] at http:\/\/images.media-allrecipes.com\/js\/omni\/ar_s_code.js?v=5:24\n:14.687: W\/dalvikvm(6557): threadid=21: thread exiting with uncaught exception (group=0x4001d7f0)\n:14.687: W\/System.err(6557): java.lang.NullPointerException\n:14.687: W\/System.err(6557):    at android.net.http.CertificateChainValidator.doHandshakeAndValidateServerCertificates(CertificateChainValidator.java:194)\n:14.687: W\/System.err(6557):    at android.net.http.HttpsConnection.openConnection(HttpsConnection.java:308)\n:14.687: W\/System.err(6557):    at android.net.http.Connection.openHttpConnection(Connection.java:358)\n:14.687: W\/System.err(6557):    at android.net.http.Connection.processRequests(Connection.java:219)\n:14.687: W\/System.err(6557):    at android.net.http.ConnectionThread.run(ConnectionThread.java:113)\n<\/code><\/pre>\n<ol>\n<li>\n<p>BTW, I presume that your Continuum is still running Android 2.1.<\/p>\n<blockquote>\n<p>What in m.allrecipes.com is so special that it triggers this WebKit+Continuum bug?<\/p>\n<\/blockquote>\n<p>In the Android 2.1 emulator, I get a &#8220;This certificate is not from a trusted authority&#8221; dialog, but it does not crash. Android 2.1 probably does not support the root certificate for StartCom (which, if I am reading this correctly, is the authority in question).<\/p>\n<p>According to this issue, StartCom&#8217;s root cert was added in Android 2.2, and a quick test in a 4.0.3 emulator does not raise the error dialog.<\/p>\n<blockquote>\n<p>What in Samsung Continuum SCH-i400 is so special that it fails only on this website and only with a WebKit-based browser?<\/p>\n<\/blockquote>\n<p>Samsung perhaps tweaked something in the <code>android.net<\/code> packages and broke it, perhaps specifically tied to sketchy SSL certs. Any browser that would be based on <code>WebView<\/code> would run through the same code path; everyone who has their own HTML renderer might not, if they are handling SSL certs and such themselves.<\/p>\n<blockquote>\n<p>What in WebKit is so special that it doesn&#8217;t like the combination of Continuum+allrecipes.com.<\/p>\n<\/blockquote>\n<p>Technically nothing, based on the stack trace. You will note that there is nothing specific to WebKit in there. This would be at most a WebKit-on-Android issue. And, as noted above, it&#8217;s probably more peculiar to your Samsung.<\/p>\n<blockquote>\n<p>Are there additional websites that trigger this behavior?<\/p>\n<\/blockquote>\n<p>Find other ones with certs from smaller certificate authorities, perhaps.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-12-02 01:41:20. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Actually, a more accurate statement is: Every WebKit-based browser crashes on http:\/\/m.allrecipes.com\/ but only in a Samsung Continuum SCH-i400 phone. I am trying to implement a WebView-based browser, mainly for learning purposes (there are way too many on the market, why add one?), and I was impressed by how quickly I could come up with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1819","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1819"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1819\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}