Skip to content
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

deno vscode installation and downloads behind a coporate proxy #26935

Open
kraabrsg opened this issue Nov 19, 2024 · 4 comments
Open

deno vscode installation and downloads behind a coporate proxy #26935

kraabrsg opened this issue Nov 19, 2024 · 4 comments
Labels
needs investigation requires further investigation before determining if it is an issue or not

Comments

@kraabrsg
Copy link

Version: Deno x2.0.5

Hi,

sorry if i missed an issue....
We have a node project where we build several js files to run on a RHEL Linux.

The idea is to use deno to build native executeable files via crosscompile.

Now it seems as if deno could not do anything which needs to fetch files e.g. deno install and deno info wants do download
from registry.npmjs.org but stucks without doing anything.

I had a phone call with colleague responsible for proxy configuration and told me for which certificate i need to use on my pc to bypass issues like "local certificate errors" .

so i added the .crt file with a deno setting deno.tlsCertificate in the project and also for node via cafile=xxx in npm settings file.

Denos output:

tarting Deno language server...
  version: 2.0.5 (release, x86_64-pc-windows-msvc)
  executable: C:\mypath\deno\deno.EXE
Connected to "Visual Studio Code" 1.94.2
Enabling import suggestions for: https://deno.land
  Error fetching registry config for "https://deno.land": EOF while parsing a value at line 1 column 0
Refreshing configuration tree...
  Resolved Deno configuration file: "file:///C:/mypath1/deno.json"
  Resolved package.json: "file:///C:/mypath1/package.json"
  Resolved .npmrc: "C:\Users\myuser\.npmrc"
Could not set npm package requirements: Error getting response at http://registry.npmjs.org/axios for package "axios": An npm specifier not found in cache: "axios", --cached-only is specified.
Could not set npm package requirements: Error getting response at http://registry.npmjs.org/axios for package "axios": An npm specifier not found in cache: "axios", --cached-only is specified.
Server ready.
.....
Download http://registry.npmjs.org/pg-promise
successfully cancelled request with ID: 652
Download http://registry.npmjs.org/@types%2fnode
Download http://registry.npmjs.org/@types%2fpg
Download http://registry.npmjs.org/@types%2fpg-promise
Download http://registry.npmjs.org/@typescript-eslint%2feslint-plugin
Download http://registry.npmjs.org/@typescript-eslint%2fparser
Download http://registry.npmjs.org/axios
Download http://registry.npmjs.org/ebcdic-ascii
Download http://registry.npmjs.org/basic-ftp
Download http://registry.npmjs.org/esbuild
Download http://registry.npmjs.org/fast-xml-parser
Download http://registry.npmjs.org/esbuild-node-externals
Download http://registry.npmjs.org/ftp-ts
Download http://registry.npmjs.org/memorystream
Download http://registry.npmjs.org/node-sql-parser
Download http://registry.npmjs.org/pg
Download http://registry.npmjs.org/ts-node
Download http://registry.npmjs.org/pg-promise
...
Could not set npm package requirements: Error getting response at http://registry.npmjs.org/@types%2fnode for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
Could not set npm package requirements: Error getting response at http://registry.npmjs.org/@types%2fnode for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
Error caching: Error getting response at http://registry.npmjs.org/@types%2fnode for package "@types/node": error sending request for url (https://registry.npmjs.org/@types%2Fnode): client error (Connect): tcp connect error: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (os error 10060): Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (os error 10060)


Terminal output stuck:

Download ⣟ [10:36] 0/18
 - http://registry.npmjs.org/@types%2fnode
 - http://registry.npmjs.org/@types%2fpg
 - http://registry.npmjs.org/@types%2fpg-promise
 - http://registry.npmjs.org/@typescript-eslint%2feslint-plugin

package.json

	"devDependencies": {
		"@types/node": "^20.11.20",
		"@types/pg": "^8.11.10",
		"@types/pg-promise": "^5.4.3",
               ...
      },
	"dependencies": {
               ...
		"pg": "^8.13.1",
		"pg-promise": "^11.10.1"
	}

So i am not sure if there is a problem with proxy(is there a checklist or something like that somewhere) , or a misconfiguration in the package.json ?

Thanks!

@kraabrsg
Copy link
Author

kraabrsg commented Nov 20, 2024

So after further research the os error 10060 is because it is blocked by the coporate firewall ( a proxy is not used here).

After talking to firewall colleaugue he informed me that there is an ip addy that is blocked because of malware infections (not sure if its from jsr.io or dl.deno.land or deno.land)
https://www.virustotal.com/gui/ip-address/34.149.100.209

Which is really bad because i doubt that they will open this...

1.) The stuck download is because the coporare proxy gets a 301, is there a way to avoid that ?
2.) is there a way to say deno to use our corporate proxy, because it seems that some of theses requests are not going via our proxy, but direct instead

In Settings.json:

    "http.proxy": "http://myproxy:8080",
    "deno.certificateStores": ["system"],

Even when starting a deno project from scratch, using deno init add depencies in deno.json and do deno install with only depencies from denos std it does not work...

Thanks!

@bartlomieju bartlomieju added the needs investigation requires further investigation before determining if it is an issue or not label Nov 22, 2024
@bartlomieju
Copy link
Member

@nayeemrmn PTAL, I think we might not be respecting some settings here?

@nayeemrmn
Copy link
Collaborator

@kraabrsg Use "deno.env": { "HTTP_PROXY": "http://myproxy:8080" } instead for now. I don't remember what the situation was for http.proxy, if and why we don't support it..

@kraabrsg
Copy link
Author

Hi @bartlomieju , @nayeemrmn thanks for getting back on this, but this does not seem to make a difference.

image

I tried deno install

image

Deno Version: 2.1.0

One big Problem (even if this solution would work) is the ip above which is on a black list
https://www.virustotal.com/gui/ip-address/34.149.100.209

I have to ask again with our firewall colleaugue to look if something has changed, but seems not...
Any further ideas to track this down ?

Btw. deno looks really awesome, it would be a pitty if we could not use this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation requires further investigation before determining if it is an issue or not
Projects
None yet
Development

No branches or pull requests

3 participants