theunraveler / taskwarrior-web

A web interface for the Taskwarrior todo application. Because being a neckbeard is only fun sometimes.
http://theunraveler.github.com/taskwarrior-web
MIT License
532 stars 60 forks source link

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

Open mgiugliano opened 3 years ago

mgiugliano commented 3 years ago

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 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 commented 2 years ago

i have this issue too

muraii commented 1 year ago

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)