Never connects to server when launching Krita via certain kra files
If I launch Krita from the Start menu, the krita-ai-diffusion plugin connects to my ComfyUI server flawlessly every time. However, if I run Krita by double-clicking certain kra files, I just get the "Connecting to server..." message and it never connects.
- Launching with certain kra files, the problem always happens.
- Launching with other kra files, the problem never happens.
- If I launch Krita from the Start menu, then open a kra file, I can open any kra file with no problem. The problem only occurs if Krita is not running when I double-click one of the problem kra files.
When it fails to connect, the last message in client.log is:
2025-07-06 20:32:13,885 INFO Connecting to http://rscullard7:7821
There's no further detail.
I can always work around this by running Krita first, but I thought you might want to take a look at this in case it's something that could be fixed.
Could you share one of the files where this happens? I tried a few and wasn't able to reproduce.
It might be some timing issue though and related to how fast they open on a system...
I'd rather not post my kra files here - is there a way I can send them to you directly?
You can send it to [email protected]
I emailed the file to you on Jul 14 - did you get it OK?
I got it, thanks. Unfortunately it doesn't show the problem for me either.
I suspect it has something to do with how Krita reports multiple "new canvas" events sometimes when opening files which required some workaround to avoid the plugin running things twice. But it's pretty mysterious and difficult to debug without seeing it firsthand
I'm sorry to hear that! I know how frustrating that can be. Like I said, I can work around it by always starting Krita before I open a file, but a fix would be great.
I find that the majority of my kra files reliably cause the problem on my system. I'm sure you have many kra files yourself - do you never see the problem on your system when you launch Krita by double-clicking a file?
No I tried a bunch. But I always run krita from command line out of habit, so it's unlikely I'd have seen it by chance.
Does switching to a different canvas and back "fix" it?
No. I just tried the following test:
- double-click a "problem" file to open Krita
- confirm that the "Connecting to server..." message is not going away
- in the same Krita instance, create a new image
- still see the "Connecting to server..." message
- switch back and forth between the open images
- still see the "Connecting to server..." message
- close both open images, then create another new image
- still see the "Connecting to server..." message
Once it gets in that "stuck" state, I couldn't find anything that gets it unstuck except closing and reopening Krita.