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

Uncaught Error: EPERM Operation not permitted when trying to directly open attachments (as opposed to download, then open) #4946

Closed
ganthern opened this issue Jan 6, 2023 · 1 comment · Fixed by #5009
Labels
bug broken functionality, usability problems, unexpected errors desktop Desktop client related issues state:done meets our definition of done state:tested We tested it and are about to release it
Milestone

Comments

@ganthern
Copy link
Contributor

ganthern commented Jan 6, 2023

Seems to happen at least since 3.103.3 on windows only:

Client: win32
Type: PREMIUM
Tutanota version: 3.106.4
Timestamp (UTC): Fri, 06 Jan 2023 12:06:33 GMT
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.106.4 Chrome/108.0.5359.62 Electron/22.0.0 Safari/537.36
Error
Error message: EPERM: operation not permitted, open 'C:\Users\noo\AppData\Local\Temp\tutanota\nkX3ZzdgucS7lQyX8LnRtQ\download\QUOTE - CM_FR_20230111_71956 .pdf'
Stacktrace:
Error: EPERM: operation not permitted, open 'C:\Users\noo\AppData\Local\Temp\tutanota\nkX3ZzdgucS7lQyX8LnRtQ\download\QUOTE - CM_FR_20230111_71956 .pdf'
Client: win32
Type: PREMIUM
Tutanota version: 3.103.3
Timestamp (UTC): Mon, 07 Nov 2022 14:32:35 GMT
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.103.3 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36
Error
Error message: EPERM: operation not permitted, open 'C:\Users\noo\AppData\Local\Temp\tutanota\HOxRpF7Wor9FNvnmzpT7qw\download\Emran Aloul.pdf'
Stacktrace:
Error: EPERM: operation not permitted, open 'C:\Users\noo\AppData\Local\Temp\tutanota\HOxRpF7Wor9FNvnmzpT7qw\download\Emran Aloul.pdf'

Client: win32
Type: PREMIUM
Tutanota version: 3.104.5
Timestamp (UTC): Fri, 02 Dec 2022 14:30:53 GMT
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop/3.104.5 Chrome/102.0.5005.167 Electron/19.1.5 Safari/537.36
Error
Error message: EPERM: operation not permitted, open 'C:\Users\user\AppData\Local\Temp\tutanota\WBPSqyrxJoUWG_MOa1iX5Q\download\【最新版_久保編集】★fin_資料3_諸外国指標・政策概要比較一覧(1117時点) - コピー.xlsx'
Stacktrace:
Error: EPERM: operation not permitted, open 'C:\Users\user\AppData\Local\Temp\tutanota\WBPSqyrxJoUWG_MOa1iX5Q\download\【最新版_久保編集】★fin_資料3_諸外国指標・政策概要比較一覧(1117時点) - コピー.xlsx'

Attachments will not open after multiple tries and refresh.

I receive a message "an error has occurred" every time I open my Tutanota account.

Every time I log on it says "error". I am also unable to download attachments.

For the last week or so I have been unable to open attachments from known sources that previously were opening without a problem. When I try to download, they do not appear in my download file. The error code says they can't be accessed because they're already open in another file or something similar. Help, I need these files!

Observation:

  • Looking at all the file names, there doesn't seem to be a pattern like spaces or other special characters that cause this. It's also not constrained to one file type.
  • the fact that some users report an error after each app start is odd; is there another file like a log that we're accessing on startup that may have the same problem? -> this may be happening during tmp cleanup

Further Info:

One user got back to us, they're experiencing this since about ~26th of december. They're receiving this message when using the "open" option on attachments:

"There was an error opening this document. This file is already open or in use by another application."

Test Notes

see reproduction in comment. try it on win, linux, mac. If #2113 happens, that's not a dev-bug

@ganthern ganthern added bug broken functionality, usability problems, unexpected errors desktop Desktop client related issues labels Jan 6, 2023
@ganthern ganthern changed the title Uncaught Error: EPERM Operation not permitted when trying to directly opening attachments (as opposed to download, then open) Uncaught Error: EPERM Operation not permitted when trying to directly open attachments (as opposed to download, then open) Jan 6, 2023
@ganthern
Copy link
Contributor Author

Electron seems to keep the file open after downloading it for some reason. One way to repro:

  1. click "Open" on a pdf for example
  2. it's downloaded, but adode reader will show an error that the file is still in use
  3. searching for the file name in resmon.exe under the CPU tabs associated handles will show tutanota as having the file open
  4. open a new window in tutanota and repeat step 1
  5. see the EPERM error because we're now trying to overwrite a file we already have a handle to

@ganthern ganthern self-assigned this Jan 18, 2023
ganthern added a commit that referenced this issue Jan 18, 2023
on windows, we need to call close() to release the file handle and be
able to open the joined file with other apps (or re-download the file)

fix #4946
@ganthern ganthern added this to the 3.108.0 milestone Jan 18, 2023
@ganthern ganthern removed their assignment Jan 19, 2023
ganthern added a commit that referenced this issue Jan 20, 2023
on windows, we need to call close() to release the file handle and be
able to open the joined file with other apps (or re-download the file)

fix #4946
@ganthern ganthern linked a pull request Jan 20, 2023 that will close this issue
ganthern added a commit that referenced this issue Jan 20, 2023
on windows, we need to call close() to release the file handle and be
able to open the joined file with other apps (or re-download the file)

fix #4946
@vitoreiji vitoreiji added the state:done meets our definition of done label Jan 23, 2023
@charlag charlag added the state:tested We tested it and are about to release it label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors desktop Desktop client related issues state:done meets our definition of done state:tested We tested it and are about to release it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants