kanri icon indicating copy to clipboard operation
kanri copied to clipboard

Application became irresponsive

Open lordofscripts opened this issue 1 year ago • 33 comments

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):

  • OS: Linux Debían (Raspbian)

  • Version 0.8

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 avatar Nov 18 '24 23:11 lordofscripts

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.

lordofscripts avatar Nov 19 '24 17:11 lordofscripts

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 avatar Nov 20 '24 19:11 trobonox

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)

trobonox avatar Nov 21 '24 21:11 trobonox

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 avatar Nov 22 '24 22:11 lordofscripts

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

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

  • Opened the offending board
  • Moved 1 card to another column. It did it but after that the app became unresponsive. I had to kill it.

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

  • Opened a card for edit. It opened the card in edit mode BUT right afterward it became unresponsive.
  • Clicked on Add Tag and typed the text but it didn't seem to do anything with what I typed. Had to kill it.

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.

  • Removed the background from the offending board.
  • Tried to do some operations like editing a card but the application again became unresponsive. There was no background image.

Extra observations:

  • The first console message when the app starts is always "Could not determine accessibility bus address"
  • The same thing is happening on the other boards.
  • The console message "Failed to load image" needs further examination. Why? Because it outputs whenever the board has a background image BUT despite that, the background image is properly displayed in the board. So, it doesn't appear to be a load failure but something else.
  • The problem persists With or without a background image.
  • It always blocks (unresponsiveness) as soon as the Edit Card window is rendered. Sometimes right away, other times after the first board operation. For example on board load I tried to add a new card and it blocked right away.

lordofscripts avatar Nov 22 '24 23:11 lordofscripts

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 avatar Nov 22 '24 23:11 trobonox

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?

trobonox avatar Nov 22 '24 23:11 trobonox

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 avatar Nov 23 '24 14:11 lordofscripts

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 avatar Nov 23 '24 15:11 lordofscripts

Further experimentation.

  • I confirm that all the boards exhibit the anomaly, not just the one I considered "offending"
  • After loading & rendering a board you can successfully do ONE operation, just one. After that you can move the mouse around but the app will not respond to clicks, mouse focus, etc.

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.

lordofscripts avatar Nov 23 '24 16:11 lordofscripts

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.

trobonox avatar Nov 23 '24 16:11 trobonox

I have not been able to investigate this further. The app isn't working so I had to move on to some other tasks. Pity because the app was really getting me organized.

lordofscripts avatar Nov 27 '24 21:11 lordofscripts

No worries, it's a very strange issue and we're still very much in the dark at the moment. A last thing you could try is to export your boards individually, delete all data and then do a board-by-board import and check if a specific board breaks the responsiveness. Otherwise, it's a pity indeed and I will let you know if by any chance I find out what's causing the issue. If you do manage to pin down the problem to one board feel free to send it to [email protected] if you feel comfortable sharing it with me.

trobonox avatar Nov 27 '24 21:11 trobonox

Problem still persists (trying new things as we "speak").

One common issue at all times was this message on stderr every time I launched kanri:

Could not determine accessibility bus address

I looked it up on the internet and people claimed this command below resolved THAT issue:

sudo apt-get install at-spi2-core

I tried it and that message is gone. Now, I have no idea what this app or its dependencies has to do with a (hardware) SPI bus, but that message is gone...

lordofscripts avatar Dec 05 '24 16:12 lordofscripts

Now, it would be nice if Kanri had a way to open up the gates of logging, it would shed some light into what it is actually doing. Else we are working blindfolded.

First

I eliminated ALL boards but a simple one. I removed the background image (that other error about couldn't load image went away). I hope you fix that.

Then I opened that single board that had no background image and just 5 cards in 3 columns. I tried several browsing operations (View Tags, Vie Card) and everything seems fine. But the moment I try "+ Add Card" kanri hangs up like a mute. It simply stops responding. There is not a single error or warning message on the terminal console where I launched it, zippo, nothing... It doesn't respond, it doesn't draw anymore and the only thing to do is kill the application.

To me this seems like something in your app is hanging in such a way that not even the windowing events get processed. As I said, some logging would help, else this is like working blindly.

Second

I removed ALL Boards and relaunched kanri. I imported that simple board and the import operation worked.

Again, I removed ALL boards and relaunched. This time I tried creating the "lonely" board. The problem is... At that point it hangs, it doesn't even show the board creation dialog.

Third

  • Decided to remove the single board
  • Uninstalled kanri 0.8.0
  • Reinstalled it from the local DEB package
  • Launched kanri
  • Clicked on the "+" button to create the first board

And it hangs.

I am not sure this Tauri framework is stable, or perhaps it is not as multi-platform as it claims to be.

lordofscripts avatar Dec 05 '24 17:12 lordofscripts

Any news on this? I couldn't find any Unicode strange characters so it must be something else that makes the application to stop responding. I have had to stop using kanri altogether.

lordofscripts avatar Dec 16 '24 23:12 lordofscripts

No updates here, I'm sorry. The app is currently undergoing a migration to Tauri v2 which also bumps the version of the webview. As soon as that is done I can provide you with a preview release so you can see if that fixes anything for you.

trobonox avatar Dec 18 '24 08:12 trobonox

The application doesn't like adding anything.

  • If I try to add a card it hangs
  • If I delete all boards and try to create a new board, it hangs

So far my trials and tribulations with Kanri seem to indicate something goes really wrong -but silently- after using the "(+)" buttons (card or board).

Furthermore, I tested other inputs and noticed this:

  • Tried to add a card,that column's + button became disabled and the app appears unresponsive. But...
  • Tried to add a card _on another column_, and that + button appeared active/clickable. But, after clicking it, that column's card add button too became disabled but no New Card dialog appeared.

I don't know the internals but as I said, the app is mostly unresponsive but a few links appear active until you click on them but nothing happens.

You could look at the commonality of high/low level actions on Add operations. I would advise adding logging as well.

lordofscripts avatar Dec 27 '24 16:12 lordofscripts

I migrated my boards to Trello because I am in serious need of a Kanban.

When you get the new version running I would be glad to test it.

I love the app and it's offline concept as well as its simple UI but I need it to work on my system. I am pretty sure the culprit is the WebView and especially the actions that take place after the Add Card button is clicked.

lordofscripts avatar Jan 08 '25 16:01 lordofscripts

So, did this become stale?I loved the application but this issue made it unusable in my case 😞 I was forced to switch to Trello.

Hopefully the issue will be resolved so that I can migrate back to Kanri.

That's why until this date I have avoided developing anything that uses electron-like frameworks or JavaScript because it relies on a bunch of other stuff.

I'm looking forward to seeing a new release past v0.80.

lordofscripts avatar Feb 20 '25 23:02 lordofscripts

Apologies for the lack of updates on this matter. The Tauri v2 migration has progressed a lot lately, thanks to another contributor. We are nearing the final touches, at this point it basically only requires some testing and fixing the automated builds using GitHub Actions in order to be in a usable state. At the moment I'm very busy with exams, but hopefully in ~1-2 weeks I can resume work on Kanri and hopefully provide you with a test build so you can see if the upgrades solve your issue (if I forget please remind me).

trobonox avatar Feb 21 '25 09:02 trobonox

kanri_0.8.0_arm64.deb.zip Created a build based on the WIP Tauri v2 migration. Could you please try if this works?

trobonox avatar Feb 28 '25 09:02 trobonox

Any updates? Have you tried using the build I provided?

trobonox avatar Mar 21 '25 10:03 trobonox

Just checked. I noticed this build is Arm64 but my platform is a 32-bit ARM (kanri_0.8.0_armhf.deb) so I can't try that one.

lordofscripts avatar Mar 31 '25 18:03 lordofscripts

That's my bad. I'll make a new build and send it over in a few minutes.

trobonox avatar Mar 31 '25 18:03 trobonox

Seems like the armv7 builds just broke on me, it might take a bit longer until I have a working build.

trobonox avatar Mar 31 '25 18:03 trobonox

kanri_0.8.0_armhf.deb.zip Can you try this? It should hopefully work now.

trobonox avatar Mar 31 '25 21:03 trobonox

kanri_0.8.0_armhf.deb.zip Can you try this? It should hopefully work now.

Sure, thanks!I already downloaded it. I am updating and upgrading my system to try it out.Eagerly awaiting to see it working again on my system.

I will let you know ASAP.

lordofscripts avatar Apr 01 '25 16:04 lordofscripts

kanri_0.8.0_armhf.deb.zip Can you try this? It should hopefully work now.

Gray News...

The following packages have unmet dependencies:
  Kanri: Depends: libwebkit2gtk-4.1-0 but it is not installable
E: unable to correct problems, you have held broken packages. 

My updated system has libweb2gtk-4.0-37

I just read that 4.0 uses soup2 whereas 4.1 uses ``` soup3

lordofscripts avatar Apr 01 '25 17:04 lordofscripts

Do you think there is any way you can install the libwebkit2gtk-4.1 package? I know that Debian has it available in the bookworm and sid (unstable) repositories, maybe you can add one of those to your package manager and get it that way. Since the Tauri v2 upgrade, webkitgtk 4.1 is required and there is no way to get around this dependency requirement.

trobonox avatar Apr 01 '25 19:04 trobonox