tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.13k stars 530 forks source link

Unexpected closing when typing Cmd + A (anywhere) #5179

Open FXlife opened 1 year ago

FXlife commented 1 year ago

I noticed that Tutanota desktop Mac app closes itself when I type Cmd + A. I noticed this a few days ago while trying to select text while creating a folder. I procrastinated reporting the issue, but tonight I had the same problem just typing the command in the application to select all emails. So, I do report the issue now.

How to reproduce it?: Just open the desktop application, type "cmd" + "A". The application closes itself or crashes.

What is supposed to be done: Select all messages in a mail pane or select all text.

Potential cause: An incorrect mapping of keyboard shortcuts that links "Cmd + A" to what "Cmd + Q" is supposed to do.

Solution: Check the keyboard shortcuts, if it's not that, then it's an insidious bug somewhere else.

narduin commented 1 year ago

I experience the same issue. Not a big deal but pretty frustrating when I use the shortcut out of habit 😅

kibibytium commented 1 year ago

Reproduced on v3.114.1

Notes: The crash does not occur if you open the "View" menu and click on "select all". After doing this once, using cmd+a doesn't crash the client anymore.

Otherwise, the crash is reproducible.

narduin commented 1 year ago

Notes: The crash does not occur if you open the "View" menu and click on "select all". After doing this once, using cmd+a doesn't crash the client anymore.

I don't experience this. edit > select all works fine but cmd + a still crashes the app (tested on v3.114.1)

wrdhub commented 1 year ago

PR #5766 changes how keyboard shortcuts are handled, and is set to be merged in soon. (I don't think that PR will fix this issue, but it is pretty big overhaul, and whoever works on this may want to work from there instead of master if it is not merged in yet)

ganthern commented 1 year ago

@FXlife @narduin do you still experience this with tutanota 3.116.8? Since our last test of this, our test device was updated and seems to have lost the ability to reproduce it with any app version. We also updated some app components since then that may affect this.

narduin commented 1 year ago

Hello @ganthern, I'm still having this issue.

I'm happy to provide any other information needed :)

wrdhub commented 1 year ago

Tested with 3.117.0 and the upcoming 3.118 release, and this issue seems to be resolved.

narduin commented 1 year ago

Hello, this is still happening to me on 3.118.12.585, macOS 12.6.8.

charlag commented 1 year ago

Hello, this is still happening to me on 3.118.12.585, macOS 12.6.8.

hi, do you have a stacktrace? can you run it from the terminal and see what the output is?

narduin commented 1 year ago

@charlag here is what's happening. Tell me if I need to pass an argument or something!

