Error exporting Rive template to the web

Hello people, my name is tapir. Nice to meet you!
I currently have a problem with exporting the Rive default example template to the web.

This is what I did:

  • Download Defold for macOS
  • Create a new project using the “Rive Project” template
  • Export the game: ProjectBuild HTML5
  • Running the example in the browser (I have tested multiple) gives me the following error message in the browser console:
[Error] ERROR:CRASH: CALL STACK:
["enable_shader_pixel_local_storage_ext_js@http://localhost:50951/html5/Riveproject_wasm.js:1:308815","<?>.wasm-function[4781]@[wasm code]","<?>.wasm-function[4816]@[wasm code]","<?>.wasm-function[7246]@[wasm code]","<?>.wasm-function[7232]@[wasm code]","<?>.wasm-function[1739]@[wasm code]","<?>.wasm-function[8397]@[wasm code]","<?>.wasm-function[8413]@[wasm code]","<?>.wasm-function[7004]@[wasm code]","@http://localhost:50951/html5/Riveproject_wasm.js:1:300988","@http://localhost:50951/html5/Riveproject_wasm.js:1:212133","iterFunc@http://localhost:50951/html5/Riveproject_wasm.js:1:212143","callUserCallback@http://localhost:50951/html5/Riveproject_wasm.js:1:128684","runIter@http://localhost:50951/html5/Riveproject_wasm.js:1:130259","MainLoop_runner@http://localhost:50951/html5/Riveproject_wasm.js:1:128369"]
CALL STACK END

	printErr (dmloader.js:909)
	_ (Riveproject_wasm.js:1:308059)
	runEmAsmFunction (Riveproject_wasm.js:1:124322)
	_emscripten_asm_const_int (Riveproject_wasm.js:1:124469)
	<?>.wasm-function[585]
	<?>.wasm-function[9050]
	(anonymous function) (Riveproject_wasm.js:1:300989)
	(anonymous function) (Riveproject_wasm.js:1:330425)
	ccall (Riveproject_wasm.js:1:305299)
	(anonymous function) (dmloader.js:1015)
[Error] TypeError: renderPass.setShaderPixelLocalStorageEnabled is not a function. (In 'renderPass.setShaderPixelLocalStorageEnabled(Boolean(enabled))', 'renderPass.setShaderPixelLocalStorageEnabled' is undefined)
	quit_ (Riveproject_wasm.js:1:12891)
	handleException (Riveproject_wasm.js:1:127111)
	callUserCallback (Riveproject_wasm.js:1:128724)
	runIter (Riveproject_wasm.js:1:130260)
	MainLoop_runner (Riveproject_wasm.js:1:128370)

I’m using the following versions:

  • Editor SHA1: 5944eddf7392f6735768b5dfc495695b63ef3c76
  • Engine SHA1: 7a0e23b3fcab4c5db82f2b32f5d8ac5df9467c9d

Since the Rive template project uses rive-defold’s main.zip, I also tried to instead use version 5.0.0 specifically (https://github.com/defold/extension-rive/archive/refs/tags/5.0.0.zip), but it yields the exact same error.

Since I’m very new to Defold, I decided to ask here first before creating a bug report, because I probably did something obvious wrong. I’d appreciate any pointers as to what that could be!

Best,
Tapir

This is a quite new functionality for browsers. (WEBGL_shader_pixel_local_storage)
What browser version are you using, and does it support this feature?

Hi Mathias,

apparently it does not!
For some reason it didn’t cross my mind that the extension is using new extensions like that, because Rive itself just works in the very same browser. Do you know if there are plans to implement a fallback behaviour? It would be great if Defold would support the same browser the Rive webapp itself supported.

Thanks!

Glad we figured it out!

Do you know if there are plans to implement a fallback behaviour? It would be great if Defold would support the same browser the Rive webapp itself supported.

That is up to the Rive team. We support what they support in their rive-runtime.