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
5.97k stars 512 forks source link

Uncaught TypeError: Invalid state: Controller is already closed #5763

Open ganthern opened 1 year ago

ganthern commented 1 year ago

probably related to our move to using fetch in the main thread: https://github.com/nodejs/undici/issues/1564

some errors in node's new http implementation are not caught correctly.

Client: linux
Type: FREE
Tutanota version: 3.116.8
Timestamp (UTC): Thu, 10 Aug 2023 12:45:14 GMT
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.116.8 Chrome/114.0.5735.248 Electron/25.3.2 Safari/537.36
TypeError
Error message: Invalid state: Controller is already closed
Stacktrace:
TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at new NodeError (../../../../home/steph/node:internal/errors:399:5)
at ReadableStreamDefaultController.enqueue (../../../../home/stephanie/node:internal/webstreams/readablestream:1036:13)
at fetchParams.controller.resume (../../../../home/steph/node:internal/deps/undici/undici:11261:45)
at process.processTicksAndRejections (../../../../home/steph/node:internal/process/task_queues:95:5)
the moment when i open tutanota 
charlag commented 11 months ago

Still reported regularly

Tutanota is always informing that an error ocurred.

Client: linux
Tutanota version: 3.118.7
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.118.7 Chrome/116.0.5845.188 Electron/26.2.1 Safari/537.36
TypeError
Error message: Invalid state: Controller is already closed
Stacktrace:
TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at new NodeError (../../../../../home/Henrique/node:internal/errors:399:5)
at ReadableStreamDefaultController.enqueue (../../../../../home/Henrique/node:internal/webstreams/readablestream:1036:13)
at Fetch.resume (../../../../../home/Henrique/node:internal/deps/undici/undici:11305:45)
at process.processTicksAndRejections (../../../../../home/Henrique/node:internal/process/task_queues:95:5)
charlag commented 10 months ago

~~I think this is it: https://github.com/nodejs/undici/issues/1564~~

EDIT: oops you already said it

charlag commented 10 months ago

it should have been included in 18.9 release? https://github.com/nodejs/node/releases/tag/v18.9.0

because it updated undici to 5.9.1

but it's not?

aralroca commented 4 days ago

I have the same problem with Node 20. Switching to Node 22 is working fine, however my cloud provider is using the LTS (20) and I can't move to 22 there. Any workaround to solve it?