diff --git a/packages/console-app/src/components/AppLink.js b/packages/console-app/src/components/AppLink.js index 0b4eecce..93498165 100644 --- a/packages/console-app/src/components/AppLink.js +++ b/packages/console-app/src/components/AppLink.js @@ -21,7 +21,9 @@ const getAppUrl = (config, { wrn }) => { pathComponents.push(prefix.substring(1)); } - pathComponents.push(encodeURIComponent(wrn)); + // TODO(burdon): Make names URL safe so that encoding is not required. + // pathComponents.push(encodeURIComponent(wrn)); + pathComponents.push(wrn); return `${pathComponents.join('/')}/`; }; diff --git a/packages/console-app/src/main.js b/packages/console-app/src/main.js index 02ab3a57..77271172 100644 --- a/packages/console-app/src/main.js +++ b/packages/console-app/src/main.js @@ -15,7 +15,12 @@ debug.enable(config.system.debug); // https://webpack.js.org/guides/progressive-web-application if ('serviceWorker' in navigator) { window.addEventListener('load', () => { - // TODO(burdon): Remove "wrn:" from registry path so encoding is not required. + // TODO(burdon): Remove "wrn:" from path so that escape characters are not required. + // main.js?56d7:23 SW registration failed: TypeError: Failed to register a ServiceWorker: + // The provided scope ('https://apollo1.kube.moon.dxos.network/app/wrn%3A%2F%2Fdxos%2Fapplication%2Fconsole%40alpha/') + // or scriptURL ('https://apollo1.kube.moon.dxos.network/app/wrn%3A%2F%2Fdxos%2Fapplication%2Fconsole%40alpha/service_worker.js') + // includes a disallowed escape character. + // at eval (main.js?56d7:20) const path = window.location.pathname + 'service_worker.js'; navigator.serviceWorker.register(path).then(registration => { console.log('SW registered:', registration);