Skip to content

[bug] "no wasm module provided" when following documentation #264

Description

@internetfreak

bug description:
I'm using Cap standalone server and want to serve necessary assets from there. I set up everything, then followed the documentation to set CAP_CUSTOM_WASM_URL to the value provided in the docs. However, when loading the protected page, I always get a "no wasm module provided, falling back to JS solver" warning and the captcha is painfully slow to verify (as expected). It looks like the documentation is wrong there, because when I change the asset from "cap_wasm.js" to "cap_wasm_bg.wasm", the error disappears. I also wonder which use the .js file has, maybe fallback for when wasm is not supported or is this the uncompiled wasm?

affects:

  • [] standalone
  • [] widget (ui)
  • widget (wasm solver)
  • [] js server
  • [] js solver

to reproduce:
Enable static assets for Cap, then use this code from the docs: window.CAP_CUSTOM_WASM_URL = "https://<server url>/assets/cap_wasm.js";, replacing with the standalone server url. Then integrate the cap widget and script, load the protected page and observe the warning

expected behavior:
a clear and concise description of what you expected to happen.

screenshots:
not necessary

versions and environment:
Windows 11, Firefox, but should not matter

additional context:
I wanted to create an issue first before trying to change anything in the docs just in case that the docs are correct but I'm interpreting something wrong. I have verified my findings via reading the source code and observing what cap does when using it in cdn mode (although I have not disabled wasm for testing)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions