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.

sw-registration.js is fingerprinted incorrectly when rootURL is set.

See original GitHub issue

I am trying to setup service workers for an ember 3.4 app. The app is served from a sub directory ‘/mobile/’ so the config/environment.js rootURL is set to ‘/mobile/’.

In development the sw-registration.js script is added to the index.html page and mobile is prepended. However when deployed via ember-cli-deploy the sw-registration.js is fingerprinted and a incorrect ‘/mobile/’ path is added. (I say incorrect because all other assets are not prefixed by a mobile path).

All assets are fingerprinted and served from a cdn. I am unsure how or if the app should fingerprint the sw-registration.js file.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arenoircommented, Apr 5, 2019

Thanks @martndemus for the suggestion. I started to refactor the add-on to omit the rootURL from the sw-registration.js src if the fingerprint prepend option is present. But because _getRootURL() function is used by the sw.js file as well, so I punted.

It turns out there is a config option that handles this better any how. By using the inline registrationStrategy we don’t have to worry about the rootURL being appended to the fingerprint.prepend string.

    //ember-cli-build.js
    'ember-service-worker': {
      registrationStrategy: 'inline'
    }
0reactions
eshtadccommented, Dec 18, 2019

@jfrux Is that using the PR that we were testing for this issue? https://github.com/DockYard/ember-service-worker/pull/152

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions (FAQ) About Fingerprint Processing
Firms with questions about using Sterling as their fingerprint collection option should contact Sterling Client Support.
Read more >
Developing Remote Plug-ins with the vSphere Client SDK - VMware ...
Developing Remote Plug-ins with the vSphere Client SDK provides information about developing and deploying HTML-5 extensions to the vSphere Client user ...
Read more >
googleapis documentation - Google Cloud
The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
Read more >
All Classes (Jenkins core 2.374 API) - Jenkins Javadoc
Extension point for adding Captcha Support to User Registration Page ... Filter that sets the character encoding to be used in parsing the...
Read more >
draft-ietf-acme-acme-01 - Automatic Certificate Management ...
Existing Web PKI certificate authorities tend to run on a set of ad hoc ... The server acknowledges the registration by replying with...
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