Cannot run VSCode source code because its unable to find electron app in directory - visual-studio-code

Overview:
When I attempt to run VSCode with the instructions given in the contributions page to download all the packages, build the source code, and then run it all on the terminal, an error message pops up saying that I don't have the electron app in the vscode directory. Shouldn't have the electron app been installed when I ran the yarn command to install and build all the dependencies?
Steps to reproduce the bug:
$ yarn //building and installing all dependencies
$ yarn watchd //building vscode
$ ./scripts/code.sh //running vscode
Error Message:
Error launching app
Unable to find Electron app at /home/juan/Desktop/Projects/vscode
Cannot find module '/home/juan/Desktop/Projects/vscode/out/main'. Please verify that the package.json has a valid "main" entry
System Details:
CPUs | Intel(R) Core(TM) i7-6600U CPU # 2.60GHz (4 x 3200)
-- | --
GPU Status | 2d_canvas: unavailable_softwareflash_3d: disabled_softwareflash_stage3d: disabled_softwareflash_stage3d_baseline: disabled_softwaregpu_compositing: disabled_softwaremultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: disabled_offrasterization: disabled_softwareskia_renderer: disabled_off_okvideo_decode: disabled_softwareviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: unavailable_softwarewebgl2: unavailable_software
Load (avg) | 1, 1, 1
Memory (System) | 7.63GB (0.12GB free)
Process Argv | . --no-sandbox
Screen Reader | no
VM | 0%
OS|Ubuntu 18.04 LTS
Extensions:
Extension | Author (truncated) | Version
-- | -- | --
Bookmarks | ale | 11.2.0
vscode-sqlite | ale | 0.8.2
code-gnu-global | aus | 0.2.2
npm-intellisense | chr | 1.3.0
vscode-svgviewer | css | 2.0.0
vscode-markdownlint | Dav | 0.36.0
jshint | dba | 0.10.21
vscode-eslint | dba | 2.1.5
vscode-html-css | ecm | 0.2.3
EditorConfig | Edi | 0.15.1
vscode-npm-script | eg2 | 0.3.12
vscode-firefox-debug | fir | 2.8.0
beautify | Hoo | 1.5.0
vscode-emacs-friendly | lfs | 0.9.0
rainbow-csv | mec | 1.7.0
python | ms- | 2020.5.80290
cpptools | ms- | 0.28.2
debugger-for-chrome | msj | 4.12.8
sqltools | mtx | 0.22.5
material-icon-theme | PKi | 4.1.0
rust | rus | 0.7.8
lc2k | vio | 1.1.1
Here is the bug report I filled in the vscode github page: https://github.com/microsoft/vscode/issues/99537

I got this same error myself when the code did not build correctly.
In your second step you do:
yarn watchd
I tried this command myself, but ran into the same issue that you have stated here. Although the official wiki suggests this as a tip, I would just ignore it.
Instead, do either of these instead (this is what the official wiki originally suggest to do):
Type: Ctrl + Shift + B
Or alternatively use the Command Palette:
Type: Ctrl + Shift + P
Search for the option called: Tasks: Run Build Task and select it.
Once you start the build task you'll see a couple of things:
Firstly, at the bottom of VS Code (on your status line), VS Code will let you know the code is building.
Secondly, The build command will open two terminals:
Task - Build VS Code
Task - Build VS Code Extensions
Watch the output for both of terminals, make sure:
Task - Build VS Code terminal outputs: [some time] Finished compilation ...
and
Task - Build VS Code Extensions terminal outputs: [some time] Finished compilation extensions ...
If not and the build fails, you'll probably get a notification from VS code saying so (You'll probably get the error twice, one for each task):
yarn ... exited with code [some non-zero integer]
A common error that may occur is the ENOSPC error from inotify (also documented well in a medium blog). You'll want to issue this command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Arch users would issue:
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
After fixing this, trying to build again should work. Start the build task again and make sure both tasks succeed. (You'll notice that the tasks do not end after they succeed. This is because they will watch for changes you make in the code while developing and automatically recompile for you).
If successful you may finally issue:
./scripts/code.sh
A new instance of VS Code should open called: Code - OSS dev. This is the version of VS Code you just built.

Related

Checkov upgrade notice causing CI to fail

Beginning around 11:30am ET on 11/21/2022, our CI pipelines started failing due to a Checkov update/upgrade notice with an input prompt (see output below).
Is there command line option to skip this check from bridgecrew?
$ checkov
_ _
___| |__ ___ ___| | _______ __
/ __| '_ \ / _ \/ __| |/ / _ \ \ / /
| (__| | | | __/ (__| < (_) \ V /
\___|_| |_|\___|\___|_|\_\___/ \_/
By bridgecrew.io | version: 2.1.244
Update available 2.1.244 -> 2.2.80
Run pip3 install -U checkov to update
Would you like to “level up” your Checkov powers for free? The upgrade includes:
• Command line docker Image scanning
• Software Composition Analysis
• Centralized policy management
• Free bridgecrew.cloud account with API access
• Auto-fix remediation suggestions
• Enabling of VS Code Plugin
• Dashboard visualisation of Checkov scans
• Integration with GitHub for:
◦ Automated Pull Request scanning
◦ Auto remediation PR generation
• Integration with up to 100 cloud resources for:
◦ Automated cloud resource checks
◦ Resource drift detection
and much more...
It's easy and only takes 2 minutes. We can do it right now!
To Level-up, press 'y'...
Level up? (y/n): Traceback (most recent call last):
File "/usr/bin/checkov", line 9, in <module>
sys.exit(run())
File "/usr/lib/python3.10/site-packages/checkov/main.py", line 368, in run
bc_integration.onboarding()
File "/usr/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 696, in onboarding
reply = self._input_levelup_results()
File "/usr/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 860, in _input_levelup_results
result = str(input('Level up? (y/n): ')).lower().strip() # nosec
EOFError: EOF when reading a line
Uploading artifacts for failed job
00:01
Uploading artifacts...
WARNING: plan.json: no matching files
ERROR: No files to upload
I did try to update the version using pip but the old version is still being used. This is a separate issue, and at this point my focus is on avoiding the update check entirely.
bash-5.1# checkov --version
2.1.244
bash-5.1# pip3 install -U checkov
... (Lots of output)
bash-5.1# checkov --version
2.1.244
This is my .checkov.yaml file:
compact: true
quiet: true
skip-download: false
download-external-modules: true
directory:
- ./
skip-check:
- CKV_AWS_18
- CKV_AWS_50
- CKV_AWS_115
- CKV_AWS_116
- CKV_AWS_117
- CKV_AWS_158
- CKV_AWS_173
- CKV_OPENAPI_4 # some APIs are public
- CKV_OPENAPI_5 # some APIs are public
- LOW
You're only getting this output because you're calling checkov without any command line parameters. It's been like this for about a year maybe even more.
If anyone else runs into this, I fixed it by explicitly passing the config-file flag on the command line:
checkov --config-file .checkov.yaml
It's still unclear to me why the pipelines started failing when we were using a pre-build Docker image to run our jobs.
I did try to update the version using pip but the old version is still being used
Version 2.1.244 was released on Oct 2nd, so it isn't from today. I join James' suggestion to use parameters - it will avoid this prompt altogether. And also to check what is missing in your machine's deps as it seems the latest checkov cannot be installed. Highly recommend using checkov's docker directly if you're not in the mood to debug this, too!

gcloud update components - permission denied on file ...\kuberun_licenses\LICENSES.txt

Start udating gcloud:
Your current Cloud SDK version is: 321.0.0
You will be upgraded to version: 322.0.0
┌──────────────────────────────────────────────────┐
│ These components will be updated. │
├──────────────────────────┬────────────┬──────────┤
│ Name │ Version │ Size │
├──────────────────────────┼────────────┼──────────┤
│ Cloud SDK Core Libraries │ 2021.01.05 │ 16.1 MiB │
│ Kuberun │ 0.0.1 │ 20.6 MiB │
└──────────────────────────┴────────────┴──────────┘
I get error:
╠═ Uninstalling: Cloud SDK Core Libraries ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Uninstalling: Kuberun ═╣
ERROR: (gcloud.components.update) Отказано в доступе: [C:\Users\USER_NAME\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt]
Ensure you have the permissions to access the file and that the file is not in use.
Env: Win10
i try from IDEA appEngine Plugin.
try from CMD with admin privilegies.
with some error
How to update this ?
Maybe you can disable Kuberun ? I use only appengine
I solved this issue by removing the folder kuberun_licenses from google-cloud-sdk\platform path. Not the one with .staging.
It looks like this is a known issue: https://status.cloud.google.com/incident/support/21001
Here is the workaround provided at that link:
Please run the following commands in a PowerShell window:
$gcloudDir = Get-Command gcloud | Select -ExpandProperty "Source" | Split-Path | Split-Path
attrib -r "$gcloudDir\platform\kuberun_licenses*.*" /s
attrib -r "$gcloudDir\lib\kuberun*.*" /s
attrib -r "$gcloudDir..\google-cloud-sdk.staging\platform\kuberun_licenses*.*" /s
attrib -r "$gcloudDir..\google-cloud-sdk.staging\lib\kuberun*.*" /s
Remove-Item "$gcloudDir..\google-cloud-sdk.staging" -Recurse
If any of the commands fail, proceed with running the remaining
commands.
After running the PowerShell script, run the following in a regular
Command Prompt (not PowerShell):
gcloud components update --version 320.0.0
Please note, after applying this workaround, do not run 'gcloud
components update' as this will re-trigger the issue. Please wait
until the fix is released before updating components.
I find only with full reinstall solution:
exit idea
rename folder C:\Users\Step\AppData\Local\Google\ct4j-cloud-sdk -> _ct4j-cloud-sdk
run idea
start gradle -> downloadCloudSDK
delete folder _ct4j-cloud-sdk
profit
Here is what I did,
On Win10, I went to
C:\Users{your user name}\AppData\Local\Google
removed dir ct4j-cloud-sdk
And ran:
mvn appengine:deploy
This solved the issue for me
For Eclipse,
Exit the Eclipse.
Remove the ct4j-cloud-sdk folder from gCloud installed dir.
Open the Eclipse and Deploy.
In a windows file browser, watch file
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt
during the gcloud components update process. It will disappear then re-appear. When it does, right click on properties and uncheck Read Only then select Ok, then confirm the administrator pop-up. You must do this quickly or have some way of slowing the update script.
Nothing else worked. This does. Good luck.
New Date. New version. New Google Cloud trouble ... crap...
Your current Cloud SDK version is: 322.0.0
You will be upgraded to version: 323.0.0
| These components will be updated. |
+--------------------------+------------+----------+
| Name | Version | Size |
+--------------------------+------------+----------+
| Cloud SDK Core Libraries | 2021.01.08 | 16.1 MiB |
| Kuberun | 0.0.1 | 20.6 MiB |
| gcloud cli dependencies | 2021.01.08 | 10.7 MiB |
+--------------------------+------------+----------+
gcloud crashed (Error): [('C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'symbolic link privilege not held'), ('C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'C:\\Users\\USER_NAME\\AppData\\Local\\Google\\ct4j-cloud-sdk\\LATEST\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'symbolic link privilege not held')]
damn the updates, what to do with it, I lose one day a week with them ...

How to install camel-http feature on Karaf

I am using Fuse 7.7 on Apache Karaf.
I am getting this error
2020-09-28 18:08:57,689 | ERROR | lueprint Extender: 2 | o.a.a.b.c.BlueprintContainerImpl | 51 - org.apache.aries.blueprint.core - 1.10.2 |
Unable to start container for blueprint bundle com.esb.iis-to-rm-vr/1.0.0 due to unresolved dependencies [(&(component=http)(objectClass=org.apache.camel.spi.ComponentResolver))]
java.util.concurrent.TimeoutException: null
I did the below steps. camel-http is not installed.
karaf#root()> features:install camel-http
karaf#root()> features:list | grep camel-http
camel-http4
karaf#root()> list | grep camel-http
67 | Active | 50 | 2.21.0.fuse-770013-redhat-00001 | camel-http-common
255 | Active | 50 | 2.21.0.fuse-770013-redhat-00001 | camel-http4
Please let me know apart from the below step, what are the steps i need to follow to install camel-http.
karaf#root()> features:install camel-http
Be careful that camel-http is only meant to be a producer. You won't be able to do from("http://...") only with him. To be able to do it, you need to add a camel component that will allow your route to bind itself to the karaf's jetty. You can try to install camel-jetty.
Moreover, you're feature:list | grep camel-http seemed to have only returned camel-http4. I'm note sure camel-http feature has been dropped, but you could always install http4 component

GKE - Unable to make cuda work with pytorch

I have setup a kubernetes node with a nvidia tesla k80 and followed this tutorial to try to run a pytorch docker image with nvidia drivers and cuda drivers working.
My nvidia drivers and cuda drivers are all accessible inside my pod at /usr/local:
$> ls /usr/local
bin cuda cuda-10.0 etc games include lib man nvidia sbin share src
And my GPU is also recongnized by my image nvidia/cuda:10.0-runtime-ubuntu18.04:
$> /usr/local/nvidia/bin/nvidia-smi
Fri Nov 8 16:24:35 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.79 Driver Version: 410.79 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 Off | 00000000:00:04.0 Off | 0 |
| N/A 73C P8 35W / 149W | 0MiB / 11441MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
But after installing pytorch 1.3.0 i'm not able to make pytorch recognize my cuda installation even with LD_LIBRARY_PATH set to /usr/local/nvidia/lib64:/usr/local/cuda/lib64:
$> python3 -c "import torch; print(torch.cuda.is_available())"
False
$> python3
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print ('\t\ttorch.cuda.current_device() =', torch.cuda.current_device())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py", line 386, in current_device
_lazy_init()
File "/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py", line 192, in _lazy_init
_check_driver()
File "/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py", line 111, in _check_driver
of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
AssertionError:
The NVIDIA driver on your system is too old (found version 10000).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
The error above is strange because my cuda version for my image is 10.0 and Google GKE mentions that:
The latest supported CUDA version is 10.0
Also, it's GKE's daemonsets that automatically installs NVIDIA drivers
After adding GPU nodes to your cluster, you need to install NVIDIA's device drivers to the nodes.
Google provides a DaemonSet that automatically installs the drivers for you.
Refer to the section below for installation instructions for Container-Optimized OS (COS) and Ubuntu nodes.
To deploy the installation DaemonSet, run the following command:
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/container-engine-accelerators/master/nvidia-driver-installer/cos/daemonset-preloaded.yaml
I have tried everything i could think of, without success...
I have resolved my problem by downgrading my pytorch version by buildling my docker images from pytorch/pytorch:1.2-cuda10.0-cudnn7-devel.
I still don't really know why before it was not working as it should otherwise then by guessing that pytorch 1.3.0 is not compatible with cuda 10.0.

Jetty6 service and administrator rights

How do I determine if my Jetty6-service run with administrative rights?
I need to setup Jetty on my XP dev box to run as a service.
http://docs.codehaus.org/display/JETTY/Win32Wrapper
It installs OK and I can see the Jetty6 Service in windows services manager.
But when I try to start it I get this error in the log file:
STATUS | wrapper | 2010/02/26 10:17:10 | Launching a JVM...
INFO | jvm 2 | 2010/02/26 10:17:10 | Error occurred during initialization of VM
INFO | jvm 2 | 2010/02/26 10:17:10 | Too small initial heap for new size specified
ERROR | wrapper | 2010/02/26 10:17:10 | JVM exited while loading the application.
from above link:
Note: The above application (Jetty-Service.exe) must execute with administrator rights otherwise, it fails.
I do have local administrative access to my XP dev box.
And when I run the jetty server as standalone from cmd.exe then it works fine.
(java -jar start.jar etc/jetty.xml)
Does anyone know how to solve this problem / where to look?
/Thanks.