-
Notifications
You must be signed in to change notification settings - Fork 41
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
Latest release breaks production release #37
Comments
@PaulOstazeski Thanks for opening this issue. We are investigating this now. 🔍 |
@PaulOstazeski could you please give us a bit more detail about the target environment where you are running your app? We have a demo version of this app: https://github.com/dwyl/elixir-auth-google-demo When we attempt to run We see the following output:
Then when we run Thanks. |
@PaulOstazeski can you please try using |
Sure, I've got a bare-bones reproduction here. This was extracted from the project where we saw the issue and is using the same build script. The actual app is hosted on render.com. The README in the repo I'm sharing contains the steps to trigger the error. |
I've kept researching, and I've found some seemingly similar issues elsewhere (or at least cases where folks found that the Mix module wasn't/isn't available in production).
|
Yeah, that's really annoying. I wouldn't have expected it to throw an |
Yes, that does work. Thanks. |
@PaulOstazeski thanks for confirming that adding |
I just hit this issue as well, and can confirm the This seems like it's more of a workaround though, since it's not usually necessary to include mix in production releases. Instead, it's possible to store this information at compile time so that there's no opportunity for a runtime error: @compile_env Mix.env()
def inject_poison() do
@compile_env == :test && ElixirAuthGoogle.HTTPoisonMock || HTTPoison
end Happy to validate and open a PR if you'd like! |
@jtormey if you have time, please open a PR adding this to the |
https://hex.pm/packages/elixir_auth_google/1.4.0 contains the update made by @jtormey with compile-time checking. |
Hi. In production runtimes (at least using
MIX_ENV=prod mix release
),Mix
is not available. This causes the following error in v1.1.1(https://github.com/dwyl/elixir-auth-google/releases/tag/v1.1.1).I believe this came from #36.
The text was updated successfully, but these errors were encountered: