Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't click the button #4

Closed
Tobe2d opened this issue Jun 2, 2023 · 13 comments
Closed

Can't click the button #4

Tobe2d opened this issue Jun 2, 2023 · 13 comments

Comments

@Tobe2d
Copy link

Tobe2d commented Jun 2, 2023

Thank you so much for making this extention.

I have installed it and it show the new button "Enqueue" however I cant click the button ;-(
I went to settings and removed Hide the checkpoint dropdown and still the same.
Tested "Between Prompt and Generate button" and still I can't click the button "Enqueue"

When I click it literally nothing happens.

In the log it does not show any error.

What it could be?

@artventuredev
Copy link
Contributor

@Tobe2d The Enqueue should change the text to Queued in about 1 second when clicked then back to Enqueue again.

Can you open the browser developer console (F12 or right click some where on the UI and select Inspect), capture the Console tab to see if there are any error message there.

You can also try to upgrade the A1111 to the latest commit and try again.

@Tobe2d
Copy link
Author

Tobe2d commented Jun 3, 2023

Thanks for the reply @artventurdev

The output of theF12 Console:

error
VM352:3 Uncaught (in promise) ReferenceError: submit_enqueue is not defined
    at Object.eval [as frontend_fn] (eval at <anonymous> (Blocks.svelte:67:25), <anonymous>:3:14)
    at je (Blocks.svelte:277:6)
eval @ VM352:3
je @ Blocks.svelte:277
Promise.then (async)
je @ Blocks.svelte:282
await in je (async)
(anonymous) @ Blocks.svelte:373
(anonymous) @ index.mjs:1170
Fr @ index.mjs:1170
f @ Button.svelte:12
(anonymous) @ index.mjs:1170
Fr @ index.mjs:1170
v @ Button.svelte:11
Show 4 more frames

The above is when I click on "Enqueue"

In regards to the upgrade I am on the latest update:

version: v1.3.1  
python: 3.10.11
torch: 2.0.1+cu118
xformers: 0.0.17
gradio: 3.31.0

@Ezekiel-Rage
Copy link

Ezekiel-Rage commented Jun 3, 2023

I'm having the same problem. The error I'm getting is identical to the one above though there is an earlier error that is generated when the page loads that reads:
[[Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.](extension.mjs:1)](http://localhost:7880/file=extensions-builtin/sd-webui-agent-scheduler/javascript/extension.mjs?1685812961.9794707)

Running sd.next (vladmandic/automatic)
Version: 549c02a8 Sat Jun 3 10:36:53 2023 -0400
Python 3.10.6 on Windows
Torch 2.0.1+cu118
Gradio 3.32.0

@artventuredev
Copy link
Contributor

artventuredev commented Jun 4, 2023

@Tobe2d @Ezekiel-Rage Have you observed similar errors with any other JS scripts, or only with sd-webui-agent-scheduler/javascript/extension.mjs?

Can you switch to the Network tab, looking for request for this file, click on it to view the detail and capture the Preview tab?

Screenshot 2023-06-04 at 08 43 06 Screenshot 2023-06-04 at 08 45 16

@Ezekiel-Rage
Copy link

I've had problems with other JS scripts in the past however those issues were the result of a gradio change. The change required certain configurations to explicitly grant permission for gradio to access paths outside its own working folder. The end result was several JS scripts being blocked as 403 forbidden. That issue have since been resolved. Unfortunately this one is entirely unique to sd-webui-agent-scheduler.

Here's a screenshot of the network > preview tab. I've also saved the information in the attached txt file if you need more info than the screenshot can provide.

Network_2

Agent_Scheduler_Network_Preview.txt

@artventuredev
Copy link
Contributor

The js content look correct. I'll take a deeper look on how how these js files are handled by gradio.

@Tobe2d
Copy link
Author

Tobe2d commented Jun 4, 2023

@artventurdev
In regards to your question I am not sure if I had errors with any other JS scripts.

here is the screenshot:
image

And the preview tab:
Preview.txt

@artventuredev
Copy link
Contributor

@Tobe2d @Ezekiel-Rage, it seems that there may be an issue with Python returning the wrong mimetype for the .mjs file.

If possible, please add the following debugging code to webui.py so it runs using the same Python version:

from mimetypes import guess_type

print("mjs mimetypes", guess_type('/extension.mjs', True))

Restart the webui and check the logs for the output, which should look like this:

mjs mimetypes ('application/javascript', None)

If instead the output is text/plain, you can try the following steps:

  • Reinstall Python
  • Remove the venv folder and let the webui reinitialize.

@Ezekiel-Rage
Copy link

The output was:
mjs mimetypes ('text/plain', None)

I'll try your suggestions later tonight when I have some free time.

@Ezekiel-Rage
Copy link

I tried removing the venv folder and letting it reinitialize but no luck. After some investigation I found the cause of my issue to be a registry error. Computer\HKEY_CLASSES_ROOT\.mjs had the Content Type set to text/plain. I reset it to application/javascript and rebooted and everything is working now.

@artventuredev
Copy link
Contributor

artventuredev commented Jun 5, 2023

@Ezekiel-Rage, good catch!

@Tobe2d, can you try the registry fix mentioned above? It should also resolve your issue. Possible steps:

  • Open the Registry Editor
  • Navigate to HKEY_CLASSES_ROOT\.mjs
  • Double-click on the Content Type value
  • Change the value to application/javascript
  • Click OK

@Tobe2d
Copy link
Author

Tobe2d commented Jun 5, 2023

Thanks @artventurdev editing the registry works for me ;-)

@shlomitgueta
Copy link

@artventurdev works for me too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants