open-olive / loop-development-kit

The JavaScript/TypeScript Loop Development Kit for Olive Helps.
MIT License
20 stars 18 forks source link

[BUG]: Browser tab is not opening #604

Closed alokmishra1 closed 2 years ago

alokmishra1 commented 2 years ago

Describe the bug

We are using Browser aptitude, we have installed the olive plugin. In our application, we are creating a local html file, and giving this html file path and trying to open it in browser. For us it is working fine. But on some users machine browser tab is not opening. Please help us investigate this issue.

Steps to Reproduce

Catherine_ui.main.log

I have the log file. Please have a look.

Olive Helps Version

0.47.4

LDK Version

Latest

Operating System

windows

Code Sample

const FILE_NAME = 'index.html'; const filePath = await filesystem.join([this.filespath, FILE_NAME]); // The permissions we want to give the file, in octal format // https://www.linode.com/docs/guides/modify-file-permissions-with-chmod/ const FILE_PERMISSIONS = 0o777; // The write operations to choose from while writing the file const { overwrite, append } = filesystem.WriteOperation;

const writeFileParams = {
  data: FILE_CONTENT,
  path: filePath,
  writeMode: FILE_PERMISSIONS,
  writeOperation: overwrite,
};
await filesystem.writeFile(writeFileParams);
console.log('filePath==========', filePath);
//const newTabId = await browser.openWindow('file:///' + this.filespath + '/index.html');
try {
  //const newTabId = await browser.openWindow('file:///' + this.filespath + '/index.html');
  const newTabId = await browser.openTab('file:///' + this.filespath + '/index.html');
  console.log('newTabId============', newTabId);
} catch (error) {
  const newTabId = await browser.openWindow('file:///' + this.filespath + '/index.html');
  console.log('error newTabId=======', error);
}

Additional Context

No response

Code of Conduct

racary-olive commented 2 years ago

It looks like there are no registered browser connections. This could either be that the browser extension is not installed or is turned off. I have attached screen shots from the logs.

image