[Qtwebengine] Uncaught TypeError: channel.execCallbacks[message.id] is not a function

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


Hello Michal & Milian,

Thank you for your responses.
The issue has been resolved.

I found that we were using the old method of authentication by supplying user credentials along with the page address.
This has been disabled by Google and also when credential supplied this way the pages become broken and javascript is not operating as expected.
Here is a good explanation of what I've seen: https://medium.com/@lmakarov/say-goodbye-to-urls-with-embedded-credentials-b051f6c7b6a3

Changed to supplying credentials when asked by the server and now the webchannel is working as expected.

Thank you again.

Regards,
Ilya

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

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. Re: Uncaught TypeError: channel.execCallbacks[message.id] is
      not a function (Milian Wolff)


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

Message: 1
Date: Fri, 24 Apr 2020 16:50:46 +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: <5495334.MhkbZ0Pkbq at agathebauer>
Content-Type: text/plain; charset="utf-8"

On Freitag, 24. April 2020 13:20:00 CEST Goldberg, Ilya (DWFN) wrote:
> 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.

That seems unrelated and strange. It definitely works for me with either `-- remote-debugging-port` or `QTWEBENGINE_REMOTE_DEBUGGING`...

> There are no changes in our code between these trials.
> Meanwhile, here is how we are using the webchannel in our main
> application
> code:

<snip>

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

No, please create a standalone MWE and report it as a bug such that we can reproduce and look into it.

Generally, the error message you mention (`Uncaught TypeError:
channel.execCallbacks[message.id] is not a function`) seems to indicate that you get a response from the C++ side which isn't getting handled on the JavaScript side, which is odd. Responses are sent to either initialization or invoking methods. Both of these set the execCallbacks on the JavaScript side.
If that doesn't work, then something is severly broken on your side. I suggest you debug that yourself first and also run the webchannel examples - which do work.

Are you maybe shipping a custom qtwebchannel.js which is outdated?

```
<script type="text/javascript" src="<c:url value="/js/qtwebchannel/ qwebchannel.js"/>"></script> ```

This is not a URL format I know...

> -----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.ou
> tlook
> .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/2020042
> 2/5c5
> 7082b/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/2020042
> 2/9be
> 28717/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.
 _______________________________________________
> QtWebEngine mailing list
> QtWebEngine at lists.qt-project.org
> https://lists.qt-project.org/listinfo/qtwebengine


--
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: 3824 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20200424/a47c915c/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 4
******************************************

************************************************
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