[Qtwebengine] Developer tools debugging not working in Qt 5.12.8

Goldberg, Ilya (DWFN) Ilya.Goldberg at smithsdetection.com
Mon May 4 19:07:51 CEST 2020


Hi Kirill,

Thank you for your prompt response.
It was very helpful.
I've tried using simplebrowser example which I've build using the same version of WebEngine from Qt 5.12.8 (chromium V69...).
I can now see the actual pages via the debugging port!
Only a single problem remains, I can open and see in Sources of the Devtools any script apart from the actual top level page that has been loaded. So, cannot debug the actual web page.
I can see the source of the top page in the Network section under Response but not under Sources. It is just remains to be blank.

Have you seen something like that or anybody else reported it?

Regards,
Ilya

-----Original Message-----
From: QtWebEngine <qtwebengine-bounces at lists.qt-project.org> On Behalf Of qtwebengine-request at lists.qt-project.org
Sent: 24 April 2020 12:20
To: qtwebengine at lists.qt-project.org
Subject: EXTERNAL: QtWebEngine Digest, Vol 49, Issue 2

CAUTION: This email came from outside Smiths Group. Be cautious with the contents unless you can confirm the sender is genuine.


Send QtWebEngine mailing list submissions to
        qtwebengine at lists.qt-project.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.qt-project.org/listinfo/qtwebengine
or, via email, send a message with subject or body 'help' to
        qtwebengine-request at lists.qt-project.org

You can reach the person managing the list at
        qtwebengine-owner at lists.qt-project.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of QtWebEngine digest..."


Today's Topics:

   1. Developer tools debugging not working in Qt 5.12.8
      (Goldberg, Ilya (DWFN))
   2. Re: Developer tools debugging not working in Qt 5.12.8
      (Kirill Burtsev)
   3. Re: Uncaught TypeError: channel.execCallbacks[message.id] is
      not a function (Goldberg, Ilya (DWFN))


----------------------------------------------------------------------

Message: 1
Date: Fri, 24 Apr 2020 10:41:51 +0000
From: "Goldberg, Ilya (DWFN)" <Ilya.Goldberg at smithsdetection.com>
To: "qtwebengine at lists.qt-project.org"
        <qtwebengine at lists.qt-project.org>
Subject: [Qtwebengine] Developer tools debugging not working in Qt
        5.12.8
Message-ID:
        <DM6PR18MB2699C09FFE50BDDD652FE971E3D00 at DM6PR18MB2699.namprd18.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

Hi All,
We are migrating from Qt5.5 to Qt5.12.8 on CentOS 7, 64bit x86 processor.

In the Qt application: qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "0.0.0.0:9000"); Opening any web page and connecting Chrome browser to device_IP:9000 should allow debugging using developer tools provided by Chrome.
We are using Chrome Version 81.0.4044.113 (Official Build) and also tried on Chrome Version 80.0.3987.163 (Official Build)

Under Qt5.5 it works fine.
Under Qt5.12.8 an attempt to connect to device_IP:9000 shows the correct Inspectable Page information but trying to open the Inspectable page shows only devtools_app.js, shell.js scripts instead of expected page source.

I know that WebEngine under Qt5.12.8 is using Chromium version 69.0.3497.113.

Anyone aware about possible incompatibilities between Chromium and Chrom developer tools in these versions?

Thank you.
Ilya
PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20200424/74c52031/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 24 Apr 2020 10:55:42 +0000
From: Kirill Burtsev <kirill.burtsev at qt.io>
To: "qtwebengine at lists.qt-project.org"
        <qtwebengine at lists.qt-project.org>
Subject: Re: [Qtwebengine] Developer tools debugging not working in Qt
        5.12.8
Message-ID:
        <AM0PR02MB362050710BA00083BF09FB7091D00 at AM0PR02MB3620.eurprd02.prod.outlook.com>

Content-Type: text/plain; charset="us-ascii"

Hello Ilya,

check out QTBUG-82410 for a context about this issue. Short summary is that it is out of scope really. Just use minimal or simplebrowser examples from the same Qt version of webengine to access devtools through remote debugging, as the compatibility of devtools between chromium versions is not guaranteed.

________________________________________
From: QtWebEngine <qtwebengine-bounces at lists.qt-project.org> on behalf of Goldberg, Ilya (DWFN) <Ilya.Goldberg at smithsdetection.com>
Sent: Friday, April 24, 2020 12:41
To: qtwebengine at lists.qt-project.org
Subject: [Qtwebengine] Developer tools debugging not working in Qt 5.12.8

Hi All,
We are migrating from Qt5.5 to Qt5.12.8 on CentOS 7, 64bit x86 processor.

In the Qt application: qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "0.0.0.0:9000"); Opening any web page and connecting Chrome browser to device_IP:9000 should allow debugging using developer tools provided by Chrome.
We are using Chrome Version 81.0.4044.113 (Official Build) and also tried on Chrome Version 80.0.3987.163 (Official Build)

Under Qt5.5 it works fine.
Under Qt5.12.8 an attempt to connect to device_IP:9000 shows the correct Inspectable Page information but trying to open the Inspectable page shows only devtools_app.js, shell.js scripts instead of expected page source.

I know that WebEngine under Qt5.12.8 is using Chromium version 69.0.3497.113.

Anyone aware about possible incompatibilities between Chromium and Chrom developer tools in these versions?

Thank you.
Ilya
PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.


------------------------------

Message: 3
Date: Fri, 24 Apr 2020 11:20:00 +0000
From: "Goldberg, Ilya (DWFN)" <Ilya.Goldberg at smithsdetection.com>
To: "qtwebengine at lists.qt-project.org"
        <qtwebengine at lists.qt-project.org>
Subject: Re: [Qtwebengine] Uncaught TypeError:
        channel.execCallbacks[message.id] is not a function
Message-ID:
        <DM6PR18MB2699EF4511802A0BE9959256E3D00 at DM6PR18MB2699.namprd18.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

Hi Milian,

Thank you for your response.

I've tried the latest qwebchannel.js file from 5.14 code.
Still having the same "Uncaught TypeError: ..." appears.
I've double checked both our application and web page again in Qt5.5 and it is working fine, without any errors.

Assuming that WebEngine is working and the issue is probably related to an upgrade of Chromium from version 40.x to 69.x but still one would expect some sort of backward compatibility.
In order to debug our web page I need to access developer tools in Chrome via the QTWEBENGINE_REMOTE_DEBUGGING port. And this feature does not work either. I've sent a separate request to this list about the developer tools issue.
And again the developer tools works fine from application running under Qt5.5 but does not under Qt5.12.8. There are no changes in our code between these trials.

Meanwhile, here is how we are using the webchannel in our main application code:
m_webView = new QWebEngineView();
m_page = new MyWebEnginePage(this);
m_webView->setPage(m_page);
m_webChannel = new WebChannel(this);

QUrl URL(QString("http://www.google.com") ); //This is just an example web page QWebChannel *channel = new QWebChannel(m_webView->page()); m_webView->page()->setWebChannel(channel);
channel->registerObject(QStringLiteral("dialog"), m_webChannel);
m_webView->load(URL);
m_webView->show();

for(const auto& child:m_webView->children())
    {
        child->installEventFilter(this);
   }

Where WebChannel declared as:
/* This object will be shared with HTML client via the QWebChannel */ class WebChannel : public QObject {
    Q_OBJECT


public:
    explicit WebChannel(QObject* parent = 0) : QObject(parent) {}

signals:
    void clicked();
    void returned(bool home);

public slots:
/*
        These slots are invoked from the HTML client side.
*/
        Q_INVOKABLE void clickCallback();
        Q_INVOKABLE void callbackSlot(bool home); };


On the web page side, the qwebchannel is used to return ClickCallback() on every touch and also callbackSlot() when needed to leave the web page and return back to main application.  JavaScript extract to handle the qwebchannel:

