Skip to content

Commit

Permalink
Fix launching on Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder committed Feb 3, 2025
1 parent 2ac326c commit 587db1d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/playwright/src/theia-app-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace TheiaElectronAppLoader {
const appPath = electronConfig.electronAppPath!;
const pluginsPath = electronConfig.pluginsPath;
const launchOptions = electronConfig.launchOptions ?? {
additionalArgs: ['--no-cluster'],
additionalArgs: ['--no-sandbox', '--no-cluster'],
electronAppPath: appPath,
pluginsPath: pluginsPath
};
Expand All @@ -120,7 +120,7 @@ namespace TheiaElectronAppLoader {
electronLaunchOptions: { additionalArgs: string[], electronAppPath: string, pluginsPath?: string } | object,
workspace?: TheiaWorkspace
): {
args: string[], env: { [key: string]: string };
args: string[]
} | object {
if ('additionalArgs' in electronLaunchOptions && 'electronAppPath' in electronLaunchOptions) {
const args = [
Expand All @@ -136,9 +136,7 @@ namespace TheiaElectronAppLoader {
}

return {
args: args, env: {
'THEIA_NO_SPLASH': 'true'
}
args: args
};
}
return electronLaunchOptions;
Expand All @@ -156,6 +154,7 @@ export namespace TheiaAppLoader {
// disable native elements and early window to avoid issues with the electron app
process.env.THEIA_ELECTRON_DISABLE_NATIVE_ELEMENTS = '1';
process.env.THEIA_ELECTRON_NO_EARLY_WINDOW = '1';
process.env.THEIA_NO_SPLASH = 'true';
return TheiaElectronAppLoader.load(args, initialWorkspace, factory);
}
const page = await args.browser.newPage();
Expand Down

0 comments on commit 587db1d

Please sign in to comment.