Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Got 500 error when submitting #134

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

Closed
jdneo opened this issue Nov 27, 2018 · 4 comments
Closed

Got 500 error when submitting #134

jdneo opened this issue Nov 27, 2018 · 4 comments
Labels

Comments

@jdneo
Copy link
Contributor

jdneo commented Nov 27, 2018

leetcode-cli version: 2.6.0

Run leetcode submit *** get:

- Sending code to judge
[ERROR] http error [code=500]

trace:

[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] found plugin: leetcode.cn=2018.11.25
[TRACE] found plugin: leetcode=default
[TRACE] found plugin: retry=default
[TRACE] inited plugin: leetcode
[TRACE] skipped plugin: leetcode.cn
[TRACE] inited plugin: retry
[TRACE] inited plugin: cache
[DEBUG] cache hit: problems.json
[DEBUG] cache hit: 1.two-sum.algorithms.json
[DEBUG] running leetcode.submitProblem
- Sending code to judge
[TRACE] REQUEST %s { url: 'https://leetcode.com/problems/two-sum/submit/',
  headers:
   { Cookie: <hidden>,
     'X-CSRFToken': <hidden>,
     'X-Requested-With': 'XMLHttpRequest',
     Origin: 'https://leetcode.com',
     Referer: 'https://leetcode.com/problems/two-sum/description/' },
  body:
   { judge_type: 'large',
     lang: 'java\r',
     question_id: 1,
     test_mode: false,
     typed_code: '/*\r\n * @lc app=leetcode id=1 lang=java\r\n *\r\n * [1] Two S                                                                                                                                                                                                    um\r\n *\r\n * https://leetcode.com/problems/two-sum/description/\r\n *\r\n * al                                                                                                                                                                                                    gorithms\r\n * Easy (39.28%)\r\n * Total Accepted:    1.2M\r\n * Total Submissio                                                                                                                                                                                                    ns: 3.1M\r\n * Testcase Example:  \'[2,7,11,15]\\n9\'\r\n *\r\n * Given an array                                                                                                                                                                                                     of integers, return indices of the two numbers such that they\r\n * add up to a                                                                                                                                                                                                     specific target.\r\n * \r\n * You may assume that each input would have exactly                                                                                                                                                                                                     one solution, and you may\r\n * not use the same element twice.\r\n * \r\n * Ex                                                                                                                                                                                                    ample:\r\n * \r\n * \r\n * Given nums = [2, 7, 11, 15], target = 9,\r\n * \r\n *                                                                                                                                                                                                     Because nums[0] + nums[1] = 2 + 7 = 9,\r\n * return [0, 1].\r\n * \r\n * \r\n *                                                                                                                                                                                                     \r\n * \r\n */\r\nclass Solution {\r\n    public int[] twoSum(int[] nums, int t                                                                                                                                                                                                    arget) {\r\n        return null;\r\n    }\r\n}\r\n' },
  method: 'POST',
  json: true,
  _delay: 1,
  callback: [Function] }
[TRACE] REQUEST %s make request https://leetcode.com/problems/two-sum/submit/
[TRACE] REQUEST %s onRequestResponse https://leetcode.com/problems/two-sum/submit/ 500 { date: 'Tue, 27 Nov 2018 08:04:44 GMT',
  'content-type': 'text/html; charset=utf-8',
  'transfer-encoding': 'chunked',
  connection: 'close',
  'set-cookie':
   <hidden>,
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'x-content-type-options': 'nosniff',
  'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  server: 'cloudflare',
  'cf-ray': '480315db5fc9c383-SIN' }
[TRACE] REQUEST %s reading response's body
[TRACE] REQUEST %s finish init function https://leetcode.com/problems/two-sum/submit/
[TRACE] REQUEST %s response end https://leetcode.com/problems/two-sum/submit/ 500 { date: 'Tue, 27 Nov 2018 08:04:44 GMT',
  'content-type': 'text/html; charset=utf-8',
  'transfer-encoding': 'chunked',
  connection: 'close',
  'set-cookie':
   <hidden>,
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'x-content-type-options': 'nosniff',
  'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  server: 'cloudflare',
  'cf-ray': '480315db5fc9c383-SIN' }
[TRACE] REQUEST %s end event https://leetcode.com/problems/two-sum/submit/
[TRACE] REQUEST %s has body https://leetcode.com/problems/two-sum/submit/ 3605
[TRACE] REQUEST %s invalid JSON received https://leetcode.com/problems/two-sum/submit/
[TRACE] REQUEST %s emitting complete https://leetcode.com/problems/two-sum/submit/
[DEBUG] http error: 500
[ERROR] http error [code=500]
@jdneo jdneo changed the title Got error when submitting Got 500 error when submitting Nov 27, 2018
@jdneo
Copy link
Contributor Author

jdneo commented Nov 29, 2018

I'm encountering this issue on Windows. Mac is fine.

skygragon added a commit that referenced this issue Nov 30, 2018
Signed-off-by: Eric Wang <skygragon@gmail.com>
@skygragon skygragon added the bug label Nov 30, 2018
@skygragon
Copy link
Owner

@jdneo please let me know if the fix above works.

@jdneo
Copy link
Contributor Author

jdneo commented Dec 3, 2018

@skygragon Thanks for the fix. It works well. 👍

When will the new version get released?

@skygragon
Copy link
Owner

2.6.1 released, enjoy~

@jdneo jdneo closed this as completed Dec 4, 2018
jminz pushed a commit to jminz/leetcode-cli that referenced this issue Dec 6, 2018
* move plugins' specific data into separate dirs.

* now leetcode/lintcode have different cache

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Bump to 2.5.3

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes skygragon#130: create home dir if necessary

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [refactor] extract into file utils

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Embed meta in comment instead of filename.

refs skygragon#55 skygragon#65

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Update dev dependecies.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Update dependencies.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Bump to 2.5.4

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes skygragon#112: use "--" as comment in sql file

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [refactor] simplify template format.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* refs skygragon#121: support customized filename.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [refactor] use file utils.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes typo in filename.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] add pkg config.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [plugin] enable/disable wont touch plugins js.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes plugin init order issue.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [plugin] always enable builtin plugin by default.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] add script for linux/macos

* refs skygragon#133

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes format in `list`

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes UT issues on windows.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [travis] enable more platforms

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] refactor script for linux

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] add script for windows

Signed-off-by: Eric Wang <skygragon@gmail.com>

* exit with error code if necessary

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] bail out if error occurs

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pkg] build from travis

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Bump to 2.6.0

Signed-off-by: Eric Wang <skygragon@gmail.com>

* [pages] update docs.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* expose more code to plugins.

* leetcode.cn/lintcode could reuse this.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* remove sprintf-js

Signed-off-by: Eric Wang <skygragon@gmail.com>

* fixes UT bug.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* refs skygragon#134: remove whitespace on windows.

Signed-off-by: Eric Wang <skygragon@gmail.com>

* Bump to 2.6.1

Signed-off-by: Eric Wang <skygragon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants