Skip to content

Occasional "Unable to watch for file changes in this large workspace" warnings #39

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

Closed
ubidefeo opened this issue Feb 25, 2021 · 17 comments · Fixed by #1409
Closed

Occasional "Unable to watch for file changes in this large workspace" warnings #39

ubidefeo opened this issue Feb 25, 2021 · 17 comments · Fixed by #1409
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ubidefeo
Copy link

ubidefeo commented Feb 25, 2021

I occasionally get this warning from a new, bare minimum sketch:

Unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.

Clipboard01

There doesn't seem to be any pattern to when I get it. I have a nearly empty sketchbook with only one library installed.

The linked instructions are certainly nothing a beginner would enjoy being exposed to:

https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc

It seems like this is a spurious warning and not a good user experience, especially for a beginner who won’t understand how to interpret it and may treat it as a “red herring” for completely unrelated problems they are having (example).

Arduino IDE version

Original report

Unknown

Last verified with

Version: 2.0.0-rc5-snapshot-b069f94
Date: 2022-04-05T09:31:01.231Z
CLI Version: 0.21.0 [10107d24]

Operating system

Windows

Operating system version

10

Additional context

[ originally reported by @per1234 ]

@ubidefeo ubidefeo added type: bug priority: low Resolution is a low priority labels Feb 25, 2021
@rsora rsora added the os: windows Specific to Windows operating system label Feb 25, 2021
@kittaakos
Copy link
Contributor

Upstream issue: eclipse-theia/theia#9117

@kittaakos kittaakos removed the os: windows Specific to Windows operating system label Mar 2, 2021
@elsatch
Copy link

elsatch commented Mar 3, 2021

I also stumbled upon this very same error with Blink and other couple of examples opened. I was puzzled by the link, to another platform and apparently unrelated.

@ajworkman64
Copy link

I also have this error. Windows 10

@per1234 per1234 added priority: high Resolution is a high priority and removed priority: low Resolution is a low priority labels May 2, 2021
@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 20, 2021
@rsora rsora added criticality: high Of high impact and removed priority: high Resolution is a high priority labels Nov 2, 2021
@fstasi fstasi closed this as completed Jan 25, 2022
@ubidefeo
Copy link
Author

Closed because unable to reproduce

@KurtE
Copy link

KurtE commented Feb 8, 2022

I reproduced this yesterday on the daily build 20220205
I was doing Teensy stuff with the Alpha integration code for Micromod or T4.1

But again unclear of steps to reproduce. I believe I had two windows open and one sketch has lots of possible different
display libraries, and I was switching which one I was trying from ILI9341_t3n to ILI9341_t3 to RA8875...
And it was after one of these switching which library to use, that I ran into this.

@per1234 per1234 reopened this Feb 8, 2022
@KurtE
Copy link

KurtE commented Feb 13, 2022

I had it happen again today and it may give a clue:
image

What I did, to create this one.

I had today's daily build installed 20220212
I was running it with one sketch open and then saw a sketch on forum post, that they were having problems building.
So I ctrl+n to open new window.

I then copy/paste in whole sketch and then did a Verify command. It compiled fine, and then went away for several Hours.

I never did a save of this sketch or the like,

But my guess is, that during this time Norton 360 ran and was doing a cleanup of my Temp directory (Windows 10).

And when I got back and looked at the window it had the message.

Also note at the sketch name it shows (deleted) after the generated sketch name... So again guessing that the cleanup code may have removed it...

@kittaakos
Copy link
Contributor

kittaakos commented Feb 17, 2022

I also have it on macOS. Steps in my case:

  • Open the IDE,
  • New sketch (do not touch it),
  • Save (do not rename, or do anything, just save it)

Backend console:

root ERROR [nsfw-watcher: 11391] NSFW service error on "/private/var/folders/g0/n_2cw4ds44l2byzv39xrc4340000gp/T/.arduinoIDE-unsaved2022117-11379-bju023.oa4aj/sketch_feb17a": [Error: Service shutdown unexpectedly]
root INFO New sketch 'sketch_feb17a' was crated in sketchbook 'file:///Users/akos.kitta/Documents/Arduino'.
root ERROR Request repositories failed with error: Unable to find path to repository on disk.

The file is marked as deleted:
Screen Shot 2022-02-17 at 22 13 52

Version: 2.0.0-rc4-snapshot.7b5c9d7-snapshot-7b5c9d7
Date: 2022-02-17T15:10:36.531Z
CLI Version: 0.21.0 [10107d24]

Copyright © 2022 Arduino SA

Update:
After touching and saving the file that was marked as (deleted), I do not see the (deleted) flag anymore, but when I hover over the sketch tab, it still points to the temp dir. So, I assume my previous save has failed.

Screen Shot 2022-02-17 at 22 16 26

Screen Shot 2022-02-17 at 22 25 22

Update2:
I cannot save any sketch:

ketch_feb17a": [Error: Service shutdown unexpectedly]
root INFO New sketch 'sketch_feb17a' was crated in sketchbook 'file:///Users/akos.kitta/Documents/Arduino'.
root ERROR Request repositories failed with error: Unable to find path to repository on disk.
root INFO Sketch 'sketch_feb17a' was removed from sketchbook 'file:///Users/akos.kitta/Documents/Arduino'.
root ERROR Request repositories failed with error: Unable to find path to repository on disk.
root ERROR Request copy failed with error: 5 NOT_FOUND: Can't open sketch: can't find main Sketch file in /Users/akos.kitta/Documents/Arduino/sketch_feb17a
root ERROR Failed to execute command:

