GET /api/tasks error when running with docker container (amd64)
After docker-run-ing the container and pointing it to my .taskrc and .task file and directory respectively, and after navigating to localhost:8080, the tasks view is empty and I can see the folowing error when I open the developer tools:
GET http://localhost:8080/api/tasks [HTTP/1.1 400 Bad Request 0ms]
The full error in firefox is as follows:
uncaught (in promise) Error: Request failed with status code 400
NuxtJS 35
exports
exports
onreadystatechange
exports
exports
exports
promise callback*h.prototype.request
t
exports
<anonymous>
n
v
_invoke
$/</<
r
l
o
o
fetchTasks
O
dispatch
dispatch
setup
setup
data
kt
data
data
_data
jn
jn
_init
f
componentInstance
init
c713f9e.js:2:168229
NuxtJS 31
dispatch
(Async: promise callback)
dispatch
dispatch
dispatch
setup
setup
data
kt
data
data
_data
jn
jn
_init
f
componentInstance
init
n
v
v
Co
_update
r
get
En
mount
$mount
init
v
v
Co
Doing the same via curl, leads to:
$ curl http://localhost:8080/api/tasks
Task command error⏎
Locally I'm using taskwarrior 2.5.3 to manage my .task and .taskrc files
Hello, thanks for your feedback. It seems there's something wrong with the nginx config. I have fixed it in the latest commit. You can check if it works now.
Has a new docker image been generated for this change yet or do I have to generate it myself?
On Tue, 5 Oct 2021 at 16:10, DCsunset @.***> wrote:
Closed #17 https://github.com/DCsunset/taskwarrior-webui/issues/17.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DCsunset/taskwarrior-webui/issues/17#event-5411489150, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMMDD4DCKWGVBVVNLR5CXDUFMINBANCNFSM5E2HJKZQ .
-- Nikos Koukis @.***
It has been generated and you can try the latest version now.
Thanks for pushing the latest state to docker.io.
Unfortunately this still doesn't work for me.
I've verified that I've got the latest docker image ( running docker pull) and I end up in the same state (no tasks shown when connecting to the server). When running the dockerfile interactively (without detaching) I get the following:
> [email protected] start
> node ./dist/app.js
Server listening on http://0.0.0.0:3000
<-- GET /tasks
TASKRC override: /.taskrc
TASKDATA override: /.task
xxx GET /tasks 400 909ms -
I can repro the above running it in development mode.
However, creating a new taskrc and task directory under /test/ instead of copying my own task cofniguration seems to get past the 400 error code and actually shows me my tasks. So my issue is more about parsing my specific task configuration and tasks.
Any way to debug this and get more info about this error?
Hi, could you run the following command (replace the paths) and see if any error occurs?
TASKRC=<your_taskrc> TASKDATA=<your_taskdir> task rc.confirmation=no rc.recurrence.confirmation=no rc.dependency.confirmation=no rc.json.depends.array=yes rc.bulk=0 export
Sorry to say, I have the same error. Running the export (inside the container as well as on the host) passes well. Thanks for your work!
I found that in my case it was because of many tasks. My case can be resolved by https://github.com/DCsunset/taskwarrior-lib/pull/1
@volodymyrss Thanks for your feedback and fix.
I have updated taskwarrior-lib to the latest version and It should fix this issue.
I just want to comment that I am not completely sure that the problem of @bergercookie if is the same as mine. The error message is quite generic and could mean different things, as I realized after my investigation. But it would be great if it also helped @bergercookie !