Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6642351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:55:13+00:00 2026-05-25T23:55:13+00:00

Unfortunately I cannot reliably reproduce this error but infrequently I get it and occasionally

  • 0

Unfortunately I cannot reliably reproduce this error but infrequently I get it and occasionally it gets reported in the live crash logs also. Here’s a stacktrace reported by user with Droid 2.2.2 FRG83G

junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNull(Assert.java:233)
at junit.framework.Assert.assertNull(Assert.java:226)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:594)
at java.lang.Thread.run(Thread.java:1096)

This seems to be due to this line in WebViewCore.java

Assert.assertNull(sWebCoreHandler);

Somehow sWebCoreHandler which is private static instance of android.os.Handler is not (Thanks @Idolon for the correction) already initialized but I have no clue how to work around or prevent this issue.

This occurs often enough for me to worry. What is also interesting is seemingly happens when the app is loading Activity that doesn’t even have WebView though one of the activities does have it.

P.S. This was filed as bug #16258

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:55:13+00:00Added an answer on May 25, 2026 at 11:55 pm

    Looking at the incriminating source code…

    public WebViewCore(Context context, WebView w, CallbackProxy proxy,
            Map<String, Object> javascriptInterfaces) {
    
        //....
    
        // We need to wait for the initial thread creation before sending
        // a message to the WebCore thread.
        // XXX: This is the only time the UI thread will wait for the WebCore
        // thread!
        synchronized (WebViewCore.class) {
            if (sWebCoreHandler == null) {
                // Create a global thread and start it.
                Thread t = new Thread(new WebCoreThread());
    
                //...
    
            }
        }
    
    //...
    
    private static Handler sWebCoreHandler;
    // Class for providing Handler creation inside the WebCore thread.
    private static class WebCoreThread implements Runnable {
        public void run() {
            Looper.prepare();
            Assert.assertNull(sWebCoreHandler); // this assertion fails
            synchronized (WebViewCore.class) {
                sWebCoreHandler = new Handler() {
            //...
    

    This is executed in the constructor of any WebView and the assertion error comes from the WebCoreThread constructor, which is only called when the sWebCoreHandler is null, so this assertion should never fail… in theory. Except it’s ran outside of the synchronized clause and inside a new Thread that is created and started inside a synchronized clause, supposedly only once.

    It seems your error is tied to concurrent creation of webviews. If your application has only one activity with one webview, make sure that this activity is not called more often than necessary (=one at a time), that the WebView is created in the onCreate method rather than the activity constructor, that the startActivity is called in the main thread, and you should be good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of our developers used this call: TzSpecificLocalTimeToSystemTime() but unfortunately we cannot keep it
I think this is a very simple question. but unfortunately I cannot find a
Unfortunately, I need to do this. I'm using ELMAH for my error log. Before
I need to get contents of a b tag and unfortunately I cannot change
My HTML looks something like this (unfortunately it cannot change because it is being
I am trying to remove all HTML elements from a String. Unfortunately, I cannot
unfortunately I cannot resort to C# in my current project, so I'll have to
I cannot seem to reliably fetch the subscriberCount for playlists using the Spotify Apps
While it seems that this has been asked many times before, but there's a
I have these awkward checkboxes and unfortunately I cannot rename them the same due

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.