Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Qt Webkit: Javascript error causes page to not load
Forum Updated to NodeBB v4.3 + New Features

Qt Webkit: Javascript error causes page to not load

Scheduled Pinned Locked Moved Unsolved Qt WebKit
6 Posts 2 Posters 631 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anshah
    wrote on last edited by
    #1

    Using QWebView to display a credential page with username and password displays. Since this is a 2FA authentication, after providing username and password, the 2nd-factor webpage is not loaded. There is a blank screen present.

    The issue seems to be caused by a Javascript error:

    "TypeError: null is not an object (evaluating 'localStorage.length')"
    

    I've know I can detect Javascript errors by overriding:

    QWebPage::javaScriptConsoleMessage
    

    However, all I want to do is ignore this Javascript error and continue to the destination page?

    1 Reply Last reply
    0
    • JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      Since Qt Webkit was de-supported by Qt many years ago you may well not get an answer. If it supplies the JavaScript which is faulting can you alter that yourself?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anshah
        wrote on last edited by
        #3

        The Javascript is from a webserver do not have control on our side

        1 Reply Last reply
        0
        • JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          I understand. Like I said, the webkit browser is pretty old now. I don't know what you can/should do.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anshah
            wrote on last edited by anshah
            #5

            Let's say hypothetically, I was using the newer QWebEngine...what would you do in that case. I'm sure the basic fundamental JavaScript handling and functionality is the same for both.

            1 Reply Last reply
            0
            • JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              As I understand it, you visit a particular web page and get a JS error in an old browser. These things happen. The error means localStorage is not defined. If you try visiting that page via QWebEngine do you get that error?

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved