buggy execution of api methods from 'pywebviewready' listener
See original GitHub issueSpecification
- pywebview version: master branch, versions 3.4 and 3.2
- operating system: Ubuntu 18.04 and 20.04 (64 bits)
- web renderer: gtk
Description
This works :
window.addEventListener('pywebviewready', function() {
pywebview.api.test1()
})
Only test2() seems to be called, test1() is not called :
window.addEventListener('pywebviewready', function() {
pywebview.api.test1()
pywebview.api.test2()
})
With setTimeout, test1() and test2() are called :
window.addEventListener('pywebviewready', function() {
setTimeout('pywebview.api.test1()',1000)
pywebview.api.test2()
})
Note : the bug seems to occur since last ubuntu updates, it was working before. Here is list of packages upgrades :
2021-05-11 09:42:29 upgrade gir1.2-lightdm-1:amd64 1.30.0-0ubuntu3.1 1.30.0-0ubuntu4~20.04.1
2021-05-11 09:42:30 upgrade liblightdm-gobject-1-0:amd64 1.30.0-0ubuntu3.1 1.30.0-0ubuntu4~20.04.1
2021-05-11 09:42:35 upgrade alsa-utils:amd64 1.2.2-1ubuntu2 1.2.2-1ubuntu2.1
2021-05-11 09:42:44 upgrade iio-sensor-proxy:amd64 2.8-1 2.8-1ubuntu1
2021-05-11 09:42:49 upgrade python3-problem-report:all 2.20.11-0ubuntu27.16 2.20.11-0ubuntu27.17
2021-05-11 09:42:53 upgrade linux-firmware:all 1.187.11 1.187.12
2021-05-11 09:44:14 upgrade libatopology2:amd64 1.2.2-2.1ubuntu2.3 1.2.2-2.1ubuntu2.4
2021-05-11 09:44:17 upgrade libasound2:amd64 1.2.2-2.1ubuntu2.3 1.2.2-2.1ubuntu2.4
2021-05-11 09:44:18 upgrade libasound2-data:all 1.2.2-2.1ubuntu2.3 1.2.2-2.1ubuntu2.4
2021-05-11 09:44:22 upgrade libwacom-bin:amd64 1.3-2ubuntu1 1.3-2ubuntu3
2021-05-11 09:44:26 upgrade python3-update-manager:all 1:20.04.10.6 1:20.04.10.7
2021-05-11 09:44:27 upgrade update-manager-core:all 1:20.04.10.6 1:20.04.10.7
2021-05-11 09:44:31 upgrade python3-apport:all 2.20.11-0ubuntu27.16 2.20.11-0ubuntu27.17
2021-05-11 09:44:32 upgrade apport-kde:all 2.20.11-0ubuntu27.16 2.20.11-0ubuntu27.17
2021-05-11 09:44:36 upgrade thermald:amd64 1.9.1-1ubuntu0.3 1.9.1-1ubuntu0.4
2021-05-11 09:44:44 upgrade libwebkit2gtk-4.0-37:amd64 2.30.6-0ubuntu0.20.04.1 2.32.0-0ubuntu0.20.04.1
2021-05-11 09:44:46 upgrade libjavascriptcoregtk-4.0-18:amd64 2.30.6-0ubuntu0.20.04.1 2.32.0-0ubuntu0.20.04.1
2021-05-11 09:44:47 upgrade gir1.2-webkit2-4.0:amd64 2.30.6-0ubuntu0.20.04.1 2.32.0-0ubuntu0.20.04.1
2021-05-11 09:44:48 upgrade gir1.2-javascriptcoregtk-4.0:amd64 2.30.6-0ubuntu0.20.04.1 2.32.0-0ubuntu0.20.04.1
2021-05-11 09:44:52 upgrade libwacom2:amd64 1.3-2ubuntu1 1.3-2ubuntu3
2021-05-11 09:44:53 upgrade libwacom-common:all 1.3-2ubuntu1 1.3-2ubuntu3
2021-05-11 09:44:57 upgrade alsa-ucm-conf:all 1.2.2-1ubuntu0.6 1.2.2-1ubuntu0.7
2021-05-11 09:45:01 upgrade lightdm:amd64 1.30.0-0ubuntu3.1 1.30.0-0ubuntu4~20.04.1
2021-05-11 09:45:08 upgrade apport:all 2.20.11-0ubuntu27.16 2.20.11-0ubuntu27.17
2021-05-11 09:45:17 upgrade tmux:amd64 3.0a-2ubuntu0.2 3.0a-2ubuntu0.3
2021-05-11 09:45:22 upgrade libxmlb1:amd64 0.1.15-2 0.1.15-2ubuntu1~20.04.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
Top Results From Across the Web
pywebview - Bountysource
buggy execution of api methods from 'pywebviewready ' listener $ 0 ... This method that i use is really sketchy and doesn't feel...
Read more >API | pywebview
js_api - Expose a python object to the DOM of the current pywebview window. Methods of the js_api object can be executed from...
Read more >Using XMLHttpRequest - Web APIs | MDN
In this guide, we'll take a look at how to use XMLHttpRequest to issue HTTP requests in order to exchange data between the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello !
It works for me on Ubuntu 20.04 LTS VM after downgrading some packages mentionned by romain-marie :
I downgraded the following packages from 2.32.0-0ubuntu0.20.04.1 to 2.28.1-1 :
libwebkit2gtk-4.0-37:amd64
libwebkit2gtk-4.0-37:amd64
libwebkit2gtk-4.0-doc
libjavascriptcoregtk-4.0-18:amd64
gir1.2-webkit2-4.0:amd64
But not working with Pyqt5
I get this output :
— Thanks ^^ —
The message to post on the issue when closing it. If none provided, will not comment when closing an issue.