Skip to content

[ERROR] TypeError: The header content contains invalid characters [0] #234

Description

@yuhuanq

Anyone getting the above error after any command? show, submit etc

Problem Summary

After logging in successfuly with cookie.chrome any command results in the error [ERROR] TypeError: The header content contains invalid characters [0]. Commands show, submit etc all result in this.

How to reproduce

  1. leetcode show command leetcode show 443 -gxe -l java -vv
  2. expected output is fetching the problem and opening a vim buffer
  3. if possible, run command with "-vv" will give more outputs of the HTTP data, do REMEMBER to delete your cookies before paste here!!

-vv output

  λ  ~ leetcode show 443 -gxe -l java -vv
zsh: correct 'java' to '.java' [nyae]? n
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] found plugin: company=2017.12.18
[TRACE] found plugin: cookie.chrome=2018.11.18
[TRACE] found plugin: cookie.firefox=2018.11.19
[TRACE] found plugin: cpp.lint=2017.07.27
[TRACE] found plugin: cpp.run=2017.07.29
[TRACE] found plugin: github=2018.11.18
[TRACE] found plugin: leetcode.cn=2018.11.25
[TRACE] found plugin: leetcode=default
[TRACE] found plugin: lintcode=2018.11.18
[TRACE] found plugin: retry=default
[TRACE] found plugin: solution.discuss=2019.02.03
[TRACE] inited plugin: leetcode
[TRACE] inited plugin: cookie.firefox
[TRACE] inited plugin: cookie.chrome
[TRACE] skipped plugin: lintcode
[TRACE] skipped plugin: leetcode.cn
[TRACE] inited plugin: retry
[TRACE] inited plugin: cache
[TRACE] inited plugin: github
[TRACE] inited plugin: cpp.run
[TRACE] inited plugin: cpp.lint
[TRACE] inited plugin: company
[TRACE] inited plugin: solution.discuss
[DEBUG] running leetcode.getProblems
⠋ Downloading problems[DEBUG] running leetcode.getCategoryProblems: algorithms
[TRACE] REQUEST %s { url: 'https://leetcode.com/api/problems/algorithms/',
  headers: 
   { Cookie: <hidden>�H���)�`�E9x�\u001c��B\u00146gC6=\n��\u001e,\u001c�(j�.�h���I\u0006�Ը�<�f���\f�(\u0010\u0007zX��s0r��\u0007uMa\u0002���_��MwCiI\b\u0001��,6qe}xK8Zk�-p>m�\u0007GK�\u001d��$�[�S�F�eO���\u0004�.|��?\u0013JP�\nØWT6��\u0007�J�\u0006\u0007�N�]���6\u001c�@��(�K�9\b�A\u0019�{B�\u0011�wt+ŅG�H+fc(�>Q�3,\n\u0013�?�8�←�Y�\u0006i���>t���~O1yÕ���:�-����E�ݵ\u0013ɉ&bzxUj�P~\n\r�]EQ;R�}�"n�\u00144S�}/�A$�\b\u001eo0\u0017�A\r��\u0007\u001e{\n�=L�wn����%;csrftoken=�;',
     'X-CSRFToken': <hidden>,
     'X-Requested-With': 'XMLHttpRequest' },
  callback: [Function] }
[DEBUG] running leetcode.getCategoryProblems: database
[TRACE] REQUEST %s { url: 'https://leetcode.com/api/problems/database/',
  headers: 
   { Cookie: <hidden>�H���)�`�E9x�\u001c��B\u00146gC6=\n��\u001e,\u001c�(j�.�h���I\u0006�Ը�<�f���\f�(\u0010\u0007zX��s0r��\u0007uMa\u0002���_��MwCiI\b\u0001��,6qe}xK8Zk�-p>m�\u0007GK�\u001d��$�[�S�F�eO���\u0004�.|��?\u0013JP�\nØWT6��\u0007�J�\u0006\u0007�N�]���6\u001c�@��(�K�9\b�A\u0019�{B�\u0011�wt+ŅG�H+fc(�>Q�3,\n\u0013�?�8�←�Y�\u0006i���>t���~O1yÕ���:�-����E�ݵ\u0013ɉ&bzxUj�P~\n\r�]EQ;R�}�"n�\u00144S�}/�A$�\b\u001eo0\u0017�A\r��\u0007\u001e{\n�=L�wn����%;csrftoken=�;',
     'X-CSRFToken': <hidden>,
     'X-Requested-With': 'XMLHttpRequest' },
  callback: [Function] }
[DEBUG] running leetcode.getCategoryProblems: shell
[TRACE] REQUEST %s { url: 'https://leetcode.com/api/problems/shell/',
  headers: 
   { Cookie: <hidden>�H���)�`�E9x�\u001c��B\u00146gC6=\n��\u001e,\u001c�(j�.�h���I\u0006�Ը�<�f���\f�(\u0010\u0007zX��s0r��\u0007uMa\u0002���_��MwCiI\b\u0001��,6qe}xK8Zk�-p>m�\u0007GK�\u001d��$�[�S�F�eO���\u0004�.|��?\u0013JP�\nØWT6��\u0007�J�\u0006\u0007�N�]���6\u001c�@��(�K�9\b�A\u0019�{B�\u0011�wt+ŅG�H+fc(�>Q�3,\n\u0013�?�8�←�Y�\u0006i���>t���~O1yÕ���:�-����E�ݵ\u0013ɉ&bzxUj�P~\n\r�]EQ;R�}�"n�\u00144S�}/�A$�\b\u001eo0\u0017�A\r��\u0007\u001e{\n�=L�wn����%;csrftoken=�;',
     'X-CSRFToken': <hidden>,
     'X-Requested-With': 'XMLHttpRequest' },
  callback: [Function] }
[TRACE] REQUEST %s make request https://leetcode.com/api/problems/algorithms/
[DEBUG] algorithms: failed to getProblems: undefined
[TRACE] REQUEST %s make request https://leetcode.com/api/problems/database/
[DEBUG] database: failed to getProblems: undefined
[TRACE] REQUEST %s make request https://leetcode.com/api/problems/shell/
[DEBUG] shell: failed to getProblems: undefined
[ERROR] TypeError: The header content contains invalid characters

Environment

  • leetcode-cli version: 2.6
  • OS version: Fedora
  • Node version:
  • Npm version: 6.4.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions