Skip to content

Troubleshooting ​

What you seeWhat to check
The build fails with a message about foliwake.remote.jsonthe named field; the file must be version 2 with site, and the proxy prefixes must not collide
"… needs the password in the environment variable X"set X in the environment of the app's server, not in the file
"The origin answered without X-Code-Release"the origin is not a plain/2 Foliwake origin: every .plain.html must carry X-Code-Release
Blocks: static, NO_BLOCKS_ENTRYthe config names no blocks module: set app.blocks.entry
Blocks: static, BLOCKS_CONTRACT_UNSUPPORTEDthe site's blocks module exports another BLOCKS_CONTRACT.major than app.blocks.contract
Blocks: static, BLOCKS_MODULE_FAILEDapp.blocks.entry is not in the code release, or it throws on import; open /foliwake-code/<cd>/<entry>
EVENT_PREFIX_MISMATCHthe blocks module's BLOCKS_CONTRACT.eventPrefix differs from app.blocks.eventPrefix; the module's wins
The not-found pagethe path is outside app.pages, or the page is not published on that channel
"The page body was refused: …"the body, or your transform's output, has something the check refuses; the message names it
CSP errors in the consolethe block code uses eval, inline <script> or <style>, or another origin
Blocks fail to import @foliwake/block-kityour own code proxy must serve the release's _foliwake/ folder too
Live pictures blocked by CSPthe site resizes images on a CDN: name it as app.media with "transform": null
Pictures missing in previewauthorizePreview must say yes for the signed-in author
A 404 for components/<name>/<name>.cssa block without a stylesheet; harmless. Render the as: 'style' hints of page.preload instead
A block's stylesheet loads but part of it (a border, a color) is missingthe site's variables (--color-accent, …) live in its styles/styles.css, which an app does not load: give each var() in the block's CSS a fallback, or define the variables in your app's global CSS
A block's margins or paddings are goneyour app's global reset (* { margin: 0 }) is not in a layer, so it wins over the blocks' @layer blocks rules; put the reset in a layer, or scope it
Blocks missing after a client navigation to another releasethe browser lacks multiple import maps (Chrome 133+); a reload shows them

Status and error codes ​

onStatus reports mounting, then one of:

StatusMeans
readyevery block mounted
partialsome blocks failed; reports says which
staticshown without blocks; onError says why
errorwithout blocks while requireBlocks is set

On a Foliwake page, the site's loader (scripts/components.js) logs these codes to the console and, on local and preview pages, shows a notice before the failed block:

CodeMeans
LOADER_DESCRIPTOR_FAILEDcomponents/components.json could not be fetched or is not valid
LOADER_CONTRACT_MISMATCHthe descriptor's HTML contract differs from the page's
LOADER_UNKNOWN_COMPONENTthe block's name is not in the descriptor
LOADER_CSS_FAILEDthe block's stylesheet failed to load
LOADER_JS_FAILEDimporting the block's module failed (404, syntax error, …)
LOADER_INIT_INVALIDthe module has no default export function
LOADER_BLOCK_NAME_MISMATCHdefineBlock('<name>', …) names another block than its folder
LOADER_BLOCK_CONTRACTthe block declares another major of the blocks contract
LOADER_INIT_FAILEDinit threw, or returned a rejected promise

Apache-2.0