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

JSON::ParserError at /tasks/pending ---- A JSON text must at least contain two octets! #153

Open
mgiugliano opened this issue Nov 5, 2021 · 2 comments

Comments

@mgiugliano
Copy link

The (local) web server starts with no errors from launching task-web from the prompt. However, the web page served at 0.0.0.0 contains detailed error messages:

file: common.rb location: initialize line: 155```

OS: macOS 11.6 BigSur
ruby: 3.0.2p107
Task Warrior: 2.6.1

/Users//.gem/ruby/2.6.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/services/parser/json.rb in parse
json == '[No matches.]' ? [] : ::JSON.parse(json)
/Users/
/.gem/ruby/2.6.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/services/parser.rb in parse
TaskwarriorWeb::Config.version > '1.9.2' ? Json.parse(results) : Csv.parse(results)
/Users//.gem/ruby/2.6.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/model/task.rb in query
Parser.parse(command.run).each { |result| tasks << Task.new(result) }
/Users/
/.gem/ruby/2.6.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/model/task.rb in method_missing
self.query(match.attribute.to_s => arguments.first.to_s)
/Users/*********/.gem/ruby/2.6.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/app.rb in block in class:App
TaskwarriorWeb::Task.find_by_status(params[:status])
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/httpserver.rb in service
si.service(req, res)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/httpserver.rb in run
server.service(req, res)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/server.rb in block in start_thread
block ? block.call(sock) : run(sock)

@illettante
Copy link

i have this issue too

@muraii
Copy link

muraii commented Nov 17, 2023

Just installed using rbenv 1.2.0 and an older ruby, version 2.5.9, because 3.2.2 wasn't working initially. I might check into that.

I get roughly the same output as OP, in that I have an entry like this:

/home/<username>/.rbenv/versions/2.5.9/lib/ruby/gems/2.5.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web/services/parser/json.rb in parse
6. json == '[No matches.]' ? [] : ::JSON.parse(json)

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