Error when clicking store finder link
See original GitHub issueEnvironment Details
- Spartacus: Latest RC, storefrontlib-0.1.0-prealpha.10
- Browser: Chrome (latest), Firefox (latest)
Expected Results
When clicking the store finder link, the store finder should display
Observed Results
When clicking the store finder link, We have the following error:
main.88f82924af33ceea6f2e.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'ngInjectableDef' of undefined TypeError: Cannot read property 'ngInjectableDef' of undefined at Jr (main.88f82924af33ceea6f2e.js:1) at t.get (main.88f82924af33ceea6f2e.js:1) at t.getToken (main.88f82924af33ceea6f2e.js:1) at n.project (main.88f82924af33ceea6f2e.js:1) at n._next (main.88f82924af33ceea6f2e.js:1) at n.next (main.88f82924af33ceea6f2e.js:1) at t._subscribe (main.88f82924af33ceea6f2e.js:1) at t._trySubscribe (main.88f82924af33ceea6f2e.js:1) at t.subscribe (main.88f82924af33ceea6f2e.js:1) at t.call (main.88f82924af33ceea6f2e.js:1) at Jr (main.88f82924af33ceea6f2e.js:1) at t.get (main.88f82924af33ceea6f2e.js:1) at t.getToken (main.88f82924af33ceea6f2e.js:1) at n.project (main.88f82924af33ceea6f2e.js:1) at n._next (main.88f82924af33ceea6f2e.js:1) at n.next (main.88f82924af33ceea6f2e.js:1) at t._subscribe (main.88f82924af33ceea6f2e.js:1) at t._trySubscribe (main.88f82924af33ceea6f2e.js:1) at t.subscribe (main.88f82924af33ceea6f2e.js:1) at t.call (main.88f82924af33ceea6f2e.js:1) at P (polyfills.58789c84a628685b2bdb.js:1) at P (polyfills.58789c84a628685b2bdb.js:1) at polyfills.58789c84a628685b2bdb.js:1 at t.invokeTask (polyfills.58789c84a628685b2bdb.js:1) at Object.onInvokeTask (main.88f82924af33ceea6f2e.js:1) at t.invokeTask (polyfills.58789c84a628685b2bdb.js:1) at e.runTask (polyfills.58789c84a628685b2bdb.js:1) at d (polyfills.58789c84a628685b2bdb.js:1) at e.invokeTask [as invoke] (polyfills.58789c84a628685b2bdb.js:1) at k (polyfills.58789c84a628685b2bdb.js:1) ft @ main.88f82924af33ceea6f2e.js:1 t.handleError @ main.88f82924af33ceea6f2e.js:1 next @ main.88f82924af33ceea6f2e.js:1 n.object.o @ main.88f82924af33ceea6f2e.js:1 n.__tryOrUnsub @ main.88f82924af33ceea6f2e.js:1 n.next @ main.88f82924af33ceea6f2e.js:1 n._next @ main.88f82924af33ceea6f2e.js:1 n.next @ main.88f82924af33ceea6f2e.js:1 n.next @ main.88f82924af33ceea6f2e.js:1 n.emit @ main.88f82924af33ceea6f2e.js:1 (anonymous) @ main.88f82924af33ceea6f2e.js:1 t.invoke @ polyfills.58789c84a628685b2bdb.js:1 e.run @ polyfills.58789c84a628685b2bdb.js:1 t.runOutsideAngular @ main.88f82924af33ceea6f2e.js:1 onHandleError @ main.88f82924af33ceea6f2e.js:1 t.handleError @ polyfills.58789c84a628685b2bdb.js:1 e.runGuarded @ polyfills.58789c84a628685b2bdb.js:1 t @ polyfills.58789c84a628685b2bdb.js:1 n.microtaskDrainDone @ polyfills.58789c84a628685b2bdb.js:1 d @ polyfills.58789c84a628685b2bdb.js:1 e.invokeTask @ polyfills.58789c84a628685b2bdb.js:1 k @ polyfills.58789c84a628685b2bdb.js:1 _ @ polyfills.58789c84a628685b2bdb.js:1
Additional Information
Before the store finder error, I can see the following error in Firefox
Failed to register/update a ServiceWorker for scope ‘http://localhost:4200/’: Bad Content-Type of ‘text/html’ received for script ‘http://localhost:4200/ngsw-worker.js’. Must be ‘text/javascript’, ‘application/x-javascript’, or ‘application/javascript’.
And the following in chrome:
ERROR Error: Uncaught (in promise): TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. at P (polyfills.58789c84a628685b2bdb.js:1) at polyfills.58789c84a628685b2bdb.js:1 at polyfills.58789c84a628685b2bdb.js:1 at t.invoke (polyfills.58789c84a628685b2bdb.js:1) at Object.onInvoke (main.88f82924af33ceea6f2e.js:1) at t.invoke (polyfills.58789c84a628685b2bdb.js:1) at e.run (polyfills.58789c84a628685b2bdb.js:1) at polyfills.58789c84a628685b2bdb.js:1 at t.invokeTask (polyfills.58789c84a628685b2bdb.js:1) at Object.onInvokeTask (main.88f82924af33ceea6f2e.js:1)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
This problem occurs only in production version of the lib:
the error is gone.