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

扩展无法正常使用 #705

Closed
cosct opened this issue Oct 25, 2020 · 14 comments
Closed

扩展无法正常使用 #705

cosct opened this issue Oct 25, 2020 · 14 comments

Comments

@cosct
Copy link

cosct commented Oct 25, 2020

  • REST Client Version:0.24.3
  • VSCode Version:1.50.1
  • OS Version:win10

Steps to Reproduce:

使用命令"Rest Client: Generate Code Snippet"

报错:命令"Rest Client: Generate Code Snippet"导致错误 (validation failed)

另外请求也无法正常响应

@Huachao
Copy link
Owner

Huachao commented Oct 26, 2020

@cosct could you please try to reinstall my extension, and did it work previously

@cosct
Copy link
Author

cosct commented Oct 26, 2020

尝试过重装多次,依然无法解决问题

@Huachao
Copy link
Owner

Huachao commented Oct 26, 2020

@cosct You can check the output of REST channel of VS Code, and please paste the request if available

@cosct
Copy link
Author

cosct commented Oct 26, 2020

无任何输出
curl 'https://rm.api.weibo.com/2/remind/push_count.json?with_push_settings=1&trim_null=1&with_dm_group=0&with_settings=1&exclude_attitude=1&with_common_cmt=1&with_comment_attitude=1&with_common_attitude=1&with_moments=1&with_dm_unread=1&msgbox=true&with_page_group=1&with_chat_group=1&with_chat_group_notice=1&_pid=1&count=0&source=351354573&status_type=0&callback=STK_16037209872575' \ -H 'Connection: keep-alive' \ -H 'Pragma: no-cache' \ -H 'Cache-Control: no-cache' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edg/86.0.622.51' \ -H 'DNT: 1' \ -H 'Accept: */*' \ -H 'Sec-Fetch-Site: same-site' \ -H 'Sec-Fetch-Mode: no-cors' \ -H 'Sec-Fetch-Dest: script' \ -H 'Referer: https://s.weibo.com/' \ -H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \ --compressed
请求随便复制的,实际上任何请求信息都无法获得响应

@Huachao
Copy link
Owner

Huachao commented Oct 26, 2020

@cosct does it work previously, can you find the spin icon in the status bar? Please also check the console output when you type F1 > Developer: Toggle Developer Tools in VS Code?
以前能运行吗?发送请求时看到状态栏上的转圈图标了吗?同时用F1 > Developer: Toggle Developer Tools检查下控制台输出

@cosct
Copy link
Author

cosct commented Oct 26, 2020

之前有用过是没问题的,另外我表述得可能有点问题,不是请求没有响应而是响应永远如下:
`HTTP/1.1 404 Not Found
Date: Mon, 26 Oct 2020 14:39:45 GMT
Connection: close
Content-Type: text/html
Content-Length: 48

404 Not Found

`

控制台有一些信息:
workbench.desktop.main.js:sourcemap:5479 Overwriting grammar scope name to file mapping for scope source.java. Old grammar file: file:///c%3A/develop/Microsoft%20VS%20Code/resources/app/extensions/java/syntaxes/java.tmLanguage.json. New grammar file: file:///c%3A/Users/wjk/.vscode/extensions/redhat.java-0.69.0/syntaxes/java.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:5479 workbench.desktop.main.js:sourcemap:5479 Overwriting grammar scope name to file mapping for scope source.yaml. Old grammar file: file:///c%3A/develop/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json. New grammar file: file:///c%3A/Users/wjk/.vscode/extensions/redhat.vscode-yaml-0.11.1/syntaxes/yaml.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:5479 workbench.desktop.main.js:sourcemap:287 [Extension Host] [vscode-icons] v11.0.0 activated! DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/semver-umd.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-unicode11.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/xterm-addon-search.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/windowsTerminal.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/terminal.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/eventEmitter2.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/windowsPtyAgent.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/utils.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/tas-client-umd.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/index.js.map: DevTools failed to load SourceMap: Could not load content for file:///C:/develop/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/main.js.map: workbench.desktop.main.js:sourcemap:287 [Extension Host] (node:2584) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. t.log @ workbench.desktop.main.js:sourcemap:287 $logExtensionHostMessage @ workbench.desktop.main.js:sourcemap:4592 _doInvokeHandler @ workbench.desktop.main.js:sourcemap:4599 _invokeHandler @ workbench.desktop.main.js:sourcemap:4598 _receiveRequest @ workbench.desktop.main.js:sourcemap:4597 _receiveOneMessage @ workbench.desktop.main.js:sourcemap:4596 (anonymous) @ workbench.desktop.main.js:sourcemap:4594 fire @ workbench.desktop.main.js:sourcemap:98 fire @ workbench.desktop.main.js:sourcemap:454 _receiveMessage @ workbench.desktop.main.js:sourcemap:459 (anonymous) @ workbench.desktop.main.js:sourcemap:456 fire @ workbench.desktop.main.js:sourcemap:98 acceptChunk @ workbench.desktop.main.js:sourcemap:452 (anonymous) @ workbench.desktop.main.js:sourcemap:451 t @ workbench.desktop.main.js:sourcemap:461 emit @ events.js:223 addChunk @ _stream_readable.js:309 readableAddChunk @ _stream_readable.js:290 Readable.push @ _stream_readable.js:224 onStreamRead @ internal/stream_base_commons.js:181 workbench.desktop.main.js:sourcemap:3081 getaddrinfo ENOTFOUND essed onDidChangeNotification @ workbench.desktop.main.js:sourcemap:3081 (anonymous) @ workbench.desktop.main.js:sourcemap:3081 fire @ workbench.desktop.main.js:sourcemap:98 addNotification @ workbench.desktop.main.js:sourcemap:3154 notify @ workbench.desktop.main.js:sourcemap:4915 (anonymous) @ workbench.desktop.main.js:sourcemap:4550 _showMessage @ workbench.desktop.main.js:sourcemap:4550 $showMessage @ workbench.desktop.main.js:sourcemap:4550 _doInvokeHandler @ workbench.desktop.main.js:sourcemap:4599 _invokeHandler @ workbench.desktop.main.js:sourcemap:4598 _receiveRequest @ workbench.desktop.main.js:sourcemap:4597 _receiveOneMessage @ workbench.desktop.main.js:sourcemap:4596 (anonymous) @ workbench.desktop.main.js:sourcemap:4594 fire @ workbench.desktop.main.js:sourcemap:98 fire @ workbench.desktop.main.js:sourcemap:454 _receiveMessage @ workbench.desktop.main.js:sourcemap:459 (anonymous) @ workbench.desktop.main.js:sourcemap:456 fire @ workbench.desktop.main.js:sourcemap:98 acceptChunk @ workbench.desktop.main.js:sourcemap:452 (anonymous) @ workbench.desktop.main.js:sourcemap:451 t @ workbench.desktop.main.js:sourcemap:461 emit @ events.js:223 addChunk @ _stream_readable.js:309 readableAddChunk @ _stream_readable.js:290 Readable.push @ _stream_readable.js:224 onStreamRead @ internal/stream_base_commons.js:181 workbench.desktop.main.js:sourcemap:3081 命令"Rest Client: Generate Code Snippet"导致错误 (validation failed)

@Huachao
Copy link
Owner

Huachao commented Oct 26, 2020

@cosct did you set the VS Code proxy?
在VS Code里面你配置代理了吗

@cosct
Copy link
Author

cosct commented Oct 26, 2020

没有配置代理

@Huachao
Copy link
Owner

Huachao commented Oct 26, 2020

@cosct could you work with other URLs like baidu.com since I found an error in your console getaddrinfo ENOTFOUND?

@cosct
Copy link
Author

cosct commented Oct 28, 2020

别的请求貌似没有这个报错
另外,我发现这好像是0.24.3这个版本的问题,我切换到其他版本就可以正常使用了

@Huachao
Copy link
Owner

Huachao commented Oct 29, 2020

@cosct nice catch, this is related to the upgrade of yargs-parser, which incorrectly parses the request URL with single quote, current workaround for you is removing the single quote around the URL or just replacing the ' to "

@Huachao Huachao closed this as completed Oct 29, 2020
@cosct
Copy link
Author

cosct commented Oct 29, 2020

感谢作者的辛勤工作和解决方案,经尝试删除URL的单引号就能正常工作了,但把单引号替换成双引号依然无法正常使用

@Huachao
Copy link
Owner

Huachao commented Oct 29, 2020

@cosct I already reverted the original commit, in the next release, you can use both single and double quotes

@Huachao
Copy link
Owner

Huachao commented Nov 9, 2020

@cosct I have published a new version 0.24.4. and you can have a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants