Can't build caddy due to quic error

This issue has been created since 2022-04-28.

I am trying to build caddy with a few custom plugins using xcaddy. My build command is this:

xcaddy build \
        --with github.com/mholt/caddy-ratelimit \
        --with github.com/greenpau/caddy-trace \
        --with github.com/caddy-dns/cloudflare \
        --with github.com/abiosoft/caddy-json-parse \
        --with github.com/iamd3vil/caddy_yaml_adapter \
        --with github.com/abiosoft/caddy-json-schema \
        --output caddy

I have been trying to do this on clean golang containers. First I tried 1.18.1-alpine3.15 then 1.17.9-alpine3.15. In both cases the result is the same, it errors out with the following:

2022/04/28 03:47:53 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /go/caddy -ldflags -w -s -trimpath
# github.com/caddyserver/caddy/v2
/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/listeners.go:187:68: undefined: quic.EarlySession
2022/04/28 03:50:08 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-04-28-0346.3700484307
2022/04/28 03:50:08 [FATAL] exit status 2

I tried adding XCADDY_DEBUG=1 but that didn't change the output at all so no further insight. Not really sure what to do at this point so brought it here.

francislavoie wrote this answer on 2022-04-28

Hmm, is one of the plugins you're pulling in using a newer version quic-go than Caddy is using? Caddy is still on quic-go v0.26.0 but if something else is using v0.27.0, that won't work, since there was an API change.

mdegat01 wrote this answer on 2022-04-28

Hm looks like github.com/mholt/caddy-ratelimit does. It also says it requires 2.5.0 though which is confusing since it sounds like it doesn't actually work with 2.5.0 given that requirement. I guess its a bug with that plugin then?

EDIT: Oh wait, nvm, it replaces it with v0.26.0 after. I missed it at the bottom:
https://github.com/mholt/caddy-ratelimit/blob/73efe0ba63c955bd2190312ffdebf7497018dcfb/go.mod#L112
So still stumped again I suppose...

mdegat01 wrote this answer on 2022-04-28

Ah ok, its definitely ratelimit. Removing that one from the list causes it to build without issue. I'll take my issue over to that repo then, thanks for the help!

mholt wrote this answer on 2022-04-28

Wow, I didn't see that line either. Thanks for the heads up!

More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-08-04
Star Count 355
Watcher Count 13
Fork Count 67
Issue Count 2

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Misidentify images in error logging level parameters 1 2021-08-05 2022-07-06
the issue regarding site-level covariates must be constant.. 0 2021-06-22 2022-07-25
Lost Visibility to Separate MyNotes Tabs/Clipboards 3 2021-12-17 2022-04-29
json解析存在bug, 无法解析开头带有空白字符的json字符串 0 2022-04-20 2022-08-02
How can I use RecipientKeyIdentifier in a CMS EnvelopedData value? 22 2021-02-25 2022-07-30
messge log 'b' showing the log files 3 2021-01-28 2022-07-26
Super-RMB: Overview will be opened, if you activate a menu item with LMB while holding Super 2 2021-12-03 2022-08-03
Scale Loki to the moon 🌙 1 2022-05-06 2022-08-11
row of dataframe decreased after ".add_technical_indicator(config.INDICATORS)" in FinRL_China_A_Share_Market.py 1 2022-06-07 2022-07-31
Error on running image 36 2022-04-07 2022-07-18
TypeError: 'NoneType' object is not subscriptable in Nuke Mode while scanning recent community posts 4 2022-03-08 2022-07-22
Stopped working on project? 4 2022-03-07 2022-07-29
Multiple Configs not working 1 2022-03-08 2022-07-05
[ Bug ] On Stream, view creations should be postponed to the end 0 2022-04-29 2022-07-31
请问可以制作动漫之家的去广告规则吗? 2 2021-01-30 2022-01-20
error downloading arduino-language-server 1 2022-07-13 2022-08-05
Query - Github doesn't show any OAuth applications after registering HACS? 3 2021-09-20 2022-08-09
Call Buttons Sometimes Greyed Out 0 2022-04-22 2022-07-10
Cannot use ES6 import syntax in node 1 2022-04-27 2022-07-24
3.5.2 无法开启 prebundle 1 2022-08-10 2022-08-05
MongoDB error "connection pool paused" after updating to the last version of CAPE 8 2022-01-21 2022-07-20
No matching version found for @storybook/[email protected] 3 2022-01-12 2022-08-04
unnecessary "ENOENT" console.error when serving a spa 1 2021-07-08 2022-08-07
Refactor settings: Left indentation too large 9 2021-11-15 2022-07-27
Distinct action for Multiple DropZone in the same component 2 2021-02-04 2022-07-23
ln -sfn is NOT atomic 4 2012-06-17 2022-07-24
Crash when destroy LoggerProvider and TracerProvider 0 2022-03-04 2022-05-28
Installating v2.1.0 over older version in Ubuntu fails 3 2021-12-05 2022-08-06
WebSockets/WebRTC should turn off when scripts do on mobile 1 2017-07-17 2022-08-13
Discourage excessive origin counts 4 2017-06-28 2022-08-13
Pause downloading after a site has loaded too many bytes (#36) 2 2017-07-17 2022-08-13
Computed artifacts are recomputed accidentally 0 2021-11-23 2022-08-10
[BUG] ngx-boostrap 7.1.0 and bootstrap 3 modal stop working 2 2021-10-21 2022-07-22
Scylla boots considerably slower with Raft 10 2022-02-09 2022-07-10
Auto-Shop bot for telegram 0 2021-08-13 2022-08-06
Lyra fails to build in latest GitHub Actions virtual environment 2 2022-02-09 2022-08-04
Wrong variants parameters with multiple test references 0 2021-08-16 2022-07-02
feat-users-update 1 2021-08-29 2021-12-24
FAQ: why borg (esp. 1st backup) is slower than rsync 3 2022-02-16 2022-02-26
[automated] Merge branch 'release/2.1' => 'release/2.2' 0 2019-07-30 2022-08-11
[FEATURE]在未来有没有可能把UI自动化的基础功能下放给社区版本? 1 2022-05-24 2022-07-27
[QUESTION]如果MS版本升级,有没有一个全局的备份,之后我升级完,如果项目内容丢失,我直接导入就可以了?现在如果升级版本,需要做哪些备份工作? 3 2022-05-24 2022-07-27
DNS: client does not receive an NXDOMAIN when 1 of 3 servers times out 1 2021-01-19 2022-08-05
DNS Resolution host inside domain search cause problem 2 2021-01-07 2022-08-05
mtail got unexpect result when parse large log file contains utf8 unicode. 1 2022-04-18 2022-08-05
Add GitHub Action that builds WASM binary and creates GitHub Release 0 2021-10-05 2022-08-06
conflict key generated: shardingsphere/sharding-jdbc-core/src/main/java/com/dangdang/ddframe/rdb/sharding/keygen/DefaultKeyGenerator.java 3 2022-04-18 2022-06-30
How to get list of Forge Webhooks 0 2019-01-22 2022-08-06
REQUEST: New membership for PurneswarPrasad 5 2022-04-08 2022-08-08
problem with gulp-less compiling semantic-ui-less 1 2015-06-18 2022-07-21