Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on startup after docker image update #2491

Closed
2 tasks done
MarvinJWendt opened this issue Dec 2, 2022 · 6 comments · Fixed by #2503
Closed
2 tasks done

Crash on startup after docker image update #2491

MarvinJWendt opened this issue Dec 2, 2022 · 6 comments · Fixed by #2503

Comments

@MarvinJWendt
Copy link

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

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
Copy link
Author

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

@spuniun
Copy link

spuniun commented Dec 2, 2022

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
Copy link
Contributor

ruslandoga commented Dec 3, 2022

👋 everyone

It seems to be related to docker/build-push-action#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={}

ukutaht pushed a commit that referenced this issue Dec 5, 2022
### Changes

This PR adds a fallback to empty build metadata when BUILD_METADATA
contains invalid JSON.

Example `warning` log for `BUILD_METADATA={...}`:

```
20:57:57.872 [warning] failed to parse $BUILD_METADATA, reason: ** (Jason.DecodeError) unexpected byte at position 1: 0x2E (".")
```

Fixes #2491

### Tests
- [x] This PR does not require tests

### Changelog
- [ ] Entry has been added to changelog

### Documentation
- [x] This change does not need a documentation update

### Dark mode
- [x] This PR does not change the UI
@ruslandoga ruslandoga reopened this Dec 5, 2022
@ruslandoga
Copy link
Contributor

ruslandoga commented Dec 5, 2022

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

@sobolevdmitry
Copy link

Seems to work with v1.4.4

@ruslandoga
Copy link
Contributor

v1.5.1 has been released with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants