[Webkit-unassigned] [Bug 256663] New: [GTK] toString() returns a function instead of a string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 11 14:23:21 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=256663

            Bug ID: 256663
           Summary: [GTK] toString() returns a function instead of a
                    string
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: emile at caido.io

Hi, we hit this very weird bug in our application based on Tauri. It uses Vue and works fine on all major browsers and OS (including safari 16.2) apart from newer versions of webkitgtk.

We initially got a report from our users about the error: TypeError: e.toString().match is not a function (https://github.com/caido/caido/issues/406).
By trial and error, we saw that it looks like calling [Object].toString() returns a function (namely itself) instead of the actual string representation.
But then calling it manually in the inspector doesn't seem to use the same codepath and works correctly, after which if we reload the app it works fine (which is very very weird).

We nailed it down to OS that had a newer version of libwebkit2gtk-4.0-37 which corresponds to 2.40.0-3
Older versions of ubuntu were using 2.38.6-0 and did not have this issue.
I would blame it on us or Vue if not for the fact that our app works fine with older versions.

It looks like other people have had this issue as well, we found this oss application where it was reported: https://github.com/baiy/Ctool/issues/234.
That might be easier for debugging since our application is not open source.
We tried to do a basic reproduction by basically calling String.toString().match() on a blank page but we were not able to trigger the bug so it must be more complex than that.

We will continue to investigate, but this is problematic since OS don't update webkit very often so this basically prevents Tauri apps from running on a lot of machines.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230511/ef9295bb/attachment.htm>


More information about the webkit-unassigned mailing list