You are not logged in.
Hi!
Webkit Inspector doesn't seem to be working in any webkit-based browser (and the same thing occurs when I use webkit in python directly), when I click "Inspect element", I get this:
** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Main.js @665: Localized string "Hide console (%s)" was not found.
Segmentation fault
And then of course, the browser crashes...
It happens both in gtk2 and gtk3...
I've seen people struggling with this but so far these posts didn't include any answer...
Setting locale to en_US / en_US.utf8 / en_GB didn't help.
Does webkit inspector work for you in these browsers? (chromium doesn't count, not webkit based anymore)
Or is it only me?
If inspector wasn't enabled, then what can I change in the PKGBUILD file to enable it?
Thanks for help.
PS. I don't even know where that file "webkitgtk/inspector/UserInterface/Main.js" is located. I've tried looking at the package contents but couldn't find it anywhere
zb3
Offline
Enable developer extras.
For python something like this qtwebkit example
self.webView.settings().setAttribute(QWebSettings.WebAttribute.DeveloperExtrasEnabled, True)
gtk browsers also need developer extra enabled to use the inspector
Offline
Enable developer extras.
For python something like this qtwebkit example
self.webView.settings().setAttribute(QWebSettings.WebAttribute.DeveloperExtrasEnabled, True)
gtk browsers also need developer extra enabled to use the inspector
I already had
view.get_settings().set_property("enable-developer-extras",True)
in my code, otherwise I wouldn't see "Inspect element".
Unfortunately, this didn't make it work.
zb3
Offline
I just opened dwb from xterm and
** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Main.js @665: Localized string "Hide console (%s)" was not found.
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkRange::activate-slider' of type `gboolean' from rc file value "((GString*) 0xe5f0e0)" of type `GString
The same with javascript on or off.
And the inspector works ok like it should.
Edit:
Midori does the same
midori
** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Main.js @665: Localized string "Hide console (%s)" was not found
Last edited by teckk (2015-06-21 13:50:19)
Offline
When I try to do the same in dwb, I get:
** Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Main.js @665: Localized string "Hide console (%s)" was not found.
Received SIGSEGV, trying to clean up.
Last 4 stack frames:
4: dwb() [0x8054f88]
3: dwb() [0x8073040]
2: linux-gate.so.1(__kernel_sigreturn+0) [0xb77caba4]
1: [0xa596ea93]
Segmentation fault
Is there any way I could debug that and see what really happens there?
zb3
Offline
You aren't partially updated are you? Are you having problems with any other gtk apps? Are you updating with pacman -Syu?
Offline
No, I've updated my system, rebooted, but this still occurs.
I would recompile dwb with debuging symbols and try to check what happens with gdb, but I don't know how to do it, adding -ggdb to CFLAGS, building and installing package via pacman -U didn't make gdb recognize any symbols...
EDIT: I've just read about
OPTIONS+=(debug !strip)
, gonna try it now.
EDIT2: Looks like I'll have to recompile webkitgtk, but for now - the more complete backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xaa2f8a99 in ?? ()
(gdb) bt
#0 0xaa2f8a99 in ?? ()
#1 0xaa2f51d9 in ?? ()
#2 0xb54bda09 in ?? () from /usr/lib/libjavascriptcoregtk-1.0.so.0
#3 0xb544f9f6 in JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*, JSC::Register*) () from /usr/lib/libjavascriptcoregtk-1.0.so.0
#4 0xb542b3b9 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
from /usr/lib/libjavascriptcoregtk-1.0.so.0
#5 0xb557b7e4 in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
from /usr/lib/libjavascriptcoregtk-1.0.so.0
#6 0xb55c4401 in JSC::boundFunctionCall(JSC::ExecState*) ()
from /usr/lib/libjavascriptcoregtk-1.0.so.0
#7 0xa5c4202f in ?? ()
Last edited by zb3 (2015-06-21 14:24:30)
zb3
Offline
dwb and webkit are in the repo if you can't get what you want compiled.
pacman -Si dwb webkitgtk2
There is also qtwebkit, python3, pyside, pyqt which will allow you to make a browser with the functions that you want.
(and the same thing occurs when I use webkit in python directly)
If you want a web inspector too look at a URL then a simple one:
#! /usr/bin/env python
import sys
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtWebKit import *
app = QApplication(sys.argv)
user_agent = QWebPage()
user_agent.userAgentForUrl = lambda x: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20140101 Firefox/32.0'
#user_agent.userAgentForUrl = lambda x: 'Mozilla/5.0 (iPhone; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/536.25'
web = QWebView()
web.setPage(user_agent)
web.settings().setAttribute(
QWebSettings.WebAttribute.DeveloperExtrasEnabled, True)
web.settings().setAttribute(
QWebSettings.WebAttribute.JavascriptEnabled, True)
web.settings().setAttribute(
QWebSettings.WebAttribute.AutoLoadImages, False)
web.settings().globalSettings().setFontSize(
QWebSettings.MinimumFontSize, 18)
web.settings().setAttribute(
QWebSettings.LocalStorageEnabled, True)
web.settings().setAttribute(
QWebSettings.OfflineStorageDatabaseEnabled, True)
web.settings().setAttribute(
QWebSettings.OfflineWebApplicationCacheEnabled, True)
QWebSettings.enablePersistentStorage('/tmp')
input_var = input("Enter url to inspect: ")
web.load(QUrl(input_var))
inspect = QWebInspector()
inspect.setPage(web.page())
inspect.resize(1400, 1000)
inspect.show()
sys.exit(app.exec_())
Edit:
Formatting was different from my editor to the BBS, it's python so it matters.
Last edited by teckk (2015-06-21 15:23:25)
Offline
dwb and webkit are in the repo if you can't get what you want compiled.
But I need them with debugging symbols in order to provide a complete backtrace and investigate the problem, they are built without debuging symbols. I do not have resources to build webkitgtk with debuging symbols, because it would literally take hours with my hardware, I can't dedicate that time.
Using Qt stuff is not a solution since I was asking about webkitgtk, and it gives me segfault somewhere in libjavascriptcoregtk, but I can't post precise info as I do not have that file built with debuging symbols. (I've tried downloading one from debian, but that wasn't compatible).
Anyway once again - the problem is that JSC segfaults when starting inspector, and I'm unable to provide the exact backtrace...
zb3
Offline
I've migrated to the x86_64 architecture, and suddenly this problem does not occur anymore.
Since this is not a general solution I'm not marking this thread as solved even though now it works for me.
PS. Midori is awesome
zb3
Offline
I found this problem in all my webkit based applications (Ubuntu 14.04 i386). Apps crashes during opening webinspector.
I've just reinstall some packages to older versions
(It was installed 2.4.8 version):
sudo apt-get download --allow-unauthenticated libwebkitgtk-1.0-0=2.4.0-1ubuntu2 gir1.2-webkit-1.0=2.4.0-1ubuntu2 gir1.2-javascriptcoregtk-1.0=2.4.0-1ubuntu2 libjavascriptcoregtk-1.0-dev=2.4.0-1ubuntu2 libjavascriptcoregtk-1.0-0=2.4.0-1ubuntu2 libwebkitgtk-dev=2.4.0-1ubuntu2 libwebkit-dev=2.4.0-1ubuntu2
sudo dpkg -i libwebkitgtk-1.0-0_2.4.0-1ubuntu2_i386.deb gir1.2-webkit-1.0_2.4.0-1ubuntu2_i386.deb libjavascriptcoregtk-1.0-dev_2.4.0-1ubuntu2_i386.deb gir1.2-javascriptcoregtk-1.0_2.4.0-1ubuntu2_i386.deb libjavascriptcoregtk-1.0-0_2.4.0-1ubuntu2_i386.deb libwebkitgtk-dev_2.4.0-1ubuntu2_i386.deb libwebkit-dev_2.4.0-1ubuntu2_i386.deb
So now i can launch webinspector, but:
apps still crashing sometime, but rarely (Any way, It works!... with grief in half)
in terminal still throwing Message:
Message: console message: resource:///org/webkitgtk/inspector/UserInterface/Main.js @665: Localized string "Hide console (%s)" was not found.
Maybe he is right https://github.com/mason-larobina/luaki … t-81917485
Last edited by flashwalker (2015-07-08 08:13:19)
Offline
Hijacking someone else's thread is not usually considered a good thing.
Start a new thread.
Are you using Debian/Ubuntu or Arch?
Offline
Hijacking someone else's thread is not usually considered a good thing.
Start a new thread.Are you using Debian/Ubuntu or Arch?
Debian/Ubuntu
Offline