Skip to content

fix: await virtual display initialization#5554

Open
matus01 wants to merge 1 commit into
jo-inc:masterfrom
matus01:fix-await-virtual-display
Open

fix: await virtual display initialization#5554
matus01 wants to merge 1 commit into
jo-inc:masterfrom
matus01:fix-await-virtual-display

Conversation

@matus01

@matus01 matus01 commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Fixes a Linux launch failure where the virtual display value is passed as a Promise instead of the resolved display string.

Problem

When creating a browser tab on Linux, Camoufox failed to launch with:

Error: cannot open display: [object Promise]

The /tabs request then returned 500.

The log also showed the virtual display value as an object:

"xvfb virtual display started","display":{}

Cause

VirtualDisplay.get() returns a Promise, but the result was used without await:

vdDisplay = localVirtualDisplay.get();

As a result, vdDisplay contained a Promise object instead of the actual Xvfb display string.

Fix

Await the virtual display initialization:

vdDisplay = await localVirtualDisplay.get();

Testing

Tested locally on Linux with @askjo/camofox-browser 1.11.2.

Before the change, browser launch failed with:

Error: cannot open display: [object Promise]

After the change, the server was able to create browser tabs successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant