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-06-29
Star Count 337
Watcher Count 13
Fork Count 66
Issue Count 2

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Improve output of `AssertNotSameElements` 0 2022-04-06 2022-06-30
Recolor `Regex Pattern` object to magenta in `AssertNoRegexp` 0 2022-04-06 2022-05-01
[Bug]: Monal alpha unexpected notifications showing, many crash reports 3 2021-12-17 2022-05-15
Expose screenshot args? 4 2020-11-30 2022-06-28
Emojis are not rendered any way to fix that ? 1 2020-07-31 2022-06-28
passwordless_otp option in grant_types option for clients. 7 2022-04-04 2022-06-13
How to determine the optimal number of topics? 3 2021-04-13 2022-04-01
humility needs a rust-toolchain.toml 0 2021-12-07 2022-03-10
希望添加网易云音乐和mcbbs的签到功能 1 2022-06-05 2022-06-16
有道云笔记本签到提示 获取账号信息失败 list index out of range 5 2022-05-19 2022-06-24
HTTPSConrvyionPool的Max reties exceed问题 0 2022-06-13 2022-06-16
docker-compose布署,怎么自定义签到时间呢? 0 2022-06-15 2022-06-16
爱奇艺的只跑成长值,不签到,网易云的这几天失效了 0 2022-03-19 2022-06-24
52pojie和ACFUN签到不行了,还望作者大大可以添加优酷签到。 0 2021-12-26 2022-06-24
Docker issues 1 2018-07-11 2021-12-21
EmulationStation Desktop Edition - Opening a rom in flatpak not working CLI 5 2022-04-07 2022-05-20
为什么 Linux 默认页大小是 4KB - 面向信仰编程 · /whys-the-design-linux-default-page 8 2020-05-28 2022-06-24
为什么数据库不应该使用外键 - 面向信仰编程 · /whys-the-design-database-foreign-key 21 2020-06-02 2022-06-24
处理器感知线程管理系统 · OSDI 2018 - 面向信仰编程 · /papers-arachne 9 2020-06-11 2022-06-24
git-lfs does not track empty files 19 2017-07-27 2022-06-25
["Link" extension] How use link without "rel" attribute? 2 2020-12-17 2022-05-27
Series.new should handle typed array and buffer inputs 0 2021-07-02 2022-07-06
Problems with adding operator 1 2021-12-07 2022-06-25
There is a UI issue on forget password page 1 2022-03-04 2022-06-12
Strapi v4 : Strapi custom plugin data doesn’t display on result page 1 2022-03-29 2022-06-30
How to get the return value of system operation? 0 2021-09-01 2022-06-28
How to overwrite default recipe 2 2021-11-28 2022-07-05
support viewcore 0 2021-11-25 2022-01-23
Can't get the cosmos client to work - any ideas? 10 2019-12-17 2022-06-30
Installation instructions are outdated 0 2021-10-12 2022-06-13
Openstack VM creation timeout 0 2021-07-20 2022-05-12
Add ElementaryOS to distribution list for certificate installation 1 2021-04-05 2022-02-10
[Feature]: 通过Scheme URL唤起程序并进行搜索 6 2022-02-15 2022-05-11
As a user, I can download Foreign layers 2 2021-12-15 2021-12-22
[Android] java.lang.NoSuchMethod exception: getActiveNotifications() is available only in API level 23 and later 1 2022-05-19 2022-06-16
Too many Crashes due to java.lang.OutOfMemoryError 3 2022-05-04 2022-06-16
Mobile Notifications Version 2.0.1: Android - Fatal Exception: java.lang.Error 1 2022-05-02 2022-06-16
Getting bunch of errors while integrating unity as library into ios native project, in which both unity and native project contains Firebase libraries. 2 2021-11-22 2022-06-16
Improve SEO 0 2013-11-03 2021-11-10
Use lowestKey in getRange methods 0 2021-08-05 2022-02-03
[New metric] Add `ChrF++` 0 2021-11-24 2022-01-02
Codepush not working from my Google Play App store version 13 2019-07-09 2022-05-21
create a story in the Colab notebook 12 2021-03-15 2022-06-23
表格不支持拖拽、编辑等功能 2 2021-02-07 2022-01-23
nat回环突然失效了 0 2021-12-22 2022-01-13
How can build application for using live camera to get iris depth info from windows desktop? 12 2022-03-17 2022-05-20
final tensor for multiple objects in one cell 1 2019-12-10 2022-03-20
Scaffold Generate 3 2021-01-06 2022-01-13
多媒体库所有文件夹同步问题 5 2018-04-14 2022-01-14
[API Proposal]: Specify supported custom type marshalling features on CustomTypeMarshallerAttribute 2 2022-03-02 2022-03-05