Skip to content

Bug | Host->page web messages fail on Linux after upgrading to 0.60. #407

Description

@beanpuppy

Severity

High (major feature broken)

Describe the bug

After upgrading to 0.60.0, every host->page message on Linux fails. SendWebMessage evaluates __dispatchMessageCallback("...") in the page, but the bridge script no longer defines that name. It registers the WebKit receiver as window.__infiniframe_dispatch (NativeInteropBridge.ts), while the native side still evals the old name (WindowState.Gtk.cpp, WindowState.Cocoa.mm so probably macOS too).

I've worked around it with a page-side shim:

window.__dispatchMessageCallback = (m) => window.__infiniframe_dispatch?.(m);

Steps to reproduce

  1. On Linux, create a window and load any page
  2. In the page, register a receive callback: window.infiniframe.host.receiveCallback(m => console.log(m))
  3. From the host, call window.SendWebMessage("hello")

Expected behavior

The callback fires with the message.

Actual behavior

Nothing arrives in the page.

Logs / Error Output

stderr shows:

** (app:618739): WARNING **: JavaScript evaluation failed: ReferenceError: Can't find variable: __dispatchMessageCallback

Minimal reproduction

var window = InfiniFrameWindowBuilder.Create()
.SetTitle("Repro")
.SetSize(new Size(800, 600))
.SetStartPageUrl("http://localhost:5000")
.Build();
window.Invoke(() => window.SendWebMessage("hello"));
window.WaitForClose();

.NET Version

.NET 10

Project Version / Commit

0.60.0

Operating System

Linux (WebKitGTK)

Checklist

  • I searched existing issues
  • I can reproduce this consistently
  • I included logs and/or a reproduction

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions