plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19.69k stars 1.05k forks source link

Crash on startup after docker image update #2491

Closed MarvinJWendt closed 1 year ago

MarvinJWendt commented 1 year ago

Past Issues Searched

Issue is a Bug Report

Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

Plausible crashes on startup.

I updated the image to the latest version, which was pushed about an hour ago. I cannot start my plausible instance anymore, and I get a bad gateway error:

Error:

analytics-plausible  | init terminating in do_boot ({,[{Elixir.Jason,decode!,2,[{_},{_},{_}]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,expr,5,[{_},{_}]},{elixir,recur_eval,3,[{_},{_}]},{elixir,eval_forms,3,[{_},{_}]},{Elixir.Code,validated_eval_string,3,[{_},{_}]},{Elixir.Config,__eval__!,3,[{_},{_}]},{Elixir.Config.Reader,read!,2,[{_},{_}]}]})
analytics-plausible  |
analytics-plausible  | Crash dump is being written to: erl_crash.dump...done
analytics-plausible  | ERROR! Config provider Config.Reader failed with:
analytics-plausible  | ** (Jason.DecodeError) unexpected byte at position 38: 0x70 ("p")
analytics-plausible  |     lib/jason.ex:92: Jason.decode!/2
analytics-plausible  |     (stdlib 3.17.1) erl_eval.erl:685: :erl_eval.do_apply/6
analytics-plausible  |     (stdlib 3.17.1) erl_eval.erl:446: :erl_eval.expr/5
analytics-plausible  |     (elixir 1.13.4) src/elixir.erl:296: :elixir.recur_eval/3
analytics-plausible  |     (elixir 1.13.4) src/elixir.erl:274: :elixir.eval_forms/3
analytics-plausible  |     (elixir 1.13.4) lib/code.ex:404: Code.validated_eval_string/3
analytics-plausible  |     (elixir 1.13.4) lib/config.ex:260: Config.__eval__!/3
analytics-plausible  |     (elixir 1.13.4) lib/config/reader.ex:92: Config.Reader.read!/2

Expected behavior

No crash on startup.

Screenshots

No response

Environment

- OS: Docker
- Browser: Not relevant
- Browser Version: Not relevant
- Plausible Version: latest docker image (pushed an hour ago)
MarvinJWendt commented 1 year ago

PS: Manually downgrading to v1.4 solved the issue. But it crashes with v1.5.

spuniun commented 1 year ago

Confirmed that the latest and 1.5 tags from docker hub are not working. Curious that the image size is half that of 1.4

ruslandoga commented 1 year ago

👋 everyone

It seems to be related to https://github.com/docker/build-push-action/issues/726


A quick fix is to set BUILD_MATEDATA to {} in plausible-conf.env

...
BASE_URL=replace-me
SECRET_KEY_BASE=replace-me
+ BUILD_METADATA={}
ruslandoga commented 1 year ago

I've reopened the issue to make it more visible. I'll close it again once the container image is updated.

sobolevdmitry commented 1 year ago

Seems to work with v1.4.4

ruslandoga commented 1 year ago

v1.5.1 has been released with a fix.