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

loading space causes EPERM exception error on rename #159

Closed
Fer60 opened this issue Aug 7, 2019 · 7 comments
Closed

loading space causes EPERM exception error on rename #159

Fer60 opened this issue Aug 7, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@Fer60
Copy link

Fer60 commented Aug 7, 2019

The load function in the viewer is not working. I had saved an ILS on a usb stick. Then deleted the ILS from the viewer and tried to load it again into the viewer from the stick, but it does not load. I waited four minutes but nothing happens (only the moving circles).

@juancarlosfarah juancarlosfarah changed the title Loading loading space causes EPERM exception error on rename Aug 7, 2019
@juancarlosfarah
Copy link
Member

Thanks @Fer60 for reporting. I can see the error on Sentry (our exception reporting tool). It is the following:

Error: EPERM: operation not permitted, rename 'C:\Users\...\AppData\Roaming\graasp-desktop\var\tmp' -> 'C:\Users\...\AppData\Roaming\graasp-desktop\var\5d3f0cb5fd555f7e3fbe7ee2'

Looks like it is related to the following issue:

sindresorhus/electron-store#31

Will investigate.

@juancarlosfarah
Copy link
Member

I was able to reproduce on Windows 10 inside a VirtualBox VM. Will work on a fix now.

@juancarlosfarah
Copy link
Member

juancarlosfarah commented Aug 7, 2019

Looks like this is a well known problem on Windows. rimraf uses the following workaround to try and perform the affected action multiple times.

https://github.com/isaacs/rimraf/blob/79b933fb362b2c51bedfa448be848e1d7ed32d7e/rimraf.js#L338

Te accompanying comment reads:

  // We only end up here once we got ENOTEMPTY at least once, and
  // at this point, we are guaranteed to have removed all the kids.
  // So, we know that it won't be ENOENT or ENOTDIR or anything else.
  // try really hard to delete stuff on windows, because it has a
  // PROFOUNDLY annoying habit of not closing handles promptly when
  // files are deleted, resulting in spurious ENOTEMPTY errors.

For us, we are seeing the EPERM error, also caused by not closing handles promptly.

I have made a fix using the same strategy in the link above. Will refine and release tomorrow.

@juancarlosfarah
Copy link
Member

Running into issues with ENOTEMPTY: directory not empty, rmdir caused by rimraf when aborting duplicate space loads. This is documented here:

isaacs/rimraf#72

Following this example for a fix:

ipfs/js-ipfs@26b92a1

@juancarlosfarah juancarlosfarah self-assigned this Aug 8, 2019
@juancarlosfarah juancarlosfarah added the bug Something isn't working label Aug 8, 2019
@juancarlosfarah
Copy link
Member

juancarlosfarah commented Aug 8, 2019

@Fer60, this has been fixed in v0.11.6 and tested in a VM running Windows 10. Please confirm that it is working on your end. Thanks again for reporting!

@Fer60
Copy link
Author

Fer60 commented Aug 12, 2019 via email

@juancarlosfarah
Copy link
Member

Hi Fer. Thanks for your feedback. The functionality to change the size of the window is still there. It might be a bit hidden due to some styling issues that I will deal with before the bootcamp.

I can make the default size bigger, but I need to make sure that it doesn't make smaller apps/labs look too big.

Also, I will work on a way to "remember" the edited sizes between phase changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants