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.

Unexpected token < after redeploy

See original GitHub issue

Library Affected: workbox-sw v3.6.3

Browser & Platform: Google Chrome for Android

Issue or Feature Request Description: I bundle my website/PWA, where I use a couple of Web Components, using the workbox-webpack-plugin.

Everything works smooth and well till I redeploy the project (hosted on Firebase).

On my phone, if I clean my cache and get access the website/pwa, all good, worker works correctly.

Later on, once I release a new version, where I did several changes, and deploy it to the hosting and if I try to access the website/pwa with my phone, then I’ll face the following error:

Uncaught SyntaxError: Unexpected token <

Any help would be appreciated.

Source

The project is open source: https://github.com/deckgo/deckdeckgo-website

URL The website/pwa: https://deckdeckgo.com

Screenshot of the error capture d ecran 2019-02-13 a 22 08 21

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
peterpeterparkercommented, Feb 15, 2019

Yeaaaah @jeffposnick, confirmed on two phones, ignoreUrlParametersMatching solved it, thx a looooooooott

3reactions
peterpeterparkercommented, Feb 15, 2019

@jeffposnick thx for the feedback but I think I was not enough clear then in my original entry. The thing is, I don’t clear and I don’t to want to clear my my cache at all, I just did and specified that to make it clear that the error Unexpected token < doesn’t exist if the pwa was never fetched

so here again the scenario:

“user” access the PWA workbox cache the resources

-> All good

timeframe jump here, like a couple of days or weeks where I develop new features

I redeploy the PWA to Firebase Hosting

same “user” as above access the PWA again (without clearing anything) -> ERROR Unexpected token <

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unexpected token '<'" after SvelteKit redeploy - Stack Overflow
I often get the error Unexpected token '<' in the browser when I access it. Hit browser refresh solve the issue.
Read more >
Unexpected token <" on new build using gatsby JS - Support
The error Uncaught SyntaxError: Unexpected token < is most commonly caused by your site's code referring to an asset that is no longer...
Read more >
Not working after update, `SyntaxError: Unexpected token
Something happened, I have same problem when accessing the site on my phone. So basically everyone that accessed site before needs to clear...
Read more >
MDVA-44887: 'Uncaught SyntaxError: Unexpected token ...
The Uncaught SyntaxError: Unexpected token const error is displayed in the Admin panel. This patch is available when the Quality Patches ...
Read more >
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK. ... To avoid generating unexpected AWS charges, the AWS CDK...
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