René's URL Explorer Experiment


Title: [ServiceWorker] localhost took too long to respond. HTTP ERROR 504 · Issue #21636 · angular/angular · GitHub

Open Graph Title: [ServiceWorker] localhost took too long to respond. HTTP ERROR 504 · Issue #21636 · angular/angular

X Title: [ServiceWorker] localhost took too long to respond. HTTP ERROR 504 · Issue #21636 · angular/angular

Description: I'm submitting a... [x] Bug report Minimal reproduction of the problem with instructions ng new sw --service-worker --routing cd sw ng g c home ng g c about Edit app-routing.module.ts to add the routes for the 2 components we've just cre...

Open Graph Description: I'm submitting a... [x] Bug report Minimal reproduction of the problem with instructions ng new sw --service-worker --routing cd sw ng g c home ng g c about Edit app-routing.module.ts to add the ro...

X Description: I'm submitting a... [x] Bug report Minimal reproduction of the problem with instructions ng new sw --service-worker --routing cd sw ng g c home ng g c about Edit app-routing.module.ts to add th...

Opengraph URL: https://github.com/angular/angular/issues/21636

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ServiceWorker] localhost took too long to respond. HTTP ERROR 504","articleBody":"## I'm submitting a...\r\n```\r\n[x] Bug report\r\n```\r\n\r\n## Minimal reproduction of the problem with instructions\r\n1. `ng new sw --service-worker --routing`\r\n2. `cd sw`\r\n3. `ng g c home`\r\n4. `ng g c about`\r\n5. Edit `app-routing.module.ts` to add the routes for the 2 components we've just created:\r\n```\r\n// ...\r\nimport { HomeComponent } from './home/home.component';\r\nimport { AboutComponent } from './about/about.component';\r\n\r\nconst routes: Routes = [\r\n  { path: '', component: HomeComponent },\r\n  { path: 'about', component: AboutComponent }\r\n];\r\n\r\n// ...\r\n```\r\n6. `ng build --prod`\r\n7. `npm install -g http-server` (you can use any server to test this, if you already prefer another one)\r\n8. `http-server dist`\r\n9. Access `localhost:8080` (8080 is the default port that http-server uses at the time of reporting this issue)\r\n10. Access `localhost:8080/about`\r\n11. Stop the server\r\n12. Now try reloading the app while on the `/about` route (if it works the first time, try refreshing a few more times or wait a little before trying again). The browser will display the message:\r\n```\r\nThis page isn’t working\r\nlocalhost took too long to respond.\r\nHTTP ERROR 504\r\n```\r\n(With Universal/SSR, it stops working right away, most of the time with the first refresh after stopping the server, no matter the route - and the issue is not the hash in the generated ngsw.json, because I regenerate that at the end of the build process).\r\n\r\nNow, if you start the server again, loading the app on the `/about` route works (even though http-server is not SPA friendly, it doesn't redirect all requests to index.html), but the service worker kicks in.\r\nInitially I noticed this behavior on a Universal app, doing server side rendering (following the [universal-starter repo](https://github.com/angular/universal-starter)). So this is not a http-server \"not being SPA friendly\" issue.\r\nI only used http-server to reproduce it because I wanted to keep the reproduction process as fast as possible, without introducing server side rendering.\r\nThe CLI version used (1.6.4) initializes the app with Angular 5.1.0, but I've also tested on 5.2.1. I've skipped mentioning this step above because it happens regardless of the Angular version (at least on `>= 5.1.0`, haven't tested with older versions).\r\n\r\n\r\n## Environment\r\n\r\n```\r\nAngular CLI: 1.6.4\r\nNode: 8.9.4\r\nOS: win32 x64\r\nAngular: 5.2.1\r\n\r\nBrowser:\r\nI've only tested on:\r\n- [x] Chrome (desktop) version 63.0.3239.132\r\n- [x] Chrome (desktop) version 65.0.3323.2 (canary)\r\n```\r\n","author":{"url":"https://github.com/NgxDev","@type":"Person","name":"NgxDev"},"datePublished":"2018-01-18T17:07:17Z","url":"https://github.com/angular/angular/issues/21636"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6d24b1a7-e96b-3fd7-3d20-1f6dceaf16ea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB178:2463BD:120FA9C:1732C1F:6B010DDD
html-safe-nonce63c25ee67d61fc7b35136ca81307b1a57d6c1526a120649d7bae20c58aeaa6ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTc4OjI0NjNCRDoxMjBGQTlDOjE3MzJDMUY6NkIwMTBEREQiLCJ2aXNpdG9yX2lkIjoiMjAyNzEyNTY0MzgyMDQ2OTcyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac58b9d896e067bf99b2f784c91a4b9cc9a9c227cbb19d05096a3b9225f835f885
hovercard-subject-tagissue:289705766
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/21636/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2875e27d56ee8ea1197905332fba11ecc87e8969109b0b9916d1d3fb2485290e/angular/angular/issues/21636
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2875e27d56ee8ea1197905332fba11ecc87e8969109b0b9916d1d3fb2485290e/angular/angular/issues/21636
og:image:altI'm submitting a... [x] Bug report Minimal reproduction of the problem with instructions ng new sw --service-worker --routing cd sw ng g c home ng g c about Edit app-routing.module.ts to add the ro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameNgxDev
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/21636#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F21636
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F21636
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/21636
Reloadhttps://github.com/angular/angular/issues/21636
Reloadhttps://github.com/angular/angular/issues/21636
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/21636
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/21636
[ServiceWorker] localhost took too long to respond. HTTP ERROR 504https://github.com/angular/angular/issues/21636#top
area: service-workerIssues related to the @angular/service-worker packagehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20service-worker%22
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/NgxDev
NgxDevhttps://github.com/NgxDev
on Jan 18, 2018https://github.com/angular/angular/issues/21636#issue-289705766
universal-starter repohttps://github.com/angular/universal-starter
Nexthttps://github.com/angular/angular/issues/21636?timeline_page=1
alxhubhttps://github.com/alxhub
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
severity3: brokenhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22severity3%3A%20broken%22
area: service-workerIssues related to the @angular/service-worker packagehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20service-worker%22
on Jan 18, 2018https://github.com/angular/angular/issues/21636#event-1431474834
ngbothttps://github.com/apps/ngbot
Backloghttps://github.com/angular/angular/milestone/82
on Jan 23, 2018https://github.com/angular/angular/issues/21636#event-1437490894
https://github.com/NgxDev
NgxDevhttps://github.com/NgxDev
on Jan 24, 2018https://github.com/angular/angular/issues/21636#issuecomment-360117696
https://github.com/odahcam
odahcamhttps://github.com/odahcam
on Jan 30, 2018https://github.com/angular/angular/issues/21636#issuecomment-361641561
https://user-images.githubusercontent.com/3942006/35576887-4de6a600-05c7-11e8-9d10-b738b0f6b814.png
https://github.com/odahcam
odahcamhttps://github.com/odahcam
on Jan 30, 2018https://github.com/angular/angular/issues/21636#issuecomment-361683073
https://github.com/KGALLET
KGALLEThttps://github.com/KGALLET
on Feb 1, 2018https://github.com/angular/angular/issues/21636#issuecomment-362224407
https://github.com/jackkoppa
jackkoppahttps://github.com/jackkoppa
on Feb 4, 2018https://github.com/angular/angular/issues/21636#issuecomment-362913539
How to handle routing in Angular 5+ Service Workers?https://stackoverflow.com/questions/48565629/how-to-handle-routing-in-angular-5-service-workers
https://github.com/DominicBoettger
DominicBoettgerhttps://github.com/DominicBoettger
on Feb 8, 2018https://github.com/angular/angular/issues/21636#issuecomment-364198993
https://github.com/odahcam
odahcamhttps://github.com/odahcam
on Feb 8, 2018https://github.com/angular/angular/issues/21636#issuecomment-364201330
https://github.com/jackkoppa
jackkoppahttps://github.com/jackkoppa
on Feb 8, 2018https://github.com/angular/angular/issues/21636#issuecomment-364215128
@odahcamhttps://github.com/odahcam
https://github.com/jackkoppa
jackkoppahttps://github.com/jackkoppa
on Feb 8, 2018https://github.com/angular/angular/issues/21636#issuecomment-364219034
@alxhubhttps://github.com/alxhub
this talkhttps://youtu.be/C8KcW1Nj3Mw?t=23m3s
https://github.com/odahcam
odahcamhttps://github.com/odahcam
on Feb 8, 2018https://github.com/angular/angular/issues/21636#issuecomment-364224818
https://github.com/RamBoFe
RamBoFehttps://github.com/RamBoFe
on Jun 12, 2019https://github.com/angular/angular/issues/21636#issuecomment-501249297
https://github.com/DanielRuf
DanielRufhttps://github.com/DanielRuf
on Jun 12, 2019https://github.com/angular/angular/issues/21636#issuecomment-501250589
@RamBoFehttps://github.com/RamBoFe
https://github.com/RamBoFe
RamBoFehttps://github.com/RamBoFe
on Jun 12, 2019https://github.com/angular/angular/issues/21636#issuecomment-501253302
@DanielRufhttps://github.com/DanielRuf
https://github.com/danieldanielecki
danieldanieleckihttps://github.com/danieldanielecki
on Jun 18, 2019https://github.com/angular/angular/issues/21636#issuecomment-503018156
https://github.com/david-genger
david-gengerhttps://github.com/david-genger
on Jun 19, 2019https://github.com/angular/angular/issues/21636#issuecomment-503680099
https://github.com/zain-b
zain-bhttps://github.com/zain-b
on Jul 18, 2019https://github.com/angular/angular/issues/21636#issuecomment-513025134
https://github.com/jrcasso
jrcassohttps://github.com/jrcasso
on Aug 6, 2019https://github.com/angular/angular/issues/21636#issuecomment-518459980
https://github.com/pzuschlag
pzuschlaghttps://github.com/pzuschlag
on Aug 6, 2019https://github.com/angular/angular/issues/21636#issuecomment-518619273
https://github.com/H--o-l
H--o-lhttps://github.com/H--o-l
on Aug 6, 2019https://github.com/angular/angular/issues/21636#issuecomment-518633324
@jrcassohttps://github.com/jrcasso
@zuschyhttps://github.com/zuschy
https://github.com/pzuschlag
pzuschlaghttps://github.com/pzuschlag
on Aug 6, 2019https://github.com/angular/angular/issues/21636#issuecomment-518654654
@H--o-lhttps://github.com/H--o-l
https://github.com/NgxDev
NgxDevhttps://github.com/NgxDev
on Aug 6, 2019https://github.com/angular/angular/issues/21636#issuecomment-518655689
@H--o-lhttps://github.com/H--o-l
https://github.com/jrcasso
jrcassohttps://github.com/jrcasso
on Aug 15, 2019https://github.com/angular/angular/issues/21636#issuecomment-521563742
@H--o-lhttps://github.com/H--o-l
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 15, 2019https://github.com/angular/angular/issues/21636#issuecomment-531553230
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 15, 2019https://github.com/angular/angular/issues/21636#event-2634580263
adhambaouzhttps://github.com/adhambaouz
on Nov 20, 2026https://github.com/angular/angular/issues/21636#event-36822202535
fix(service-worker): do not enter degraded mode when offline (angular…https://github.com/adhambaouz/angular/commit/133fd3132816aa4cf873ef06b2e871dab301aa5b
angular…https://github.com/angular/angular/pull/22883
https://docs.github.com/articles/closing-issues-via-commit-messages
133fd31https://github.com/adhambaouz/angular/commit/133fd3132816aa4cf873ef06b2e871dab301aa5b
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/21636
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/21636
area: service-workerIssues related to the @angular/service-worker packagehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20service-worker%22
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
BacklogNo due datehttps://github.com/angular/angular/milestone/82
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.