[Solved] Loading specific GeoGebra apps version from GeoGebra CDN fails due to HTTP 403

ComFreek shared this question 4 years ago
Answered

Solved! The HTML5Codebase URI was missing /web3d at the end.

Minimal reproduction sample (here's a version at pastebin because the code below has formatting issues in this forum):

<!doctype html>
<html>
	<head><title></title></head>
	<body>
		<div id="applet_container"></div>
		<script src="https://cdn.geogebra.org/ap...;
		<script>
			const applet = new GGBApplet({
				'appName': 'classic',
				'useBrowserForJS': false,
			});
			applet.setHTML5Codebase('https://cdn.geogebra.org/apps/5.0.534.0');
			applet.inject('applet_container');
		</script>
	</body>
</html>
Make sure to serve the HTML file with a real HTTP server. Don't load it via the file:// protocol. Then, upon loading it in any browser you will get the following error:


deployggb.js:5 GET https://cdn.geogebra.org/ap... net::ERR_ABORTED 403

Indeed, deployggb.js tries to require() the URI 'geogebra/runtime/js/web3d/web3d.nocache', which yields an HTTP 403 error: https://cdn.geogebra.org/ap...

I'd be grateful for any hints!

© 2023 International GeoGebra Institute