I will try to wipe all my Arduino IDE caches and will update this thread. Maybe there's an old, leftover dev-state/cache on my mac.

@KurtE
Copy link

KurtE commented Jun 18, 2022

Just an FYI. I had an example sketch open on Yesterdays daily build. I then went outside and worked in yard for a few hours and came back. During that time Norton went through and did some background tasks like probably clean out files in my temporary directly...

And now have window that looks like:
image

Note with IDE1, At times Norton would do this and if I tried to do something like a compile, it would error out saying it could not find the file(s)... But you could still see the sources.

@KurtE
Copy link

KurtE commented Jun 19, 2022

Follow on to previous message. Today I downloaded today daily build. And when it opened, I think it tried to reopen the same sketch from temp, which does not exist:
image

@kittaakos
Copy link
Contributor

Still happening when saving a temp sketch.

root ERROR NSFW service error on "/private/var/folders/z1/xkw1yh5n7rz4n8djprp1mdn80000gn/T/.arduinoIDE-unsaved202281-53385-1rc79ha.fjx3/sketch_sep1a": Error: Service shutdown: root path changed (renamed or deleted)

The problem is that the IDE2 could remain in a limbo state. The sketch was saved as expected:

Screen Shot 2022-09-01 at 11 46 51

But IDE2 window fails to reload the URL to point to the new sketch location:

Screen Shot 2022-09-01 at 11 45 28

I do not see any feasible solution for now but this:

// TODO: consider implementing the temp sketch deletion the following way:
// Open the other sketch with a `delete the temp sketch` startup-task.

@kittaakos
Copy link
Contributor

kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 8, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 15, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes arduino#39

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Sep 15, 2022
 - From now on, NSFW service disposes after last reference
is removed. No more 10sec delay.
 - Moved the temp workspace deletion to a startup task.
 - Can set initial task for the window from electron-main.
 - Removed the `browser-app`.

Closes #39

Signed-off-by: Akos Kitta <[email protected]>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 15, 2022
@MaxBoyman
Copy link

Hey, even in version 2.1.0 this error shows up on windows 11.

@kittaakos
Copy link
Contributor

Hey, even in version 2.1.0 this error shows up on windows 11.

Thank you for reporting it. Can you give us some details of what you did when this happened?

@MaxBoyman
Copy link

Nothing Special, arduino ide was just open for 2 days and i was sleeping my laptop when i was about moving it to my work place. it happened exactly after the time i was wake my laptop from sleep. 3 different IDE windows was open and the message was shown in all three windows at same time. after i click on the instruction button and the VSCode explanation about how to solve the problem on linux shows up. to be more percise cause i think it might be helpful. three IDE windows had a sum of around 6000 lines of code and a total number of 10 different libraries. thats all!

@kittaakos
Copy link
Contributor

2 days and i was sleeping my laptop

Helpful info. Thanks!

after i click on the instruction button and the VSCode explanation about how to solve the problem on linux shows up. to be more percise cause i think it might be helpful. three IDE windows had a sum of around 6000 lines of code and a total number of 10 different libraries. thats all!

The notification you see is a false-positive warning and does not concern workspace size. eclipse-theia/theia#9117

I will keep an eye on this problem and will open a follow-up issue. Probably, the root cause is the OS sleep.

@nativeit
Copy link

I have been consistently encountering this error, I'm using v2.1.1, and on more than one occasion it has resulted in the blank screen (presumably related to the aforementioned temp directory problem) and this has resulted in my losing work. I'm not sure if its relevant, but it seems to be more frequent when I open a library example from the File menu.

Additionally, the recent files list has not been updating itself like I would expect.

I understand this is an upstream issue, and there's not currently much that can be done on this end, but I did want to express one concern: there are several instances where this error has been reported on the Arduino forums, and the usual response has been to cite the upstream issue and users are being told it does not impact usual functions. As I mentioned, I have lost work due to this problem, and I think it would be helpful if users are told how to avoid scenarios that might result in their working on a file that's being stored in a temp directory (like editing library examples), and--while it shouldn't be necessary, people are people--remind users to save sketches frequently.

Hope the upstream issue is resolved soon. Many thanks to all the devs contributing to this project!

@lmoellendorf
Copy link

lmoellendorf commented Oct 29, 2023

I have been consistently encountering this error, I'm using v2.1.1, and on more than one occasion it has resulted in the blank screen (presumably related to the aforementioned temp directory problem) and this has resulted in my losing work. I'm not sure if its relevant, but it seems to be more frequent when I open a library example from the File menu.

I observed the same behavior today. Two out of four editors with examples opened directly from libraries/<mylib>/examples/ showed a blank editor and the aforementioned error message, two others are still fine. The editors were running for some hours before I noticed.

Why is this issue closed if the bug is not solved?

EDIT:
Version: 2.2.1
Datum: 2023-08-31T14:16:33.536Z
CLI Version: 0.34.0Copyright © 2023 Arduino SA [{5}]

OS: 6.1.46-gentoo-x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.