go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
758 stars 55 forks source link

Frontend hangs when opening a task (process crash/eternal loop) #233

Closed simeoncode closed 2 months ago

simeoncode commented 3 months ago

Description

Hello, I managed to import some Trello tasks but the browser freezes when visiting a task. In the attached screenshots, I cannot interact with the browser tab (also visible is the "Stop" button which means that the browser is suggesting to stop the faulty tab JS process).

This doesn't happen when clicking on manually created tasks. The crash happens also when visiting regardless of browsing to the task URL directly (/task/) or going to the project and clicking on the task.

I'm attaching screenshots and a Firefox Profiler profile result.

This is the JSON returned from the backend, for this particular task:

{
  "id": 37,
  "title": "Order phone and port number",
  "description": "",
  "done": false,
  "done_at": "0001-01-01T00:00:00Z",
  "due_date": "0001-01-01T00:00:00Z",
  "reminders": null,
  "project_id": 4,
  "repeat_after": 0,
  "repeat_mode": 0,
  "priority": 0,
  "start_date": "0001-01-01T00:00:00Z",
  "end_date": "0001-01-01T00:00:00Z",
  "assignees": null,
  "labels": null,
  "hex_color": "",
  "percent_done": 0,
  "identifier": "#3",
  "index": 3,
  "related_tasks": {},
  "attachments": null,
  "cover_image_attachment_id": 0,
  "is_favorite": false,
  "created": "2024-03-11T10:55:02Z",
  "updated": "2024-03-11T10:55:02Z",
  "bucket_id": 12,
  "position": 196608,
  "kanban_position": 196607,
  "created_by": {
    "id": 1,
    "name": "",
    "username": "<redacted>",
    "created": "2024-03-11T10:24:27Z",
    "updated": "2024-03-11T11:37:43Z"
  }
}

Vikunja Version

v0.23.0+230-3b77fff4c9

Browser and version

Firefox + Chrome (both latest)

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

Clicking on the task, from project view

bild

Visiting the task URL directly

bild

Profiler result

Firefox 2024-03-12 14.37 profile.json.gz

kolaente commented 3 months ago

If you open the dev tools, are there any errors logged in the console when you open the task?

devikrishnamk0123 commented 3 months ago

we have also faced the same issue. The following are the steps used to reproduce the issue

image

simeoncode commented 3 months ago

If you open the dev tools, are there any errors logged in the console when you open the task?

bild
kolaente commented 3 months ago

I think I've commented this elsewhere already, but can you reproduce this with all tasks or only a specific task? Which attributes does the task have? Are you able to reproduce this on try?

devikrishnamk0123 commented 3 months ago

If you open the dev tools, are there any errors logged in the console when you open the task?

bild

No errors are shown in the console image

devikrishnamk0123 commented 3 months ago

I think I've commented this elsewhere already, but can you reproduce this with all tasks or only a specific task? Which attributes does the task have? Are you able to reproduce this on try?

There is no option to import from trello in try.

kolaente commented 3 months ago

Are you able to reproduce this when the project has a background vs when it does not have one?

Might be related to https://kolaente.dev/vikunja/vikunja/issues/2246

kolaente commented 2 months ago

This might be fixed in c1d06c5e5a4d7172cfe693a33ca36f8c2a32a5cd. Please check again with the latest unstable build or on try.

I think the problem you're describing only happened when opening a task which belongs to a shared child project where the current user does not have access to the parent project (if that's the case, the project the task belongs to will not show up in the sidebar menu). It then couldn't load the project for display in the task detail page. This specific bug is now fixed, so please check if it works with the latest unstable build.

kolaente commented 2 months ago

I've pushed a potential fix for this in https://github.com/go-vikunja/vikunja/commit/0bc9a670d729f75fd653984aafdf0a37c67a2d8d. Can you check with the latest unstable build if the problem still exists?

simeoncode commented 2 months ago

I've pulled ~:latest~:unstable and according to some clicking around, the issue is now resolved 👍

kolaente commented 2 months ago

latest is the last release, which does not have the fix (nor the bug). You'll want to check with unstable. Check out the docs for more info about the versions.

simeoncode commented 2 months ago

It was a typo. I meant :unstable, of course.