zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
500 stars 43 forks source link

[Bug]: Host waiting for check to complete in Firefox #228

Closed pure-fire closed 11 months ago

pure-fire commented 1 year ago

What happened?

I have been using openoutpaint regularly for months now including up to the previous night without issue. Today after loading A1111 webui the host sits there with message "waiting for check to complete" and does not proceed to online or offline.

The only thing that has changed is my Firefox browser which updated today to version 112.0, which may be the issue. Not sure.

I can load A1111 into MS Edge and it works as normal, displaying online

Steps to reproduce the problem

  1. Launch A1111 webui in Firefox 112.0 with default host and go to openoutpaint tab
  2. Host does not display online or offline. Only displays "waiting for check to complete", even after 30 minutes.
  3. Open a new private window in Firefox 112.0, which does not contain any extensions. Same result "waiting for check to complete"
  4. Relaunch A1111 webui multiple times. Same result
  5. Open A1111 in MS Edge and the host is online and Openoutpaint functions as normal (So this is likely something changed in the FF 112.0 update)

What should have happened?

The host should connect and display online, enabling outpainting to work in Firefox 112.0

Commit where the problem happens

5e84d6d5 (Mon Apr 10 23:01:41 2023)

What platforms do you use to access openOutpaint?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Browser Extensions/Addons

uBlock Origin (turned off for A1111)

AUTOMATIC1111 webUI Commandline Arguments

--api --opt-sdp-attention --opt-channelslast

Additional information

I have deleted the Openoutpaint extensions folder and installed it again, and the same issue persists. A1111 webui is up to date with (commit: 22bcc7be) and has not required an update for 2 weeks. As mentioned Openoutpaint was working as normal the previous night before Firefox updated. No windows updates were installed between last night and today.

While MS Edge works I much prefer to use Firefox. Appreciate your assistance.

zero01101 commented 1 year ago

well huh, that's certainly obnoxious... assuming this is regarding the webUI extension, as a quick workaround it seems like clicking the refresh button at the top-center of the canvas will kick it back into gear, but we'll otherwise have to take a look into what can be done here...

pure-fire commented 1 year ago

Yep the refresh button did the trick. Ive never used that button before.

Nice one! Thank you.

MrNonAir commented 1 year ago

the host goes offline during sessions too. The refresh button works fine, the system goes online again, but already done work is gone forever. EDIT: Unless you are not like silly me and save/export the workspace BEFORE hitting the refresh button, you are completely save... endEdit I´m on a WIN11, FireFox 112.01 system, too. The situation started a couple days ago, like pure-fire mentioned, but i cant tell if there was any update or something. I was not paying attention to this WebUI_-Outpaint_off

illusive-c commented 1 year ago

Can confirm the same, also on Firefox and Win11. I restart everything, go to the openOutpaint tab, the HOST has a grey "Waiting" text. image

After restarting the extension via the blue button, it either turns into a yellow CORS message or a green Online message. When I get the CORS message, I click on it and it goes away and turns green. (I have the --cors-allow-origins=http://127.0.0.1:3456 --API flags)

If this was only happening when I launch the Auto1111 or even when I load the UI, it wouldn't bother me much but If I go back to T2I or I2I tabs, the extension often goes to grey mode and won't work anymore.

zero01101 commented 1 year ago

ಠ_ಠ well ain't this a kick in the head

not sure if i should move the issue to the extension repo as this doesn't affect standalone openOutpaint which i'll unfortunately have to recommend for firefox users for the time being, meaning you'd lose the convenience of "send to" buttons :(

so confirming firefox being a giant pain suddenly, appears to be related to the fact that openOutpaint uses canvas in an iframe that isn't instantly visible, and it's apparently an issue (see 941146 and 733698) that had a workaround implemented long ago from a truly ancient gist, but seems that's no longer going to cut it, and let's just ignore the fact that i have no idea how that gist actually works lol

to boot, i would've suggested to simply click the save workspace button
image which would allow returning to the work-in-progress after refreshing as a workaround, but that's also failing in firefox but that seems to possibly be related to noscript which every possible instance of firefox i have available has very much installed and configured so i haven't ruled that one out yet with my minimal checking into this :(

[edit]
i'm provably an idiot and forgot about the export (and import) function which i can heartily recommend
image simply export your current workspace state and reimport it later to pick up where you left off, history and all, confirmed still working in firefox through the extension so hey it's_something.meme

terribly sorry for the inconvenience all

as mentioned, you can still use openOutpaint standalone; it's definitely not as instantly convenient as the extension but it at least... works right?

lil bad pokerface

illusive-c commented 1 year ago

Yeah, Firefox has a lot of compatibility issues but I'm refusing to switch to Chromium for no other reason than Firefox is the only competitor to them at this point. Rather not have monopolies.

In any case, I've been using A1111 in Edge for now just to get the outpain to work, which I'm OK with. Thanks for the Amazing work mate. It's definitely the best extension I've used!

reijerh commented 1 year ago

Here are two exceptions from the FF debug console if you're interested:

Uncaught 
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/generic.js?v=3e678e0", lineNumber: 45, columnNumber: 0, data: null, stack: "_reticle_draw@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/generic.js?v=3e678e0:45:27
dreamTool/init/state.mousemovecb@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/dream.js?v=97e4806:1659:37
dreamTool/init/state.redraw@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/dream.js?v=97e4806:1680:12
dreamTool/<@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/dream.js?v=97e4806:1466:10
enable@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/lib/toolbar.js?v=4fcf718:121:11
@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/initalize/toolbar.populate.js?v=c1ca438:33:18
" }
generic.js:45

Uncaught (in promise) 
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/generic.js?v=3e678e0", lineNumber: 45, columnNumber: 0, data: null, stack: "_reticle_draw@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/generic.js?v=3e678e0:45:27
dreamTool/init/state.mousemovecb@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/dream.js?v=97e4806:1659:37
dreamTool/init/state.redraw@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/ui/tool/dream.js?v=97e4806:1680:12
set connection@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/global.js?v=ac30d16:19:30
testHostConnection/setConnectionStatus/<@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/index.js?v=e10fcb1:333:5
setConnectionStatus@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/index.js?v=e10fcb1:334:6
testHostConnection@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/index.js?v=e10fcb1:337:21
startup@http://127.0.0.1:7860/file=extensions/openOutpaint-webUI-extension/app/js/index.js?v=e10fcb1:155:2
" }
generic.js:45

Which refers to this piece I guess:

        // Draw Tool Name
        if (bb.h > 40) {
            const xshrink = Math.min(
                1,
----->          (bbvp.w - 20) / uiCtx.measureText(tool).width
            );

            uiCtx.font = `bold ${20 * xshrink}px Open Sans`;

            uiCtx.textAlign = "left";
            uiCtx.fillStyle = style.toolTextStyle;
            uiCtx.fillText(tool, bbvp.x + 10, bbvp.y + 10 + 20 * xshrink, bb.w);
        }
zero01101 commented 1 year ago

appreciated; yeah, the NS_ERROR_FAILURE seems to be stemming back from attempting to set font info on undisplayed canvases again ಠ_ಠ sorry there hasn't been any motion on fixing it, but i'm sort of a moron

joshyy1312 commented 1 year ago

This is still my most used extension :)

Any idea on when the above would be fixed? As we now know what's causing the problem.

It's quite annoying to have the extension lose connection every now and then, having to reset the interface, reimport the image, etc.

Thanks!

ghostsquad commented 1 year ago

I can confirm this issue and workaround: on firefox it doesn't "connect" until you click the refresh button. Works fine on chrome.

LanceGao97 commented 1 year ago

ALL you guys are wasting your time talking trash let me save you . just Press this little tiny motherfucker, and all your offline problems solved!! 火狐截图_2023-05-25T04-37-37 138Z

LanceGao97 commented 1 year ago

just click that motherfuc**er refresh blue icon, the Host 127 0 0 7890 will be online.

zero01101 commented 1 year ago

terribly sorry for the extended delay; this project isn't abandoned but i've had to step away from it due to Reasons for a while, and i admit additional responses may (aka will probably) be delayed but hopefully not nearly as long

@joshyy1312 thanks for the kind words :) unfortunately no ETA however and firefox semi-incompatibility is still confirmed, all my feeble attempts at getting the workaround ... working around the error again are proving fruitless, but yeah, as mentioned by @ghostsquad and @LanceGao97 the refresh button should kick it back into working state, and also chrome/chromium-based browsers should still work as expected...

zero01101 commented 11 months ago

firefox v115 magically fixed everything it seems from everything i can tell lol