Giter Site home page Giter Site logo

Comments (5)

Lanny avatar Lanny commented on September 20, 2024 2

I chased this around a little bit, nothing conclusive but suspect it's something on the Qt side. Some notes in case they're helpful:

  • Under normal circumstances webelem.js gets executed on each navigation, this file creates the javascript function which is invoked for hints and which isn't being found
  • Following the repro steps above, the script gets executed on each tab that's opened as expected
  • Where things diverge is when the search is performed, under normal circumstances the script is executed again after the navigation. Following the repro steps, it is not, leading to the issue
  • The script is injected here: https://github.com/qutebrowser/qutebrowser/blob/main/qutebrowser/browser/webengine/webenginetab.py#L1083
  • This call appears to happen when a tab is created, but not on each navigation, in both the normal and pathological flows
  • This is what suggests a Qt issue to me, the semantics seem to be that QWebEnginePage.scripts().insert expects to be given a script once and will manage re-executing it on subsequent navigations (or the subframes flag causes it to work this way), and that's what happens when things are working, but something in the repro steps prevents that from happening

Can also verify that the qute_js script remains in the script list after navigation in the repro steps, it just doesn't seem to get executed

from qutebrowser.

Hi-Angel avatar Hi-Angel commented on September 20, 2024

Fixed the title (while writing this issue I found a better way to reproduce).

FWIW, "steps to reproduce" isn't the only way to get this. I don't have a habit of having multiple google pages among opened tabs, but I still routinely get the error. It usually happens when I repeat search within the same tab. For some reason though, with --temp-base-dir it does not happen, but it still can be reproduced with the steps I wrote in the post.

from qutebrowser.

The-Compiler avatar The-Compiler commented on September 20, 2024

Reproduced, fails with Uncaught TypeError: Cannot read properties of undefined (reading 'webelem').

Seems to work fine with Qt 6.6, so this might be another QtWebEngine 6.7 regression...

from qutebrowser.

randomcodepanda avatar randomcodepanda commented on September 20, 2024

I don't know if it's the same issue but i get this a lot in the arch linux packages page, even with the temp-dir:

https://archlinux.org/packages/

Although it's not 100%, if i do a search with the page search engine (it's one of my search engines in the config) and open the page of one of the packages then it happens a lot more, but still not 100%:

https://archlinux.org/packages/?q={}

While doing it with the terminal open i got this but only once:

ERROR: JS: [userscript:_qute_js:452] Uncaught TypeError: Cannot read properties of undefined (reading 'click')

All the other times i get this:

ERROR: Unknown error while getting elements

What i typically do is do a quick d(to close) and then u(to undo the tab) and then the hints work since reloading doesn't work.

from qutebrowser.

lockie avatar lockie commented on September 20, 2024

I'm also affected by this in a lot of sites. Using Qtwebengine 6.7.1

from qutebrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.