Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailsy fails to launch a browser on any platform that is not MacOS #24

Open
ljis120301 opened this issue Dec 16, 2024 · 2 comments
Open

Comments

@ljis120301
Copy link

Mailsy will fail to open a browser to view emails on any platform that is not MacOS.

I have tested this by installed though both npm and brew on WSL and on Linux Native (Fedora) and found that no matter if the package is install through npm or by first installing homebrew on Linux mailsy will fail to launch a browser. I have been able to replicate this issue on any platform that is not MacOS. I have attempted to run Mailsy on Fedora through npm and it fails to launch a browser. Tested on Fedora with the brew package manager and it fails to launch a browser. Tested on WSL Debian with the npm package and it fails to launch a browser. As well as I have ensured WSL would have a browser to launch by also "sudo apt install firefox-esr" on WSL first before installing. Additionally I have attempted to install Mailsy though the brew package manager under WSL and it still fails to launch a browser.

@ljis120301
Copy link
Author

I would like to further note I ma not seeing any console logs output as I attempt to open the emails as I would expect if it was encountering some sort of error from looking at the code

`const openEmail = async (email) => {
const emailFilePath = path.join(dirname, "../data/email.html");
const spinner = ora("opening...").start();

try {
await db.read();
const account = db.data;
const fetchedEmails = await fetchMessages();
const mailToOpen = fetchedEmails[email - 1];

// get email html content
const { data } = await axios.get(
  `https://api.mail.tm/messages/${mailToOpen.id}`,
  {
    headers: {
      Authorization: `Bearer ${account.token.token}`,
    },
  },
);

if (data.html === undefined) {
  spinner.stop();
  console.log(`${chalk.redBright("No HTML content found")}`);
  return;
}

// write the email html content to a file
await fs.writeFile(emailFilePath, data.html[0]);

// open the email html file in the browser
await open(emailFilePath);

} catch (error) {
console.error(${chalk.redBright("Error")}: ${error.message});
} finally {
// stop the spinner
spinner.stop();
}
};
`

@Joe-5248376
Copy link

Mailsy will fail to open a browser to view emails on any platform that is not MacOS.

I have tested this by installed though both npm and brew on WSL and on Linux Native (Fedora) and found that no matter if the package is install through npm or by first installing homebrew on Linux mailsy will fail to launch a browser. I have been able to replicate this issue on any platform that is not MacOS. I have attempted to run Mailsy on Fedora through npm and it fails to launch a browser. Tested on Fedora with the brew package manager and it fails to launch a browser. Tested on WSL Debian with the npm package and it fails to launch a browser. As well as I have ensured WSL would have a browser to launch by also "sudo apt install firefox-esr" on WSL first before installing. Additionally I have attempted to install Mailsy though the brew package manager under WSL and it still fails to launch a browser.

Same here :C Mac Os version just works. strangely 🤯

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

No branches or pull requests

2 participants