Open tanc opened 9 months ago
Hi.
EACCES: permission denied
Looks like the node process can't get access to folder.
Is there any chance to have the language server not crash if it can't access a file?
I have some annoying permissions on some containers that I can't change for political reasons.
Hello @tanc,
What kind of data the directory [redacted]/docker-volumes/solr-data/data
contains? Should it be accessible by the extension? i.e does it contain any Twig templates?
What permissions are given to the folder?ls -ld [redacted]/docker-volumes/solr-data/data
It would be great if you could provide direct steps on how to reproduce this problem.
Also, you can try the fork of this extension. I've changed the strategy in such way that the extension does not read all directories on startup. Although the problem may occur on completion inside of {{ include('|') }}
blocks. Please tell me if it does.
@tanc Are you sure that this isn't a docker image access issue?
@kaermorchen I mean it is a docker access issue in the sense that the language server crashes when it doesn't have access to certain folders/files. But in my opinion if the language server is scanning files it can't read then it shouldn't crash, it should gracefully move on.
@moetelo the [redacted]/docker-volumes/solr-data/data
contains the apache solr index data. It does not contain Twig templates and is of no interest to the extension. It would be good to be able to (optionally) specify the location of the twig templates as they are all located within one directory.
@tanc How can I reproduce your issue?
@kaermorchen the simplest repro I can come up with is this:
mkdir twig-test
cd twig-test
mkdir unreadable-test
sudo chown 8983:8983 unreadable-test
sudo chmod 770 unreadable-test
code .
This will open VSCode in the directory twig-test
and the language server will crash because it can't read unreadable-test
directory.
Hi, I see this error since installing Modern Twig:
The Twig Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
The full output is:
Note that
[redacted]
in the path is my change for this issue, it actually contains the full path.I have the Modern Twig extension enabled and no other twig extensions.