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

Plug dependency might be a blocker when importing auth_plug in new projects #76

Closed
LuchoTurtle opened this issue Oct 13, 2022 · 12 comments

Comments

@LuchoTurtle
Copy link
Member

I was trying to use this plug in a fork repo of Phoenix Chat App and I can't seem to be able to run mix deps.get properly with the latest version (1.4.14).

The repo I'm trying to import this into has all its dependencies updated, which makes this situation awfully weird.

Failed to use "plug" (versions 1.10.2 to 1.13.3) because
  auth_plug (version 1.4.14) requires ~> 1.13.4
  phoenix (version 1.6.14) requires ~> 1.10
  phoenix_ecto (version 4.4.0) requires ~> 1.9
  phoenix_html (version 3.2.0) requires ~> 1.5
  plug_cowboy (version 2.5.2) requires ~> 1.7

Failed to use "plug" (versions 1.13.4 to 1.13.6) because
  auth_plug (version 1.4.14) requires ~> 1.13.4
  phoenix (version 1.6.14) requires ~> 1.10
  phoenix_ecto (version 4.4.0) requires ~> 1.9
  phoenix_html (version 3.2.0) requires ~> 1.5
  ping (version 1.1.0) requires ~> 1.12.1
  plug_cowboy (version 2.5.2) requires ~> 1.7


Failed to use "telemetry" (versions 0.4.0 and 0.4.1) because
  ecto_sql (version 3.9.0) requires ~> 0.4.0 or ~> 1.0
  phoenix (version 1.6.14) requires ~> 0.4 or ~> 1.0
  phoenix_live_view (version 0.18.2) requires ~> 0.4.2 or ~> 1.0
  plug (versions 1.10.0 and 1.10.1) requires ~> 0.4
  swoosh (version 1.8.1) requires ~> 0.4.2 or ~> 1.0
  telemetry_metrics (version 0.6.1) requires ~> 0.4 or ~> 1.0


Failed to use "telemetry" (versions 0.4.2 and 0.4.3) because
  ecto_sql (version 3.9.0) requires ~> 0.4.0 or ~> 1.0
  phoenix (version 1.6.14) requires ~> 0.4 or ~> 1.0
  phoenix_live_view (version 0.18.2) requires ~> 0.4.2 or ~> 1.0
  plug (versions 1.10.0 and 1.10.1) requires ~> 0.4
  swoosh (version 1.8.1) requires ~> 0.4.2 or ~> 1.0
  telemetry_metrics (version 0.6.1) requires ~> 0.4 or ~> 1.0
  telemetry_poller (version 1.0.0) requires ~> 1.0

The error seems to stem from the plug dependency this package is using. It's the latest version but apparently other packages that I have constraint the plug versions I have between 1.10.2 to 1.13.3.

If we downgrade the plug dependency on this package to 1.13.13 (instead of 1.13.14), it should work, right?

Fixing this will probably fix #75 .

@LuchoTurtle LuchoTurtle changed the title Plug dependency might be a blocker when importing in new projects Plug dependency might be a blocker when importing auth_plug in new projects Oct 13, 2022
@nelsonic
Copy link
Member

@LuchoTurtle thank you very much for opening this issue. ✅
Yeah, this is is one of my biggest frustrations with Elixir / Hex. 🙄
If you have time, we could pair on looking at resolving this now. 👥 🧑‍💻
[ please bring your laptop to my desk when you're free ] 💻

@nelsonic
Copy link
Member

@LuchoTurtle please try: 1.4.15 Oct 13, 2022 🙏

@nelsonic
Copy link
Member

Package published to https://hex.pm/packages/auth_plug/1.4.16 📦

@LuchoTurtle
Copy link
Member Author

Thank you for the updates but it doesn't seem that downgrading the plug dependency is helping, so my hunch was wrong 😦

Failed to use "plug" (versions 1.10.2 to 1.13.1) because
  auth_plug (version 1.4.16) requires ~> 1.13.2
  phoenix (version 1.6.14) requires ~> 1.10
  phoenix_ecto (version 4.4.0) requires ~> 1.9
  phoenix_html (version 3.2.0) requires ~> 1.5
  plug_cowboy (version 2.5.2) requires ~> 1.7


Failed to use "plug" (versions 1.13.2 to 1.13.6) because
  auth_plug (version 1.4.16) requires ~> 1.13.2
  phoenix (version 1.6.14) requires ~> 1.10
  phoenix_ecto (version 4.4.0) requires ~> 1.9
  phoenix_html (version 3.2.0) requires ~> 1.5
  ping (version 1.1.0) requires ~> 1.12.1
  plug_cowboy (version 2.5.2) requires ~> 1.7


Failed to use "telemetry" (versions 0.4.0 and 0.4.1) because
  ecto_sql (version 3.9.0) requires ~> 0.4.0 or ~> 1.0
  phoenix (version 1.6.14) requires ~> 0.4 or ~> 1.0
  phoenix_live_view (version 0.18.2) requires ~> 0.4.2 or ~> 1.0
  plug (versions 1.10.0 and 1.10.1) requires ~> 0.4
  swoosh (version 1.8.1) requires ~> 0.4.2 or ~> 1.0
  telemetry_metrics (version 0.6.1) requires ~> 0.4 or ~> 1.0


Failed to use "telemetry" (versions 0.4.2 and 0.4.3) because
  ecto_sql (version 3.9.0) requires ~> 0.4.0 or ~> 1.0
  phoenix (version 1.6.14) requires ~> 0.4 or ~> 1.0
  phoenix_live_view (version 0.18.2) requires ~> 0.4.2 or ~> 1.0
  plug (versions 1.10.0 and 1.10.1) requires ~> 0.4
  swoosh (version 1.8.1) requires ~> 0.4.2 or ~> 1.0
  telemetry_metrics (version 0.6.1) requires ~> 0.4 or ~> 1.0
  telemetry_poller (version 1.0.0) requires ~> 1.0

@nelsonic
Copy link
Member

Man this is annoying. Please git commit your code and put is to a branch on dwyl (GitHub) so that I can git pull and try and get to the bottom of this without you having to hit your head against a brick wall ... 🧱

@nelsonic
Copy link
Member

Forking the repos is fine ... But it's much easier to collaborate if you create a branch on the original repo and push your changes up to GitHub. 🤞

@nelsonic
Copy link
Member

I've lowered the required version of plug to 1.13.2 attempting to avoid this issue ...
https://hex.pm/packages/plug/versions
image

Didn't wan to go below that as 1.13.1 and 1.13.0 were both retired (so might have bugs) and 1.12.1 is ancient at this point. 💭

@LuchoTurtle
Copy link
Member Author

Of course! We oughta have all of these updated, can't rely on old code!

Here's the branch so you can clone -> https://github.com/dwyl/phoenix-chat-example/tree/add-auth

I commented the line you ought to change so you can run mix deps.get

@nelsonic
Copy link
Member

Definitely going to take a look at this next. But working on dwyl/mvp#165 for now. ⏳

@nelsonic
Copy link
Member

Should be working as expected with the latest auth_plug.
Confirmed in: dwyl/auth_plug_example#46
Which deployed a to: https://auth-plug.fly.dev/admin

@nelsonic nelsonic removed the BLOCKED label Nov 17, 2022
@nelsonic nelsonic removed their assignment Nov 17, 2022
@nelsonic nelsonic moved this from In progress to Awaiting Feedback/Review in Nelson's List Nov 17, 2022
@LuchoTurtle
Copy link
Member Author

LuchoTurtle commented Nov 23, 2022

As shown in dwyl/phoenix-liveview-realtime-cursor-tracking-tutorial#12 (comment),
this issue should now be resolved.

Closing 👍

Nelson's List automation moved this from Awaiting Feedback/Review to Done Nov 23, 2022
@nelsonic
Copy link
Member

Thanks for confirming. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Nelson's List
  
Done
Status: Done
Development

No branches or pull requests

2 participants