-
Notifications
You must be signed in to change notification settings - Fork 8
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
'Unknown Error' #1
Comments
Ah - discovered the developer tools which shows :
But the file does exist and if I run php-cs-fixer with the --config-file pointing at it then it works ok. It's quite possible I'm doing something really dim :-) |
What happens if you run: |
That runs fine too I'm afraid. I tried removing the extension and re-installing it in a new project. On first run I get both the 'Unknown error' and a 'Cannot find .php_cs.dist' one. If I create the dist file then it's back to just the unknown error, but this time in the dev tools I get :
Not entirely sure it's related, but I see similar errors being reported on the formatter extension here : vysker/vscode-php-formatter#15 |
By any chance, are you on windows? - I just uploaded a fix that makes this extension cross-platform |
No - not on Windows I'm afraid. That way lies madness ;-) I'll maybe have a play with it again tomorrow and see if I can get you some more useful info. It's probably just some weird quirk of the way my machines are set up :-) I'm sure you'd have more people pestering you if it was a common issue :-) |
K, cool - let me know. I wouldn't be too sure, I imagine it has something to do with the Let me know what you find - thanks! |
Sorry for the delay - I got a colleague at work to try installing the plugin (they'd never had php-cs-fixer installed at all) and hit exactly the same issue on their Mac. Sadly, the debug tools just give the same helpful-not-helpful 'unknown error' message - sorry. Not at all sure it's related, but when I run it on yet another Mac I get the same unknown error - but also :
Which is possibly related, or possibly not. I can see a ref to a similar thing here about a change in php 7.1 which is what I and my colleagues machines are running. Anyway - if none of that helps feel free to close the issue :-) If I get time to debug more I will gently prod you ;-) |
I've had the same "Unknown Error" pop up repeatedly as well. Debug logs seems to indicate it can't write to the .php_cs.cache file. When I try setting "simple-php-cs-fixer.usingCache": false vscode is telling me it's an unknown option. |
I'm seeing the same issue as @redenz. From the console:
Is there a way to disable the cache? |
I'm getting the same error. macOS 10.14.1, VSCode 1.29.1. As a workaround, I was able to disable the cache in my config file: <?php
return PhpCsFixer\Config::create()
->setUsingCache(false); |
Any thoughts on how we could fix this in the plugin? I get the same error. Maybe add a flag to the command? Or do something with permissions? |
I don't know much about VS Code extensions. Unless getArgs() isn't working for some reason, it looks like removing lines 35-37 would turn off caching always. For some reason, the |
How are you folks seeing the errors? I'm getting the unknown error when I try to use a config file |
vscode developer console
… On Feb 26, 2020, at 6:51 PM, Erin Dalzell ***@***.***> wrote:
How are you folks seeing the errors? I'm getting the unknown error when I try to use a config file .php_cs.dist that I made from the Laravel gist
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The Debug Console? Nothing is shown when I run it, unfortunately. |
Not the debug console. There’s VSCode developer tools. I think it’s under the help menu. It will open up a chrome developer console and show you the errors.
… On Feb 26, 2020, at 7:37 PM, Erin Dalzell ***@***.***> wrote:
The Debug Console? Nothing is shown when I run it, unfortunately.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
So there's an error AND it seems to be loading the default, yet double quotes are not being converted to single quotes as per the default. If I run it from the command line it DOES work though, so it's somehow not being applied to the current file. If I take out my rule and turn off the custom config there are no errors yet the file is NOT processed. WTH. |
I get this error everyone once in a while and it just breaks my projects. Any solutions? |
Sorry to be the first person to add an issue :-/ Especially as it's such a vague one...
Installed the plugin but when I run it I just get the vscode error dialog at the top of the page saying 'Simple PHP CS Fixer: Unknown error.' I can run
php-cs-fixer fix path/to/the/same/file.php
in the terminal and it works ok. There's nothing being logged in the output/problems/terminal - so I'm not even sure where to start fixing it myself - sorry :-/ If there's anything I can do in vscode to help just let me know and I can stop annoying you ;-)The text was updated successfully, but these errors were encountered: