rabbibotton / clog

CLOG - The Common Lisp Omnificent GUI
Other
1.51k stars 104 forks source link

Trouble deploying to Heroku #48

Closed hackeryarn closed 3 years ago

hackeryarn commented 3 years ago

I've tried to deploy the second tutorial to Heroku using two different build packs (one based on roswell https://gitlab.com/bendersteed/heroku-buildpack-common-lisp and then the other not https://github.com/hackeryarn/heroku-buildpack-cl). Both seem to end up with the same error, post build, when trying to start the application:

2021-03-13T18:16:51.233423+00:00 app[web.1]: Listening on port 38633
2021-03-13T18:16:51.240923+00:00 app[web.1]: Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
2021-03-13T18:16:51.240925+00:00 app[web.1]:                                     {10030D8103}>:
2021-03-13T18:16:51.241101+00:00 app[web.1]:   :HUNCHENTOOT is unknown handler.
2021-03-13T18:16:51.241102+00:00 app[web.1]: 
2021-03-13T18:16:51.241194+00:00 app[web.1]: Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10030D8103}>
2021-03-13T18:16:51.241534+00:00 app[web.1]: 0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "~S is unknown handler." {10030F13A3}> #<unused argument> :QUIT T)
2021-03-13T18:16:51.241731+00:00 app[web.1]: 1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "~S is unknown handler." {10030F13A3}>)
2021-03-13T18:16:51.241820+00:00 app[web.1]: 2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "~S is unknown handler." {10030F13A3}>)
2021-03-13T18:16:51.241934+00:00 app[web.1]: 3: (ERROR "~S is unknown handler." :HUNCHENTOOT)
2021-03-13T18:16:51.242069+00:00 app[web.1]: 4: (CLACK.UTIL:FIND-HANDLER :HUNCHENTOOT)
2021-03-13T18:16:51.242545+00:00 app[web.1]: 5: (CLACK:CLACKUP #<FUNCTION (LAMBDA (CLOG-CONNECTION::ENV) :IN CLOG-CONNECTION:INITIALIZE) {10030EEA2B}> :ADDRESS "0.0.0.0" :PORT 38633)
2021-03-13T18:16:51.242741+00:00 app[web.1]: 6: (CLOG-CONNECTION:INITIALIZE #<FUNCTION CLOG::ON-CONNECT> :HOST "0.0.0.0" :PORT 38633 :BOOT-FILE "/boot.html" :STATIC-ROOT #P"/tmp/codon/tmp/cache/quicklisp/dists/quicklisp/software/clog-20210228-git/./static-files/")
2021-03-13T18:16:51.242935+00:00 app[web.1]: 7: (HEROKU-TOPLEVEL)
2021-03-13T18:16:51.243046+00:00 app[web.1]: 8: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
2021-03-13T18:16:51.243144+00:00 app[web.1]: 9: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-IMPL::START-LISP))
2021-03-13T18:16:51.243207+00:00 app[web.1]: 10: (SB-IMPL::START-LISP)
2021-03-13T18:16:51.243239+00:00 app[web.1]: 
2021-03-13T18:16:51.243240+00:00 app[web.1]: unhandled condition in --disable-debugger mode, quitting

Here is the application repo: https://github.com/hackeryarn/chat

I would really appreciate any help.

I am also happy to write this up as part of clog's documentation once I have things working.

rabbibotton commented 3 years ago

I am unfamiliar with heroku although interested. I probably won't have a chance to look in to this for a few weeks. Did you try requesting support with the buildpack authors?

hackeryarn commented 3 years ago

Thanks for takings a look. Seems that it was an issue with the way clog gets bundled when statically compiled.

I had to include both hunchtoot and clack-handler-hunchentoot as explicit dependencies. Once I did that, everything worked as expected.

Also, a related note on static compilation, I had to use a custom :static-root in intitlize.