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

handle differences in platform support in a more generic way #4843

Open
ganthern opened this issue Dec 12, 2022 · 0 comments
Open

handle differences in platform support in a more generic way #4843

ganthern opened this issue Dec 12, 2022 · 0 comments
Labels
improvement nice-to-haves that are not impeding usage of any features

Comments

@ganthern
Copy link
Contributor

ganthern commented Dec 12, 2022

Bug in web app

Describe the bug

Trying to print something will throw an uncaught error:

Client: Browser
Type: FREE
Tutanota version: 3.105.9
Timestamp (UTC): Mon, 12 Dec 2022 14:47:31 GMT
User agent:
Mozilla/5.0 (Android 11; Mobile; rv:91.0) Gecko/91.0 Firefox/91.0
TypeError
Error message: window.print is not a function
Stacktrace:
click@https://mail.tutanota.com/main-ce11e6a4.js:1:145753
click@https://mail.tutanota.com/gui-base-9fc89ddf.js:1:95671
onclick@https://mail.tutanota.com/gui-base-9fc89ddf.js:1:92926
execute/B</</u</F.prototype.handleEvent@https://mail.tutanota.com/app.js:1:25796

To Reproduce
Steps to reproduce the behavior:

  1. Open mail.tutanota.com in firefox for android
  2. Create a new account
  3. log in and click the news icon
  4. show the recovery code
  5. tap the print button
  6. see error being thrown

Expected behavior
Since printing is not supported on firefox android (https://developer.mozilla.org/en-US/docs/Web/API/Window/print?retiredLocale=de), we should probably check availability before trying to use the function or catch the error.

Additional Context
Maybe it would be useful to have a similar handler as for connection problems for errors that are caused by the environment but that aren't really important enough to have special handling for, like a global "MissingPlatformSupportError" with a generic message that pops up in the snackbar

@ganthern ganthern added bug broken functionality, usability problems, unexpected errors browser-bug Bugs caused by environment labels Dec 12, 2022
@ganthern ganthern changed the title [firefox android] Uncaught Error: [firefox android] Uncaught Error: window.print is not a function Dec 12, 2022
@ganthern ganthern added improvement nice-to-haves that are not impeding usage of any features and removed bug broken functionality, usability problems, unexpected errors browser-bug Bugs caused by environment labels Dec 19, 2022
@ganthern ganthern changed the title [firefox android] Uncaught Error: window.print is not a function handle differences in platform support in a more generic way Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement nice-to-haves that are not impeding usage of any features
Projects
None yet
Development

No branches or pull requests

1 participant