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

Cannot show output when the answer is wrong #414

Closed
SuperCoolSEBoy opened this issue Sep 13, 2019 · 6 comments · Fixed by leetcode-tools/leetcode-cli#22 or #416
Closed

Cannot show output when the answer is wrong #414

SuperCoolSEBoy opened this issue Sep 13, 2019 · 6 comments · Fixed by leetcode-tools/leetcode-cli#22 or #416
Labels
bug Something isn't working
Milestone

Comments

@SuperCoolSEBoy
Copy link

🐛 Bug Report

Cannot submit

To Reproduce

Sign in and then submit a solution

Expected behavior

was working yesterday. But hit this exception tonight.

Extension Output

  • Sending code to judge
  • Waiting for judge result
  • Waiting for judge result
  • Waiting for judge result
  • Waiting for judge result
  • Waiting for judge result
    c:\Users\haoxu.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:267
    x.stdout = util.inspect((result.code_output || []).join('\n'));
    ^

TypeError: (result.code_output || []).join is not a function
at formatResult (c:\Users\xxx.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:267:56)
at Request._callback (c:\Users\xxx.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:232:16)
at Request.self.callback (c:\Users\xxx.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\request\request.js:185:22)
at Request.emit (events.js:189:13)
at Request. (c:\Users\xxx.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\request\request.js:1161:10)
at Request.emit (events.js:189:13)
at IncomingMessage. (c:\Users\xxx.vscode\extensions\shengchen.vscode-leetcode-0.15.3\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)

Your Environment

  • os: Win10
  • extension settings: default settings
  • nodejs version: v10.15.3
  • vscode version: 1.38.1
  • extension version:0.15.3
@jdneo
Copy link
Member

jdneo commented Sep 13, 2019

What if you remove the folder $HOME/.vscode/extensions/shengchen.vscode-leetcode-*/ and reinstall the extension?

@jdneo jdneo added the need more info Further information is requested label Sep 13, 2019
@zhiqiyu
Copy link

zhiqiyu commented Sep 13, 2019

Encountered the same problem. Reinstall does not solve the problem.

@jdneo
Copy link
Member

jdneo commented Sep 14, 2019

Could you provide the following information to help me diagnostic:

  • endpoint you are using
  • problem number
  • language you are using
  • submit or test
  • the extension settings (those which are not default values)

@zhiqiyu
Copy link

zhiqiyu commented Sep 14, 2019

Sure.

  • Endpoint: LeetCode
  • problem #: 142
  • Language: Java
  • submit or test: submit
  • extension settings:
    • default language: java
    • shortcuts: submit, test, description, solution
    • workspace folder: /myfolder

@SuperCoolSEBoy
Copy link
Author

Actually..... it no longer repros tonight...the issue is gone...
feel free to close this ticket....and I'll try your solution in case it happens again.

Thanks

@no-response no-response bot removed the need more info Further information is requested label Sep 14, 2019
@jdneo
Copy link
Member

jdneo commented Sep 14, 2019

I can repro it now. It happens when the answer is wrong. Will fix it in the cli side.

@jdneo jdneo reopened this Sep 14, 2019
@jdneo jdneo changed the title TypeError: (result.code_output || []).join is not a function Cannot show output when the answer is wrong Sep 14, 2019
@jdneo jdneo added this to the 0.15.4 milestone Sep 14, 2019
@jdneo jdneo added the bug Something isn't working label Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants