kanriapp / kanri

🪐 Modern offline Kanban board app for Windows, MacOS and Linux. Built with simplicity and user experience in mind.
https://kanriapp.com
GNU General Public License v3.0
762 stars 66 forks source link

Application became irresponsive #729

Open lordofscripts opened 1 week ago

lordofscripts commented 1 week ago

Describe the bug Had been working fine until today. The UI displays fine but after all is rendered, the app becomes irresponsive. No keyboard input, no response to mouse clicks.

To Reproduce

  1. Launch using terminal (to see errors)
  2. Select ANY kan and board and let it load
  3. Try to do anything on the selected board.
  4. See error

Expected behavior Work as usual.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information): N.A.

Additional context

Terminal window shows:

[ERROR] fa@tauri://localhost/_nuxt/....J's Vue error. Error: Failed to load image https://vuejs.org/error-reference/#runtime-m

At that moment clicking on the window close (X) is the only thing that works.

lordofscripts commented 6 days ago

I loaded a couple of the other boards and at least they were responsive to my actions Then I switched to the board where I experienced the issue, it worked at first but then it blocked the app in such a way that it is not even redrawing the main window. I managed to export the board in question, but as soon as I try to edit a card in THAT board, it refuses to open the card, any card.

trobonox commented 5 days ago

That is very strange, this seems like some badly formatted data. Unsure how this happened, keeping this issue open until someone finds some kind of reproduction.

trobonox commented 4 days ago

Just an idea: if you try to paste the JSON of the board in question into an online tool to check whether it's valid JSON, what does it say? Or is there some data which is obviously wrong or looks broken? (in this case it might be related to the background image considering the error message, maybe try resetting that if you have one set for the board)

lordofscripts commented 3 days ago

Just an idea: if you try to paste the JSON of the board in question into an online tool to check whether it's valid JSON, what does it say? Or is there some data which is obviously wrong or looks broken? (in this case it might be related to the background image considering the error message, maybe try resetting that if you have one set for the board)

I had set the background image from the start and it wasn't an issue. I use it on several boards.

As for the JSON, I just pasted it on jsonchecker.com and it found no issues with the exported JSON data.

lordofscripts commented 3 days ago

I performed the following experiment and I am sharing my observations.

Deleted the board, and used the Import Board function. It imported without issues.

Then opened again (as in every kill). I noticed the moved card was in it's new column, therefore it saved.

Opened it again (the app, then the offending board). To my surprise, despite the no response, the Tag I typed was indeed added. So, there seems to be some brain activity but no UI update.

Extra observations:

trobonox commented 3 days ago

Thanks for sharing your observations. This behaviour is very strange and I have no clue why this is happening.

The only thing I can assume is that something in that one board has some kind of data which is so broken that the entire UI becomes unresponsive. I wish I could do something but I'm unsure whether this is some edge case caused by some of the code I wrote or if this is related to something system-specific like the system webview having some kind of bug which causes the UI rendering to break.

Do you have any idea if there was a specific action you did in the board which could have caused these issues? It's basically impossible for me to do anything without a reliable reproduction since the logs are very cryptic.

Also a question: do you mind sending me the section with background settings of your board? You can take out the full file path if that information is too sensitive for you, but I would like to take a look at the general shape of the data to see if I notice anything unusual.

trobonox commented 3 days ago

I did a bit of digging around in the code and found that the "Failed to load image" error is coming from a function used to get the average color of the background image in order to set the color of the board title to be light or dark based on constrast with the background. In this case it might be that my implementation of this uses some browser features which have some kind of bug in your particular version of webkitgtk (system webview on Linux). In that case, it would be even harder to track this down.

If you have the possibility, can you try importing the board in question on another machine and see if the issue persists?

lordofscripts commented 2 days ago

If you have the possibility, can you try importing the board in question on another machine and see if the issue persists?

At first I thought it was only that board, but as I indicated yesterday evening, the same is happening on the other boards.

Unfortunately I only have a Raspberry Pi, my 2010 laptop is so old and crasht that it takes ages to boot, ages to log in, impossible to do anything productive on that Windows 10 laptop.

Importing the whole board doesn't give any error or even a warning as I mentioned.

I don't remember but maybe I may have a Unicode character somewhere. I had that problem with Novelist, it was getting crazy due to improper handling of Unicode characters.

I don't mind sending you the entire JSON of that board along with the background image.

lordofscripts commented 2 days ago

Also a question: do you mind sending me the section with background settings of your board?

"background": {
    "blur": "8px",
    "brightness": "18%",
    "src": "/home/lordofscripts/Pictures/Wallpapers/writing-fhd-01.jpg"
}

As I stated, the file exists and renders properly in the Kanban board's background.

lordofscripts commented 2 days ago

Further experimentation.

For example, you can click on # Edit Tags and the tags window is presented to you. Or click on any card to edit it and the edit window is shown.

The # Edit Tags usually allows multiple operations before hanging up.

The Edit Card action only displays the card for editing but that's it, it immediately hangs up.

trobonox commented 2 days ago

That is quite strange but in a sense also makes sense, because all boards are stored in just one file so just one bad character in one board can indeed break everything.

I think your suspicion with the unicode character might be correct, so feel free to check if there's any strange character (potentially even one which might not be displayed at all) hidden in one of your boards that could cause this issue.