I have a simple Docker container (repo link) that successfully launches on my local machine, but produces a Julia error when I attempt to run it on Heroku. It seems to be complaining that verbose is an unsupported keyword argument in HTTP.serve. Full error text at the bottom of this message.
This is the same example file found in @amellnik’s Joseki.jl repo (but with verbose enabled in HTTP.serve).
Steps to reproduce:
(These are also found with more description in the github repo readme)
git clone https://github.com/milesfrain/JosekiHerokuExample.git
cd JosekiHerokuExample
heroku login
heroku container:login
HEROKU_APP_NAME="my-app-name"
heroku create $HEROKU_APP_NAME
heroku container:push web --app $HEROKU_APP_NAME
heroku container:release web --app $HEROKU_APP_NAME
heroku logs --tail --app $HEROKU_APP_NAME
Observe this error:
LoadError: MethodError: no method matching listen(::getfield(HTTP.Handlers, Symbol("##4#5")){HTTP.Handlers.Router{Symbol("##363")}}, ::String, ::String; verbose=true)
Closest candidates are:
listen(::Any, ::Union{String, IPAddr}) at /joseki_demo/.julia/packages/HTTP/U2ZVp/src/Servers.jl:206 got unsupported keyword argument "verbose"
listen(::Any, ::Union{String, IPAddr}, !Matched::Integer; sslconfig, tcpisvalid, server, reuseaddr, connection_count, rate_limit, reuse_limit, readtimeout, verbose) at /joseki_demo/.julia/packages/HTTP/U2ZVp/src/Servers.jl:206
listen(::Any) at /joseki_demo/.julia/packages/HTTP/U2ZVp/src/Servers.jl:206 got unsupported keyword argument "verbose"
Stacktrace:
[1] #serve#3(::Bool, ::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:verbose,),Tuple{Bool}}}, ::Function, ::HTTP.Handlers.Router{Symbol("##363")}, ::String, ::String) at /joseki_demo/.julia/packages/HTTP/U2ZVp/src/Handlers.jl:345
[2] (::getfield(HTTP.Handlers, Symbol("#kw##serve")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(HTTP.Handlers.serve), ::HTTP.Handlers.Router{Symbol("##363")}, ::String, ::String) at ./none:0
[3] top-level scope at none:0
[4] include at ./boot.jl:326 [inlined]
[5] include_relative(::Module, ::String) at ./loading.jl:1038
[6] include(::Module, ::String) at ./sysimg.jl:29
[7] exec_options(::Base.JLOptions) at ./client.jl:267
[8] _start() at ./client.jl:436
in expression starting at /joseki_demo/launch-server.jl:46
Run the same container locally and observe no errors:
docker run --rm -p 8000:8000 registry.heroku.com/$HEROKU_APP_NAME/web