ustaxes / UsTaxes

Tax filing web application

Home Page:https://ustaxes.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AJV validation causing release to break

zakpatterson opened this issue · comments

Compiled binaries will show just a blank screen.

To debug, we must run: npx tauri build --debug, then we can see the console error:

[Error] Error compiling schema, function code:
"const schema2 = scope.schema[2];const schema1 = scope.schema[1];return function validate1(data, {instancePath=\"\", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;if(!(((typeof data == \"number\") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){validate1.errors = [{instancePath,schemaPath:\"#/definitions/nonNegativeInteger/type\",keyword:\"type\",params:{type: \"integer\"},message:\"must be integer\"}];return false;}if(errors === _errs1){if((typeof data == \"number\") && (isFinite(data))){if(data < 0 || isNaN(data)){validate1.errors = [{instancePath,schemaPath:\"#/definitions/nonNegativeInteger/minimum\",keyword:\"minimum\",params:{comparison: \">=\", limit: 0},message:\"must be >= 0\"}];return false;}}}validate1.errors = vErrors;return errors === 0;}"
	m (2.2958be9b.chunk.js:2:703543)
	(anonymous function) (2.2958be9b.chunk.js:2:705090)
	code (2.2958be9b.chunk.js:2:1285130)
	ye (2.2958be9b.chunk.js:2:580824)
	value (2.2958be9b.chunk.js:2:440845)
	value (2.2958be9b.chunk.js:2:443547)
	he (2.2958be9b.chunk.js:2:574655)
	fe (2.2958be9b.chunk.js:2:572855)
	(anonymous function) (2.2958be9b.chunk.js:2:572231)
	ue (2.2958be9b.chunk.js:2:572302)
	value (2.2958be9b.chunk.js:2:580284)
	x (2.2958be9b.chunk.js:2:1304635)
	code (2.2958be9b.chunk.js:2:1304412)
	ye (2.2958be9b.chunk.js:2:580824)
	(anonymous function) (2.2958be9b.chunk.js:2:574917)
	value (2.2958be9b.chunk.js:2:440845)
	value (2.2958be9b.chunk.js:2:443547)
	pe (2.2958be9b.chunk.js:2:574811)
	l (2.2958be9b.chunk.js:2:573491)
	(anonymous function) (2.2958be9b.chunk.js:2:574593)
	value (2.2958be9b.chunk.js:2:440845)
	value (2.2958be9b.chunk.js:2:443547)
	he (2.2958be9b.chunk.js:2:574528)
	fe (2.2958be9b.chunk.js:2:572855)
	(anonymous function) (2.2958be9b.chunk.js:2:576117)
	value (2.2958be9b.chunk.js:2:440845)
	value (2.2958be9b.chunk.js:2:440845)
	value (2.2958be9b.chunk.js:2:444111)
	ie (2.2958be9b.chunk.js:2:571331)
	(anonymous function) (2.2958be9b.chunk.js:2:575382)
	(anonymous function) (2.2958be9b.chunk.js:2:576761)
	m (2.2958be9b.chunk.js:2:702720)
	value (2.2958be9b.chunk.js:2:1252260)
	value (2.2958be9b.chunk.js:2:1252042)
	value (2.2958be9b.chunk.js:2:1244005)
	value (2.2958be9b.chunk.js:2:1247652)
	value (2.2958be9b.chunk.js:2:1251810)
	value (2.2958be9b.chunk.js:2:1247151)
	(anonymous function) (main.55c83b96.chunk.js:1:28231)
	l (localhost:1:1762)
	r (localhost:1:1628)
	t (localhost:1:1491)
	Global Code (main.55c83b96.chunk.js:1)

Caused by:

[Error] EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'sha256-cJoeYBxej8A6hw/FhfCwb6sxwBu/im7Qrvij/mCqGi8=' 'sha256-WCjzu/C4VqdhGuVF75MM2eqO+bDiu9B/n7k/o1pcVTQ=' 'sha256-MKihS5WMH2mflBXf+DImmsmTL+ZfeSWs6RtXFctQkfA=' 'sha256-UMXBz5ZSNdCKgheMpAv90ReZ4ZUsexNuGSSPzgGbDOQ=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='".

	m (2.2958be9b.chunk.js:2:703589)
	value (2.2958be9b.chunk.js:2:1252260)
	value (2.2958be9b.chunk.js:2:1252042)
	value (2.2958be9b.chunk.js:2:1244005)
	value (2.2958be9b.chunk.js:2:1247652)
	value (2.2958be9b.chunk.js:2:1251810)
	value (2.2958be9b.chunk.js:2:1247151)
	(anonymous function) (main.55c83b96.chunk.js:1:28231)
	l (localhost:1:1762)
	r (localhost:1:1628)
	t (localhost:1:1491)
	Global Code (main.55c83b96.chunk.js:1)

Should be solved by following this guide:

https://github.com/ajv-validator/ajv/blob/master/docs/standalone.md#two-step-process