Skip to content

Cannot open file 'HasOneOrMany.php': File not found #298

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

Open
andreshg112 opened this issue Apr 26, 2018 · 8 comments
Open

Cannot open file 'HasOneOrMany.php': File not found #298

andreshg112 opened this issue Apr 26, 2018 · 8 comments

Comments

@andreshg112
Copy link

andreshg112 commented Apr 26, 2018

Issue Type: Bug

Note: VS Code contributor told me to post the issue here: microsoft/vscode#48687 (comment)

The whole message is this:
No se puede abrir 'HasOneOrMany.php': Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php).

I had a project named "saberapp-voyager". I deleted it. I created a new one called saberapp-admin in the same directory. Now, when I try to go to the definition of a function or class, this error happens. I use PHP Intellisense from Felix Becker.
I disabled and enabled, uninstalled and installed the extension but It didn't work. I also deleted recent files and folders.

This is what the log shows:
[2018-04-25 11:26:23.083] [renderer1] [error] Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php): Error: Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php)
at new t (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1256:806)
at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2885:812
at /usr/share/code/resources/app/node_modules.asar/graceful-fs/graceful-fs.js:241:16
at FSReqWrap.oncomplete (original-fs.js:114:15)

VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:34:44.222Z)
OS version: Linux x64 4.13.0-39-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2486)
Load (avg) 1, 1, 1
Memory (System) 7.71GB (0.99GB free)
Process Argv /usr/share/code/code --unity-launch
Screen Reader no
VM 0%
Extensions (43)
Extension Author (truncated) Version
ng-template Ang 0.1.9
bracket-pair-colorizer Coe 1.0.37
compulim-vscode-closetag Com 1.1.0
vscode-markdownlint Dav 0.15.0
empty-indent Dmi 0.2.0
EditorConfig Edi 0.12.1
beautify Hoo 1.3.0
php-namespace-resolver Meh 1.0.5
material-icon-theme PKi 3.3.0
code-settings-sync Sha 2.9.0
indenticator Sir 0.5.1
ionic2 Tha 3.0.2
html-css-class-completion Zig 1.17.1
html-snippets abu 0.2.1
vscode-javascript-snippet-pack aka 0.1.5
vscode-angular2-files ale 1.4.4
htmltagwrap bra 0.0.7
mapfile chi 0.0.1
path-intellisense chr 1.4.2
laravel-goto-view cod 1.2.0
vscode-eslint dba 1.4.8
githistory don 0.4.0
jquerysnippets don 0.0.1
tslint eg2 1.0.28
apacheconf-snippets eim 1.1.9
php-debug fel 1.12.3
php-intellisense fel 2.3.1
auto-rename-tag for 0.0.15
mysql-syntax jak 1.3.1
Angular1 joh 0.2.0
Angular2 joh 2.16.1
vscode-phpfmt kok 1.0.19
dotenv mik 1.0.1
vscode-apache mrm 1.1.1
php-docblocker nei 1.6.0
indent-rainbow ode 7.2.2
laravel-blade one 1.18.0
laravel5-snippets one 1.4.0
ionic2-snippets oud 1.0.0
laravel-artisan rya 0.0.17
html5-boilerplate sid 1.0.1
highlight-matching-tag vin 0.4.4
bootstrap-3-snippets wcw 0.1.0

(2 theme extensions excluded)

@felixfbecker
Copy link
Owner

Deleting your cache directory should do it:

https://github.com/felixfbecker/php-language-server/blob/7e1ca75863dfed0c782b5bfbec85c6d70401c355/src/Cache/FileSystemCache.php#L20-L26

@andreshg112
Copy link
Author

andreshg112 commented Apr 27, 2018

What is the cache directory? ~/.vscode?

@felixfbecker
Copy link
Owner

Depends. Please see the link above how it's determined.

@andreshg112
Copy link
Author

I've found it: ~/.phpls/

Should I delete it?

@felixfbecker
Copy link
Owner

Yes

@andreshg112
Copy link
Author

It worked!
However, I wouldn't like to delete all the cache if the error happens again.
Thank you!

@razvanphp
Copy link

Happened to me too, very annoying, is this related to felixfbecker/php-language-server#513?

@sinergantara
Copy link

Issue Type: Bug

Note: VS Code contributor told me to post the issue here: microsoft/vscode#48687 (comment)

The whole message is this:
No se puede abrir 'HasOneOrMany.php': Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php).

I had a project named "saberapp-voyager". I deleted it. I created a new one called saberapp-admin in the same directory. Now, when I try to go to the definition of a function or class, this error happens. I use PHP Intellisense from Felix Becker.
I disabled and enabled, uninstalled and installed the extension but It didn't work. I also deleted recent files and folders.

This is what the log shows:
[2018-04-25 11:26:23.083] [renderer1] [error] Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php): Error: Archivo no encontrado (file:///opt/lampp/htdocs/saberapp-voyager/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php)
at new t (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1256:806)
at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2885:812
at /usr/share/code/resources/app/node_modules.asar/graceful-fs/graceful-fs.js:241:16
at FSReqWrap.oncomplete (original-fs.js:114:15)

VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:34:44.222Z)
OS version: Linux x64 4.13.0-39-generic

System Info
Extensions (43)

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants