Troubleshooting
vifu deploy blocks a remote JavaScript import
Example:
Rule: remote code import
URL: https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/+esmVifu 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.
vifu deploy blocks a direct backend call
Example:
fetch("https://api.openai.com/v1/chat/completions");
fetch("http://localhost:1234/v1/chat/completions");Replace direct backend calls with SDK calls:
await vifu.ai.generateText({
model: "basic",
messages: [{ role: "user", content: "Give a hint." }]
});Browser console shows CSP errors
Vifu's 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 Vifu, not as a plain local file.
- The SDK script/import runs before SDK calls.
- You are checking
vifu.status(), not an oldcompanion.status()helper. - The page did not crash before the SDK bridge initialized.
Outside Vifu, hostConnected: false is normal. Your game should still boot.
A service or resource call is rejected
Declare the matching public manifest section:
| SDK call | Manifest section |
|---|---|
vifu.ai.* | ai |
vifu.resources.readJson(...) | data |
vifu.resources.mediaUrl(...) | media |
vifu.resources.fileUrl(...) | bundle |
vifu.gameState.* | save |
vifu.dictionary.lookup(...) | dictionary |
vifu.voice.* | voice |
vifu.review.* | review |
vifu.camera.capture(...) | camera |
Do not add services, devices, resources, permissions, or capabilities to a public game manifest.
Deploy says no changes
Vifu 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
vifu.ai.generateText({ tools })orvifu.run(agent, input, { tools }). - Keep tool names stable.
- Validate
parameters/inputSchema. - Return JSON-compatible results from
execute.