logs ``` ➜ /Applications/Tutanota\ Desktop.app/Contents/MacOS/Tutanota\ Desktop ; exit; the monkey has been patched pid: 6529 (node:6529) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `Tutanota Desktop --trace-deprecation ...` to show where the warning was created) version: 3.118.12 resolving key... tutanota-vault config up to date [ApplicationWindow] webAssetsPath: /Applications/Tutanota Desktop.app/Contents/Resources/app.asar [ApplicationWindow] getting dictionaries from: https://mail.tutanota.com/desktop/dictionaries/ default mailto handler: true Webapp ready [2023-10-02T07:57:28.681Z] [ElectronUpdater] INFO: Checking for update [2023-10-02T07:57:28.681Z] [ElectronUpdater] INFO: checking-for-update [ApplicationWindow] spellcheck-dictionary-initialized en-GB scheduling to check sse in 1 seconds [2023-10-02T07:57:29.072Z] [ElectronUpdater] INFO: Update for version 3.118.12 is not available (latest version: 3.118.12, downgrade is disallowed). [2023-10-02T07:57:29.072Z] [ElectronUpdater] INFO: update not available: { version: '3.118.12', files: [ { url: 'tutanota-desktop-mac.zip', sha512: 'UwL2omher6v1E7wDzheA986sakE9XpyPMKH8BHNHM+z//7u7mPfhwqVtzjBZRbLFsCOYe8pNWlChcwbj3o63qg==', size: 106712932 }, { url: 'tutanota-desktop-mac.dmg', sha512: 'AyshNd81r2LAYfJtO0WeUEA5sqaI3NaGn52g3Sl3aOrJvRs272TrmVihJrL288kgh1QcKGZwUZ+ZiNhbII8rDg==', size: 111182891 } ], path: 'tutanota-desktop-mac.zip', sha512: 'UwL2omher6v1E7wDzheA986sakE9XpyPMKH8BHNHM+z//7u7mPfhwqVtzjBZRbLFsCOYe8pNWlChcwbj3o63qg==', releaseDate: '2023-09-26T09:00:51.230Z', signature: 'Xi2P3HuBrJgT1CzEAF6TEmFKcvLymZKvwZ+kcyAgW2gJZzzH0IFdwwKzH+6COKva71CSkqbsZFQI/h44g4M0xLXdxyVbRCPnCYWhVHgJ5isYauyY04pkughKgL9OZeWN60y6enRxTmGrDQgKu7A7q9wRK9SkiuNhqmn0mabt9vBSWrHkbx4f4l+0joDtzSPagmk5wXvQ6Mf32nYC7EXCBCKe0uhaj/t3YVghGXfkXiI6gg9llirTy/0yop6Oyj21oGAaVeVbWE3FPFHOq8ob03e0u6XN84yGdFVg7PkCoN5ObBhoxW2vrvBOwq2SGJer68mxZVFnUc2iETk2xZ3GDw==' } resolving key... tutanota-credentials [2023-10-02T07:57:29.636Z] [WorkerSqlCipher] started sqlcipher-worker-1 [2023-10-02T07:57:29.716Z] [sqlcipher-worker-1] set up sql cipher done last missed notification check: { lastMissedNotificationCheckTime: 1696233409895 } scheduling to check sse in 86 seconds starting sse connection lookup sse request established SSE connection with code 200 received new timeout: heartbeatTimeout:240 scheduling to check sse in 288 seconds sse heartbeat 240 scheduling to check sse in 288 seconds sse heartbeat 240 scheduling to check sse in 288 seconds downloading missed notification lookup missed notification response 200 dl missed notification response closed MissedNotification is empty scheduling to check sse in 288 seconds storing push identifier ### cmd + a pressed [ApplicationWindow] closing offline db for userId XXX [2023-10-02T07:58:00.623Z] [OfflineDbRefCounter] closed db for XXX [2023-10-02T07:58:00.625Z] sse response error: Error: aborted at connResetException (node:internal/errors:717:14) at TLSSocket.socketCloseListener (node:_http_client:462:19) at TLSSocket.emit (node:events:525:35) at node:net:322:12 at TCP.done (node:_tls_wrap:588:7) { code: 'ECONNRESET' } sse response closed Saving session...completed. [Process completed] ```
charlag commented 1 year ago

thank you for the logs. A bit of an odd question but which keyboard layout do you use?

narduin commented 1 year ago

thank you for the logs. A bit of an odd question but which keyboard layout do you use?

I'm on an AZERTY french keyboard 😬

narduin commented 1 year ago

Changing to a QWERTY fixes the problem 😄

kibibytium commented 1 year ago

Not sure if this is the same issue any more but I can confirm that having the the French AZERTY layout and using Cmd+A closes the client. Note that the A key is were Q is located on US QWERTY layout.

charlag commented 1 year ago

Yeah, thanks, that was my guess as well.

The issue is probably with LocalShortcut not binding the keys correctly. This might mean some more issues on different layouts.

jalhubb commented 6 days ago

The issue is probably with LocalShortcut not binding the keys correctly. This might mean some more issues on different layouts.

I've had some users report that on AZERTY that using the shortcuts for toggling between folders is also not working at all. Using (Shift +) Number Key does nothing. Might be related?

acogoluegnes commented 4 days ago

I've had some users report that on AZERTY that using the shortcuts for toggling between folders is also not working at all. Using (Shift +) Number Key does nothing. Might be related?

I am the user that reported this issue to the Tuta support. The shortcuts that use numbers (1 to 6, to open the inbox, spam, etc) do not work on a French keyboard (azerty). I think this is because one must press Shift and another key to type a number on a French keyboard (e.g. Shift + & to type 1). I tried with an English keyboard layout, where one needs to press a single key to type a number and the shortcuts work in this case.

I'm using the web client on Brave, on MacOS and Linux. The problem happens on both OSes and with other browsers.

It may be possible to fix this in the Tuta Mail application, but dealing with all the layouts is quite challenging. Being able to change/remap the shortcuts could be another solution.

charlag commented 4 days ago

Hi, we did check and indeed number keys (non-numpad ones) do not work on AZERTY. We need to check what to do about it.

Some layouts (e.g. ru-ru) don't have many keys working either. It seems it is a bit tricky with layouts indeed and we need to invest some time in it.