<script type="text/javascript" src="<c:url value="/js/qtwebchannel/qwebchannel.js"/>"></script>
if(typeof qt != 'undefined')
{
//This will only work in QtWebEngine browser new QWebChannel(qt.webChannelTransport, function (channel) { dialog = channel.objects.dialog; }); }

var exitSession = function(home)
{
if (typeof dialog != 'undefined')
{
dialog.callbackSlot(home);
}
else if(typeof qt != 'undefined')
{
//This will only work in QtWebEngine browser new QWebChannel(qt.webChannelTransport, function (channel) { dialog = channel.objects.dialog; dialog.callbackSlot(home); }); } }

jq('body').on('touchstart mousedown', function(e) {

if(!clickFlag) {
clickFlag = true;
setTimeout(function(){ clickFlag = false; }, 500);

clearTimeout(sessionTimeout);
sessionTimeout = setTimeout(function(){ exitSession(false); }, defaultSessionTimeout_ms);

if (typeof dialog != 'undefined') {
dialog.clickCallback();
} else if(typeof qt != 'undefined') {
//This will only work in QtWebEngine browser new QWebChannel(qt.webChannelTransport, function (channel) { dialog = channel.objects.dialog; dialog.clickCallback(); }); } } .....

Can you spot any problem with the way we use qwebchannel?

Cheers,
Ilya


-----Original Message-----
From: QtWebEngine <qtwebengine-bounces at lists.qt-project.org> On Behalf Of qtwebengine-request at lists.qt-project.org
Sent: 23 April 2020 11:00
To: qtwebengine at lists.qt-project.org
Subject: EXTERNAL: QtWebEngine Digest, Vol 49, Issue 1

CAUTION: This email came from outside Smiths Group. Be cautious with the contents unless you can confirm the sender is genuine.


Send QtWebEngine mailing list submissions to
        qtwebengine at lists.qt-project.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.qt-project.org/listinfo/qtwebengine
or, via email, send a message with subject or body 'help' to
        qtwebengine-request at lists.qt-project.org

You can reach the person managing the list at
        qtwebengine-owner at lists.qt-project.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of QtWebEngine digest..."


Today's Topics:

   1. Uncaught TypeError: channel.execCallbacks[message.id] is not
      a function (Goldberg, Ilya (DWFN))
   2. Re: Uncaught TypeError: channel.execCallbacks[message.id] is
      not a function (Milian Wolff)


----------------------------------------------------------------------

Message: 1
Date: Wed, 22 Apr 2020 15:30:46 +0000
From: "Goldberg, Ilya (DWFN)" <Ilya.Goldberg at smithsdetection.com>
To: "qtwebengine at lists.qt-project.org"
        <qtwebengine at lists.qt-project.org>
Subject: [Qtwebengine] Uncaught TypeError:
        channel.execCallbacks[message.id] is not a function
Message-ID:
        <DM6PR18MB2699B531513643AD620F0A7DE3D20 at DM6PR18MB2699.namprd18.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

Hi All,
We are migrating from Qt5.5 to Qt5.12.8 on CentOS 7, 64bit x86 processor.

Qt main application is working. Our webpage is based on JavaScript, running on Apache-Tomcat. It is using channel back to the main application (using qtwebchannel.js) as we need to know when user wants to return from the webpage into our main app.
The webpage works fine under Qt5.5.
After upgrading to Qt5.12.8 found that the webpage is broken (all elements are in wrong places and it does not work as expected).
In the log file found multiple messages: "Uncaught TypeError: channel.execCallbacks[message.id] is not a function".

Did anyone experienced similar error messages?
Any clue on fixing it?

Thank you.
PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20200422/5c57082b/attachment-0001.html>

------------------------------

Message: 2
Date: Wed, 22 Apr 2020 20:46:13 +0200
From: Milian Wolff <milian.wolff at kdab.com>
To: "qtwebengine at lists.qt-project.org"
        <qtwebengine at lists.qt-project.org>
Cc: "Goldberg, Ilya \(DWFN\)" <Ilya.Goldberg at smithsdetection.com>
Subject: Re: [Qtwebengine] Uncaught TypeError:
        channel.execCallbacks[message.id] is not a function
Message-ID: <2525401.mvXUDI8C0e at agathebauer>
Content-Type: text/plain; charset="utf-8"

On Mittwoch, 22. April 2020 17:30:46 CEST Goldberg, Ilya (DWFN) wrote:
> Hi All,
> We are migrating from Qt5.5 to Qt5.12.8 on CentOS 7, 64bit x86 processor.
>
> Qt main application is working. Our webpage is based on JavaScript,
> running on Apache-Tomcat. It is using channel back to the main
> application (using
> qtwebchannel.js) as we need to know when user wants to return from the
> webpage into our main app. The webpage works fine under Qt5.5.
> After upgrading to Qt5.12.8 found that the webpage is broken (all
> elements are in wrong places and it does not work as expected). In the
> log file found multiple messages: "Uncaught TypeError:
> channel.execCallbacks[message.id] is not a function".
>
> Did anyone experienced similar error messages?
> Any clue on fixing it?

I haven't seen this, can you please try the latest qtwebchannel code from the
5.14 branch? Afaik it should be compatible with 5.12.

Cheers

--
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20200422/9be28717/attachment-0001.bin>

------------------------------

Subject: Digest Footer

_______________________________________________
QtWebEngine mailing list
QtWebEngine at lists.qt-project.org
https://lists.qt-project.org/listinfo/qtwebengine


------------------------------

End of QtWebEngine Digest, Vol 49, Issue 1
******************************************

************************************************
CAUTION:THIS MESSAGE ORIGINATED FROM THE PUBLIC INTERNET AND WAS NOT SENT FROM THE SMITHS EMAIL SYSTEM
************************************************
PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.

------------------------------

Subject: Digest Footer

_______________________________________________
QtWebEngine mailing list
QtWebEngine at lists.qt-project.org
https://lists.qt-project.org/listinfo/qtwebengine


------------------------------

End of QtWebEngine Digest, Vol 49, Issue 2
******************************************

************************************************
CAUTION:THIS MESSAGE ORIGINATED FROM THE PUBLIC INTERNET AND WAS NOT SENT FROM THE SMITHS EMAIL SYSTEM
************************************************
PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.


More information about the QtWebEngine mailing list