question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when clicking store finder link

See original GitHub issue

Environment 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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Platonncommented, Dec 27, 2018

This problem occurs only in production version of the lib:

yarn build:core:lib
yarn start:prod
0reactions
kacperknapikcommented, Dec 27, 2018

the error is gone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages in Store Locator - Bold Commerce Help Center
This article outlines why specific Store Locator errors appear, and how to fix them. Please select an option below to view more information....
Read more >
Google Maps Error: Oops! Something went wrong
This error means that you need to Enable Billing for your Google account using the following link: https://console.cloud.google.com/project/_/billing/enable.
Read more >
How to Fix an Unexpected Store Exception Error in Windows ...
Right-click the result and click Uninstall device. Confirm it and restart your PC. Press Windows Key + I to open Settings and click...
Read more >
Troubleshoot bookmarks - Microsoft Support
Get help fixing bookmark errors and other bookmark issues. ... Under Show document content select Show bookmarks and click OK. Word Options.
Read more >
If your computer doesn't recognize your iPhone or iPad
If your computer doesn't recognize your iPhone or iPad · Look in the Finder or iTunes · Update the software on all devices...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found