Unable to open files in VS Code via terminal over SSH - vscode-remote

I have a windows10 machine using Remote-SSH to interface with repo on an Ubuntu18.04 system.
Until about a month ago I was able to open files using VS Code's integrated terminal.
Now entering code ./myFile.txt returns immediately. No error, no file opened.
If a non existent file is opened code ./myNonExistentFile.txt the same thing happens.
Running code ./myFile.txt into an entirely local setup (no Remote-SSH) works; the file opens in VS Code.
Remote-SSH is otherwise working.
Has anybody else noticed this behavior?

#Max Lobur may be right. If not, you still feel free to restart the VS Code.

It's expected. You probably don't have vs-code on a remote machine, nor have forwarded the X-server thus nothing will happen when you run this.
I suggest mounting the remote file system to local machine and run code . locally: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

As a last resort, try deleting your server's .vscode-server folder, which is located at your home folder, as detailed in https://github.com/microsoft/vscode-remote-release/issues/1443

Related

Unable to move to cache, unable to move cache folder, unable to create cache

I am using VS code to open my react projects. Neither the folder from the git repository nor the locally stowed projects are accessible.
[13512:1219/213241.168:ERROR:cache_util_win.cc(20)] Unable to move the cache: Zugriff verweigert (0x5)
[13512:1219/213241.169:ERROR:cache_util.cc(145)] Unable to move cache folder C:\Users\magsu\AppData\Roaming\Code\Cache\Cache_Data to C:\Users\magsu\AppData\Roaming\Code\Cache\old_Cache_Data_000
[13512:1219/213241.169:ERROR:disk_cache.cc(196)] Unable to create cache
I tried to reboot, cleaned and emptied the cache, deinstalled and reinstalled VS code.
I have experienced the same error message with node and python applications. In my case the issue was that I have executed the script file without the language prefix. Instead of:
node myscript.js
python myscript.py
I have executed:
myscript.js
myscript.py
I hope that this answer helps anyone having the same issue.
Either the permissions are bad or some process is holding a lock on those files (more likely).
I'm guessing in the background you have some process open that uses these files. For example, a dev server. Try killing all node processes via Windows Task Manager if you can't find the window and then try again.

RunAsInvoker causing errors to occur on certain installers

I am using a batch file to prevent the UA prompt from showing up to install programs:
set __COMPAT_LAYER=RunAsInvoker
But recently I have noticed that more and more installers throw errors like:
Error opening files for writing: https://...
I have tested running the same installation file entering the admin password (so without using the batch file) and it works perfectly fine.
Why do such errors occur, what has it to do with the environment variable mentioned above, and is there a way to fix it? Thanks in advance.

Java FX JAR File can not find SQL Server Driver

I fought for 8 hours yesterday getting my Java FX (11) Standalone JAR to work at all. I finally did, and now when I run it via java -jar myjar.jar (with path info for fx components), it at least "works" inasmuch as I can see my "own application's" error messages and message boxes lol.
This app needs to connect to SQL Server. It works FINE in IDE (IntelliJ). For JAR, I did not include the SQL Server driver as it is signed. No big deal - figure I'd just deploy it too and put it in the path. However, the JAR file can not "see" the driver (or the class - not sure) when run. Here is the info:
SQL Server driver is mssql-jdbc-8.2.2.jre11.jar
My connection Code is:
connection = DriverManager.getConnection(connectString); and connectString = "jdbc:sqlserver://localhost:1433;database=mydatabase;userName=myuser;password=mypword"
Again - this WORKS FINE in IDE. However, run from jar, it gets "java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost:1433;database=mydatabase;userName=myuser;password=mypword"
I have put the mssql-jdbc-8.2.2.jre11.jar into the same directory as the jar. I have included it in the MANIFEST.MF with Class-Path: mssql-jdbc-8.2.2.jre11.jar and also tried it in a "lib" subdirectory from the jar file with Class-Path: /lib. Nothing Works! I just keep getting the "no suitable driver" error. The full manifest file looks like:
Manifest-Version: 1.0
Class-Path: /lib
Main-Class: com.product.Launcher
Here is the full call from command line that actually launches the app: java --module-path C:/Users/KMatson/Documents/JetBrains/openjfx-11.0.2_windows-x64_bin-sdk/javafx-sdk-11.0.2/lib/ --add-modules javafx.controls,javafx.fxml,javafx.graphics -jar myjar.jar This does run the app, but as soon as app tries to connect to SQL, I get the error.
Also tried the old-style Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver") to no avail even thought it should not be necessary, and isn't needed run from IDE.
This is driving me crazy and has taken WAY more time than it should. I'm new to all this, and hope it is something simple I am overlooking or unaware of. Any help MUCH appreciated.
OK - here is the (intermediate) answer that worked for me. Apparently, having the "--module path" declaration in the cmd line was overriding the Class-path in the MANIFEST somehow. Either that or something was - dunno - didn't think i had a "modular" project. I'm not building from Maven, and module-info is not active.
Anyway - I simply put the driver jar in the "module path" I use from cmd, and it worked. I'm now trying to figure out how to make this thing "double clickable" so i don't have to issue from cmd line or use a batch file.

Xcode 9.4 : unexpected service error: The Xcode build system has crashed

I’m getting strange error while building project in Xcode 9.4
Build system information - unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.
I tried Xcode quit and reopen but that didn’t worked. Any solution?
Please clear derived data folder (located at ~/Library/Developer/Xcode/DerivedData) and restart the Xcode project.
This error usually happens between Xcode major versions. Apple usually claim their new build system is ** times faster than their previous version. If you see this error(I see this on changing Xcode9 to Xcode10 beta), you can always change it to the legacy build system. Here is how you can do this:
Open 'workspace settings'( it is now changed to 'Project Settings' if you are using Xcode10 or later) in the File Menu
Change build system to 'legacy'
Update for Xcode 13.4.1:
I had this infamous bug today as well. I tried a lot including clean project, delete derived, restart max etc.
What did the fix finally is similar to the answer of kakaiikaka: I set the workspace settings to "Legacy Build System (Deprecated)" for both, the shared and per user workspace. I tried to build with this, but got an error because I had packages wich are not supported.
Restarted Xcode, then changed back the build system. Restarted Xcode again.
Now the crash doesn't happen any more.
Looks like something internal was spoilt and cycling the build system fixed it.
I moved a lot of files all at once between folders, including nested folders. This error started happening. Nothing I did in regards to cleaning, purging derived data, or undoing the move operation would help.
What I did to help was: restore the previous version of the project file from source control and then re-add all the applicable new files to it. It was project file related. Deleting user data inside the project container did not help in my case. So as long as you use source control and can rollback the .xcodeproj, this may be an option.
it happened to me when i changed build configuration names. After deleting Pods folder and Podfile.lock, and then runnnig "pod install" fixed the issue.
For Xcode 10.2 delete podfile, podfile.lock, xcworkspace, open terminal, cd directory of project, pod init, add pods you want to pod file, pod install, open xcworkspac. Everything will be indexing now and then you can build.

How to fix SERVICE_PAUSED error on starting nssm server

So I need to run a custom server. It worked on other machines, but not on mine (all of them are on Windows).
My input:
nssm start custom-server
Error message:
custom-server: Unexpected status SERVICE_PAUSED in response to START control.
I tried to re-start it, but got the same message.
Use the following instructions to change I/O redirects:
nssm set [SERVICE_NAME] AppStdout [APP_PATH_INSTALL]\logs\service.log
nssm set [SERVICE_NAME] AppStderr [APP_PATH_INSTALL]\logs\service-error.log
Check the service log files to find the failure.
In my case, the failure was caused by a dependency on Python libraries.
As Garric15 states it is probably your install command.
This could be for example a StdOut redirect to a path / file that does not exist on your local machine.
Look in the Application event log for errors where the source is nssm around the time you installed the service.
The reason is because firewall is blocking the software which you are running as a service, start first software separately, it will ask you to add to firewall exclusions , then you can use it via nssm
Some scenario
App directory not provided or doesn't exist
nssm nssm set xyz-service AppDirectory "D:\Work\ShoppingKart"
File which is given for service may be corrupted (rebuild code)
The application trying to run is not proper or corrupted. Try to run without windows service once.
Program (.exe) file path not found (in this case look for the solution, or else give full path, if java not found even if it is there in env, just add full path)
I solved it by using no mws (Managed Windows Service?) release,
ex.
gogs_0.12.10_windows_amd64 works
gogs_0.12.10_windows_amd64_mws not working
The issue for me was there had been a Java update on my machine. The JAVA_HOME environment variable was now pointing to an invalid directory (i.e. the old Java version). Just needed to update the JAVA_HOME path and restart the solr services to fix it.
I was attempting to configure rclone as a windows 10 service. I fixed it including the rclone.conf archive inside the rclone folder.
In my case, the problem was that after the service was installed using nssm.exe, the program name was changed. This caused service to always go to paused state after start or restart the service, using either services.msc or nssm.exe command line.
Editing service nssm.exe startup parameters solved the problem for me.

Resources