Comments (8)
Hi @xiantang, here it is: #585
from air.
On MacOS
GOARCH=arm64
GOOS=darwin
Built from a go install
.
__ _ ___
/ /\ | | | |_)
/_/--\ |_| |_| \_ v1.52.0, built with Go go1.22.0
If it matters, I run from make
as a driver.
from air.
Hi @davidovich, I am the author of the proxy feature. I am not able to reproduce this issue with the steps you mentioned. What is your OS and Go version? Does this happen when you start air for the first time with proxy enabled, or after a few reload events?
from air.
Could you test please my branch fix-live-proxy? https://github.com/cosmtrek/air/compare/master...ndajr:air:fix-live-proxy?expand=1. I've improved the error handling, used atomic counters and RWMutex which should help to avoid race conditions
from air.
Could you test please my branch fix-live-proxy? https://github.com/cosmtrek/air/compare/master...ndajr:air:fix-live-proxy?expand=1. I've improved the error handling, used atomic counters and RWMutex which should help to avoid race conditions
could u make a pr ?
from air.
To reproduce:
- Start air with proxy enabled in config.
- Type CTRL-C
Result:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x100e5b604] goroutine 5074 [running]: github.com/cosmtrek/air/runner.(*ProxyStream).RemoveSubscriber(0x14000236588, 0x9b) /Users/[user]/go/pkg/mod/github.com/cosmtrek/[email protected]/runner/proxy_stream.go:42 +0xc4 github.com/cosmtrek/air/runner.(*Proxy).reloadHandler.func1() /Users/[user]/go/pkg/mod/github.com/cosmtrek/[email protected]/runner/proxy.go:159 +0x84 created by github.com/cosmtrek/air/runner.(*Proxy).reloadHandler in goroutine 4997 /Users/[user]/go/pkg/mod/github.com/cosmtrek/[email protected]/runner/proxy.go:157 +0x2b8A theory is that
proxy.Stop()
is called before the<- ctx.Done()
channel yields, allowing making a call on an empty value of the map.
plz provide OS version, and run air -v
from air.
Another thing comes to mind.
Merely starting air
and closing it with SIGINT doesn't trigger the panic, I think we actually need to serve some pages to the browser to observe the failure (to have multiple subscribers ?).
But now, I can't seem to reproduce the panic...
I did observe though that if you SIGINT the air
process before saving any content, the managed executable stays running.
from air.
should be fixed in #585. will release in next version of air
from air.
Related Issues (20)
- Add Homebrew formula HOT 1
- Air doesn't seem to be working when there's whitespace in the path.
- Disable tmp directory HOT 1
- panic: unaligned 64-bit atomic operation in windows HOT 5
- bug: live reload do not work for tmpl files HOT 6
- Using the `air` cli on Windows breaks when providing nested paths to `build.bin`
- Proxy doesn't forward websocket connections/messages HOT 5
- Browser reload script not injected on proxy port HOT 11
- Inconsistent Install Recommendations in English and Chinese READMEs HOT 1
- Moving 'air' to Organization HOT 7
- Changing project link HOT 1
- What's the point of `root`?
- Cannot `go install github.com/air-verse/air@latest` HOT 13
- How to Disable "Process Exit with Code 0" Message?
- Fix to a problem when using podman-compose to run Air
- Issue when compiling static files
- add option to ignore the default .air.toml, for usage with "templ generate --notify-proxy"
- Process is orphaned rather than shut down when air exits HOT 3
- Returning HTML breaks proxy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air.