Troubleshooting
vf deploy blocks a remote JavaScript import
Example:
Rule: remote code import
URL: https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/+esmThe VifuHub CLI blocks remote executable code. Bundle the dependency locally, remove the unused provider, or load it only in a local development build that is not deployed.
In Vite, Angular, or Webpack apps, search for the package or host name in source. The failing URL may come from an optional provider that is statically imported.
Use A VifuHub Capability
Example:
fetch("https://api.openai.com/v1/chat/completions");
fetch("http://localhost:1234/v1/chat/completions");Use the matching VifuHub namespace for each host capability:
await hub.ai.generateText({
model: "basic",
messages: [{ role: "user", content: "Give a hint." }]
});Browser console shows CSP errors
The Agent Runtime CSP intentionally blocks:
- CDN JavaScript
- arbitrary
connect-srcendpoints - direct local model providers such as LM Studio
- browser features not enabled by internal runtime policy
If CSS, fonts, images, or media are blocked, check that the URL is an approved static resource URL. If JavaScript is blocked, bundle it into the game.
hostConnected stays false
Check:
- The game is loaded inside the Agent Runtime, not as a plain local file.
- The VifuHub SDK script/import runs before Hub calls.
- Check
hub.status()after the VifuHub SDK bridge initializes. - The page did not crash before the VifuHub SDK bridge initialized.
Outside the Agent Runtime, hostConnected: false is normal. Your game should still boot.
A service or resource call is rejected
Declare the matching public manifest section:
| VifuHub SDK call | Manifest section |
|---|---|
hub.ai.* | ai |
hub.resources.readJson(...) | data |
hub.resources.mediaUrl(...) | media |
hub.resources.fileUrl(...) | bundle |
hub.gameState.* | save |
hub.dictionary.lookup(...) | dictionary |
hub.voice.* | voice |
hub.review.* | review |
hub.camera.capture(...) | camera |
Do not add services, devices, resources, permissions, or capabilities to a public game manifest.
Deploy says no changes
The VifuHub CLI fingerprints the same files it uploads. If no validated build output changed, the CLI can skip upload and keep the existing game version.
If you expected a change:
- confirm
build.outputpoints to the directory you rebuilt - run without
--no-build - check that generated assets are not excluded from the upload archive
Tools do not run
- Pass tools to
hub.ai.generateText({ tools })orhub.run(agent, input, { tools }). - Keep tool names stable.
- Validate
parameters/inputSchema. - Return JSON-compatible results from
execute.
