phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

Phrase CLI force Mac M2 to crash #114

Closed CevinEichnau closed 1 year ago

CevinEichnau commented 2 years ago

Hey Phrase Team, i am struggling currently with the phrase init command. The command takes 1 minute before he ask me for the token. if i enter the token, he told me that the client got a timeout while fetching the project list. Then my mac is kind of crashed. Applications with internet access are not responding, chrome self is responding but if i try to reload a page, also nothing happends. Like the internet is very slow. so have to hard shut up my mac in this case. i tested it 5 times. every time the same issue. i work with a MacBook Pro 2022 with M2 Chip.

did you have any idea whats going wrong or how i can find out whats wrong?

thank you.

github-actions[bot] commented 2 years ago

Hi there,

Thanks for reaching out to us.

I'm sorry to hear about this!

Could you please try to use the amd64 release and run it with Rosetta? https://github.com/phrase/phrase-cli/releases/download/2.5.1/phrase_macosx_amd64.tar.gz

Please let me know if this works. Thank you!

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica

CevinEichnau commented 2 years ago

First, thanks for the very fast Answer! i tried the amd64 release and got the same behaviour. Just to be sure, steps to reproduce on my side.

Start Terminal with Rosetta. uninstalled homebrew version of phrase cli Download the amd64 release, make it executable. do phrase init with the amd64 release.

again the command is waiting one minute before asking for token. then he tries to load projects. after 2-3 minutes i got this message: "Error: Get "https://api.phrase.com/v2/projects?page=1&per_page=100": dial tcp: i/o timeout". and then the most programms on my mac are not responding or dont has any internet connection.

github-actions[bot] commented 2 years ago

Hello,

Apologies for not getting back to you earlier on this issue! I wasn't notified about your response, I'm sorry.

The Engineering Team is looking into this. I will let you know as soon as I have updates.

Best, Domenica from the Phrase Technical Support Team

Comment by Henning

CevinEichnau commented 1 year ago

Okay after a long exchange with the support (thanks for that) we came to the conclusion that the developers can not reproduce the bug and therefore unfortunately can not do anything for me.

The assumption was that maybe something with my firewall etc. could not be right. But when I fetch the project list manually via curl, I get everything I need. Also, even the "phrase info" command doesn't work, which shouldn't make a call.

i checked out the project locally and executed the commands via go. they work without problems. only with the finished package i have the problems.

Until I can spend more time again, I now use the not built version via go. thanks again for the effort and the attempt of the help

tomsabin commented 1 year ago

I've recently ran into this problem when setting up a new project with Phrase:

% phrase init
Loading projects...  
Error: Get "https://api.phrase.com/v2/projects?page=1&per_page=100": dial tcp: i/o timeout

Same response (dial tcp: i/o timeout) when I try phrase pull on an existing and previously working project.

I'm using Phrase CLI v2.5.3 (latest) on a 2020 Intel MacBook (so the issue is not specific to M2 it seems).

tomsabin commented 1 year ago

This turned out to be an DNS issue, so following the steps at this guide (https://developers.google.com/speed/public-dns/docs/using) has resolved the issue, and I'm able to run the phrase commands again. I'm not entirely sure why this problem was so specific to Phrase's CLI, but at least there's a workaround for now.

github-actions[bot] commented 1 year ago

Hello Cevin and Tom,

Thank you for updating this thread! As Cevin already mentioned, we have been in touch for quite a while, but unfortunately we couldn't reproduce this issue on any of our Mac (we tested both on M1 and M2). Our engineers tested this multiple times but never got such an error.

Great to hear you figured out that this was all caused by a DNS issue and you are now able to run the phrase commands.

Thank you for your collaboration and patience.

Have a great weekend!

Best, Domenica from the Phrase Technical Support Team

Comment by Domenica

Zeboch commented 1 year ago

Just for the record, I had the exact same issue as @CevinEichnau Using the Phrase CLI v2.5.3 on a MacBook Pro M1 from 2020.

Trying the DNS fix and updating to the last version of the binary.

Fixed when using the last version from Homebrew, currently 2.6.4.