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.

Could not connect to "http://localhost:4200". Is the server up and running?

See original GitHub issue

Describe the bug My SWA project consists of

  • Angular (v12) UI
  • Integrated API (node v14)

About a month ago downloaded v 0.8.2, the following steps VSC created a local DEV I can F5 to launch swa emulator to run and debug both Angular and nodes backend:

  • delete .vscode folder
  • click debug icon
  • select Show all automatic debug configuration
  • select Azure Static Web Apps ...
  • select angular-app: <name of angular app>.
  • everything created.
  • select SWA: Run angular-app from drop-down, F5
  • after a little while, debugger bar changes to “Attach to Node Function” image
  • Terminal tells to use port 4280,
  • a browser pops up itself, everything working like a charm!

After upgraded to v 0.8.3, F5 got image image

To Reproduce Repeating the same steps outlined above

  • after select Azure Static Web Apps ...
  • no more angular-app: <name of angular app> Debug drop-down becomes image

Uninstall v 0.8.3, reinstall v 0.8.2 would not get the same prompt back, and it keeps failing.

Desktop (please complete the following information): Version: 1.63.1 (system setup) Commit: fe719cd3e5825bf14e14182fddeb88ee8daf044f Date: 2021-12-14T02:13:54.292Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19044

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
nturinskicommented, Apr 13, 2022

@alexweininger As discussed offline, here is a task configured to work

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"problemMatcher": [
				"$swa-watch"
			],
			"label": "swa: start react-basic 2",
			"command": "swa",
			"args": [
				"start", 
				"http://localhost:3000", 
				"--run", 
				"npm start", 
				"--devserver-timeout", 
				"90000"
			]
		}
	]
}
1reaction
alexweiningercommented, Jun 30, 2022

I can confirm that it works in this version. When will this be available publicly? Thank you!

@sa-schiefer Awesome! We’re planning to release next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

localhost:4200 not working for my angular app - Stack Overflow
Till yesterday, everything was working good. Using cmd, I type ng serve, go to my browser type localhost ...
Read more >
Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >
Localhost Refused to Connect - How to Fix the Error
When developing locally the localhost refused to connect is the worst error you can get. See the causes and what solves the error....
Read more >
Troubleshooting - Prefect Docs
You'll see the message Couldn't connect to Prefect Server at http://localhost:4200/graphql when you click on the connection menu. Don't panic!
Read more >
Server-side rendering (SSR) with Angular Universal
npm run dev:ssr. Open a browser and navigate to http://localhost:4200 . You should see the familiar Tour of Heroes dashboard page.
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