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 606 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 5 Jun 2024, 16:23 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
    • J Offline
      J Offline
      JonB
      wrote on 5 Jun 2024, 16:31 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 5 Jun 2024, 17:31 last edited by
        #3

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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JonB
          wrote on 5 Jun 2024, 17:49 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 5 Jun 2024, 19:28 last edited by anshah 6 May 2024, 19:28
            #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
            • J Offline
              J Offline
              JonB
              wrote on 5 Jun 2024, 21:21 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

              1/6

              5 Jun 2024, 16:23

              • Login

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