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

"SyntaxError: Unexpected token k in JSON at position 97" on version 7.0.36 / 7.0.37 #843

Closed
luzfcb opened this issue May 11, 2018 · 8 comments

Comments

@luzfcb
Copy link

luzfcb commented May 11, 2018

This is a bug report.

What is the current behavior?

update heroku cli to any version between 7.0.36 and 7.0.37 (from apt-get or snap package)

try run heroku.

sudo DEBUG=* heroku update or sudo DEBUG=* heroku output:

fabio@luzfcb:~$ sudo DEBUG=* heroku update
  @oclif/config reading core plugin /usr/lib/heroku +0ms
  @oclif/config:heroku using manifest from /usr/lib/heroku/oclif.manifest.json +0ms
undefined:9
ku-config",
^

SyntaxError: Unexpected token k in JSON at position 97
    at JSON.parse (<anonymous>)
    at fs.readFile (/usr/lib/heroku/node_modules/@oclif/config/lib/util.js:37:30)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:422:3)

What is the expected behavior?

Run heroku cli normally, without any bugs

OS: KDE Neon User Edition LTS (based on Ubuntu 16.04 64bits)

@luzfcb luzfcb changed the title "SyntaxError: Unexpected token k in JSON at position 97" on version 7.0.37 "SyntaxError: Unexpected token k in JSON at position 97" on version 7.0.36 / 7.0.37 May 11, 2018
@jdx
Copy link
Contributor

jdx commented May 11, 2018

what it is in that file on your machine? I have {"version":"7.0.37","commands":{}} from apt-get.

@luzfcb
Copy link
Author

luzfcb commented May 11, 2018

@jdxcode my /usr/lib/heroku/oclif.manifest.json contains the same content

@luzfcb
Copy link
Author

luzfcb commented May 11, 2018

fabio@luzfcb:~$ sha1sum /usr/lib/heroku/oclif.manifest.json 
17f2c1c0777c87b6667b996ceab1890402b3e03c  /usr/lib/heroku/oclif.manifest.json

@luzfcb
Copy link
Author

luzfcb commented May 11, 2018

is there any way to downgrade the debian or snap package? to me test all previous versions until I find one that works, and find out which version the bug was introduced.

@jdx
Copy link
Contributor

jdx commented May 11, 2018

try deleting ~/.local/share/heroku

@jdx
Copy link
Contributor

jdx commented May 11, 2018

you could try to downgrade, but this bug was almost certainly introduced in v7 which was a massive change so I don't think it would tell us anything

@luzfcb
Copy link
Author

luzfcb commented May 11, 2018

@jdxcode done. delete ~/.local/share/heroku/ fix the error.

I probably should have backed up the folder, to try to identify what the cause of the error was.

I remember that the only plugin I had installed was heroku-config, which was installed as follows

heroku plugins:install heroku-config 

I installed it again, and the error did not occur.

Thanks a lot for the help.

@jdx
Copy link
Contributor

jdx commented May 11, 2018

it seems if the ~/.local/share/heroku/package.json (where I store the plugin manifest) has a syntax error the CLI does not start. Strangely, this is wrapped in a try/catch that should just warn. I'll have to find out why it's erroring.

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