prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.17k stars 459 forks source link

Unable to load schema - self signed certificate in certificate chain. #3001

Closed SirRanger closed 1 year ago

SirRanger commented 1 year ago

Summary

Unable to load schema in prettier config because of self signed certificate in certificate chain. In my company we use a zscaler proxy, so I'm unsing custom certificates. It looks like prettier is bypassing the proxy configuration.

Github Repository to Reproduce Issue

Can't share a repo because of company privacy.

Steps To Reproduce:

Step by step:

  1. Set Windos environment variables
  1. install Company certificate to Windows Trusted certificate
  2. install VS Code
  3. install node js
  4. Install prettier using npm i prettier
  5. Install VS Code Extension Prettier.
  6. install ESLint usingnpm install --save-dev eslint eslint-plugin-vue
  7. Install ES Lint VS Code Extension
  8. Confg .prettierrs.json: { "$schema": "https://json.schemastore.org/prettierrc", "semi": false, "tabWidth": 2, "singleQuote": true, "printWidth": 100, "trailingComma": "all" }
  9. Getting the error: Unable to load schema from 'https://json.schemastore.org/prettierrc': self signed certificate in certificate chain.

Expected result

The schema from "https://json.schemastore.org/prettierrc" should be imported, with no issue because all settings are set correctly.

Actual result

No import of the scheme with error: Unable to load schema from 'https://json.schemastore.org/prettierrc': self signed certificate in certificate chain.

Additional information

VS Code Version:

Version: 1.78.0 (system setup) Commit: 252e5463d60e63238250799aef7375787f68b4ee Date: 2023-05-03T20:09:00.748Z Electron: 22.4.8 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No

Prettier Extension Version:

Windows Prettier - Code formatter v9.12.0

Prettier Log Output

["INFO" - 11:21:02 AM] Extension Name: esbenp.prettier-vscode. ["INFO" - 11:21:02 AM] Extension Version: 9.12.0. ["DEBUG" - 11:21:02 AM] Enabling Prettier globally { "languageSelector": [ { "language": "javascript" }, { "language": "mongo" }, { "language": "javascriptreact" }, { "language": "typescript" }, { "language": "typescriptreact" }, { "language": "json" }, { "language": "jsonc" }, { "language": "json5" }, { "language": "css" }, { "language": "postcss" }, { "language": "less" }, { "language": "scss" }, { "language": "handlebars" }, { "language": "graphql" }, { "language": "markdown" }, { "language": "mdx" }, { "language": "html" }, { "language": "vue" }, { "language": "yaml" }, { "language": "ansible" }, { "language": "home-assistant" }, { "language": "jsonc", "scheme": "vscode-userdata" } ], "rangeLanguageSelector": [ { "language": "javascript" }, { "language": "javascriptreact" }, { "language": "typescript" }, { "language": "typescriptreact" }, { "language": "json" }, { "language": "jsonc" }, { "language": "graphql" } ] } ["DEBUG" - 11:21:07 AM] Using bundled version of prettier. ["DEBUG" - 11:21:07 AM] Enabling Prettier for Workspace c:\Program Files\code\app-dcsn { "languageSelector": [ { "pattern": "c:\\Program Files\\code\\app-dcsn/**/*.{js,_js,bones,cjs,es,es6,frag,gs,jake,javascript,jsb,jscad,jsfl,jslib,jsm,jspre,jss,mjs,njs,pac,sjs,ssjs,xsjs,xsjslib,wxs,js.flow,jsx,ts,cts,mts,tsx,importmap,json,4DForm,4DProject,avsc,geojson,gltf,har,ice,JSON-tmLanguage,mcmeta,tfstate,tfstate.backup,topojson,webapp,webmanifest,yy,yyp,jsonc,code-snippets,sublime-build,sublime-commands,sublime-completions,sublime-keymap,sublime-macro,sublime-menu,sublime-mousemap,sublime-project,sublime-settings,sublime-theme,sublime-workspace,sublime_metrics,sublime_session,json5,css,wxss,pcss,postcss,less,scss,handlebars,hbs,graphql,gql,graphqls,md,livemd,markdown,mdown,mdwn,mkd,mkdn,mkdown,ronn,scd,workbook,mdx,component.html,html,hta,htm,html.hl,inc,xht,xhtml,mjml,vue,yml,mir,reek,rviz,sublime-syntax,syntax,yaml,yaml-tmlanguage,yaml.sed,yml.mysql}", "scheme": "file" }, { "language": "javascript" }, { "language": "mongo" }, { "language": "javascriptreact" }, { "language": "typescript" }, { "language": "typescriptreact" }, { "language": "json" }, { "language": "jsonc" }, { "language": "json5" }, { "language": "css" }, { "language": "postcss" }, { "language": "less" }, { "language": "scss" }, { "language": "handlebars" }, { "language": "graphql" }, { "language": "markdown" }, { "language": "mdx" }, { "language": "html" }, { "language": "vue" }, { "language": "yaml" }, { "language": "ansible" }, { "language": "home-assistant" }, { "language": "jsonc", "scheme": "vscode-userdata" } ], "rangeLanguageSelector": [ { "language": "javascript" }, { "language": "javascriptreact" }, { "language": "typescript" }, { "language": "typescriptreact" }, { "language": "json" }, { "language": "jsonc" }, { "language": "graphql" } ] }

image

SirRanger commented 1 year ago

After reinstalling everything that has to do with formatting and prettier the issue disappeared.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.