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

Error appears in terminal #2

Closed
gerard-mailtrack opened this issue Oct 29, 2015 · 6 comments
Closed

Error appears in terminal #2

gerard-mailtrack opened this issue Oct 29, 2015 · 6 comments

Comments

@gerard-mailtrack
Copy link

I'm seeing this error in the terminal, whenever I run any command.

err: json: cannot unmarshal string into Go value of type scoring.Entries
@gsamokovarov
Copy link
Owner

What OS are you running jump on?

You may try to remove the internal JSON database. You can do that with rm ~/.jump/scores.json.

@gerard-mailtrack
Copy link
Author

Platform is Linux.

Removing the json did the trick. Thanks!

@gsamokovarov
Copy link
Owner

Please, ping me if it happens again. I'm curious what might have corrupted it.

Thanks for trying out jump!

@bwagner
Copy link

bwagner commented Feb 9, 2016

I was seeing a similar error when running this script a few times in a row: https://media.pragprog.com/titles/bhtmux/code/scripting/reattach/development

That script does a few asynchronous cd commands. I suspect that jump is not protecting itself against multiple instances writing the json files.

I suggest jump to:

  1. test its json-files before using them (and suggesting to delete them when corrupt)
  2. allow the user to delete them with a command line option
  3. itself to be thread safe

@gsamokovarov
Copy link
Owner

I'll try to prevent multiple instances fighting for the scores update.

@gsamokovarov
Copy link
Owner

Try out 0.7.0. I have put an advisory lock around the internal files write. Hopefully, this prevents issues like this one in the future.

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

3 participants