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

[BUG]: Running magic self-update while on a VPN will hang #267

Open
tristanbiesecker opened this issue Dec 17, 2024 · 6 comments
Open

[BUG]: Running magic self-update while on a VPN will hang #267

tristanbiesecker opened this issue Dec 17, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@tristanbiesecker
Copy link

Bug description

When running magic self-update while on a VPN (in my case ProtonVPN) the command will hang indefinitely. It might be nice to either implement a fix that allows for running this command on a VPN, or exit the command with some error information.

Steps to reproduce

  1. Connect to a VPN.
  2. Run magic self-update.

Screenshot from 2024-12-16 21-31-30

System information

- What OS did you do install MAX on?
Distributor ID:	Linuxmint
Description:	Linux Mint 22
Release:	22
Codename:	wilma

- Magic version (nothing else is installed globally).
magic 0.5.1 - (based on pixi 0.37.0)
@tristanbiesecker tristanbiesecker added the bug Something isn't working label Dec 17, 2024
@tristanbiesecker
Copy link
Author

tristanbiesecker commented Dec 17, 2024

I confirmed this morning that this problem isn't limited to magic self-update. It also seems to fail for any magic command (e.g., magic run mojo --version or magic shell). As I mentioned on Discord, this is a pretty annoying problem as I'm someone who usually always has a VPN running, and this would require me to disable my VPN to effectively develop with Mojo.

@ehsanmok
Copy link
Member

Thanks for reporting! we'll look into it.

@zbowling
Copy link
Contributor

can you try echo "enabled = false" >> ~/.modular/otel.cfg try running again?

@tristanbiesecker
Copy link
Author

@zbowling just tried that but it unfortunately didn't change anything.

@zbowling
Copy link
Contributor

zbowling commented Dec 24, 2024

I pushed a pre-release build of magic 0.6.0 that will likely resolve the deadlocking issue a few people have been hitting.

You can install this, assuming magic isn't deadlocking for you, with magic self-update --prerelease.

If it is I made a script to directly reinstall this pre-release:

curl -ssL https://gist.githubusercontent.com/zbowling/4153d8db6dc98ff4ecd73fbe65f4df92/raw/55d9a64273c68b38d6b7d9a19911b27ab9d4d46f/fetch.sh | bash

Then before invoking this new magic build run "export MAGIC_TELEMETRY=false" in your shell before invoking any commands and see if that resolves it for you.

It seems our telemetry framework hangs magic rather than timing out when it can't reach our telemetry server in specific network setups (for reasons we haven't identified or when be able to reproduce locally) or initializing on a background thread like it supposed (a bug in that framework), even when you disable telemetry. In the next release we will probably replace it.

@tristanbiesecker
Copy link
Author

I'll try this again once 0.6.0 of magic is released and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants