phrase / phrase-cli

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

Unable to login after Android Studio Update #125

Closed CebotariM closed 1 year ago

CebotariM commented 1 year ago

Hi, i updated AS to the latest version:

image

after which phrase plugin stopped working:

image

no changes were made on server, or local config Steps tried :

jablan commented 1 year ago

hi @CebotariM, regarding the 404 error, how does your .phrase.yml look like?

Regarding the "invalid token", is the token created on us.app.phrase.com or app.phrase.com? The API must match the app the token was created in.

CebotariM commented 1 year ago

hi @jablan, thanks for your reply. Here is my .phrase.yml:

the token is created on us.app.phrase.com

theSoenke commented 1 year ago

Hi @CebotariM, I hope it's okay that I've removed the screenshot because with a bit of guessing it might have been possible to extract the token. I would also suggest to disable the token to be safe.

When you're using the US datacenter you can select it in the config by setting:

phrase:
  host: https://api.us.app.phrase.com/v2
CebotariM commented 1 year ago

Thanks for your suggestion, and removing the screens, unfortunately adding the host in config did not change anything. My assumption is maybe it is something related with the AS plugin? Will keep investigating

jablan commented 1 year ago

@CebotariM can't be related with AS if you keep getting the error even when invoking phrase manually. just to confirm, you are getting the same 404 error even when running it manually from the directory where .phrase.yml is (with host set in it)?

CebotariM commented 1 year ago

No, if i run cli in the project folder, i get this: image now i know that is says that the token is not valid, but i dont think that is the problem, because the same token works for the iOS project, and nothing has changed in the project

jablan commented 1 year ago

both errors suggest that there is some confusion between the DCs.

please double-check that

1) the token is created on the same app whose API is used 2) the project with the given ID exists in the same DC

However, we did discover that the AS plugin does not work with custom host parameter in the configuration file, and we opened an internal ticket to fix that.

CebotariM commented 1 year ago

Hi @jablan, thanks for your investigation and effort. Fortunately (or not) it was a project administration issue, a certain someone changed the tokens and forgot to notify the devs. Sorry to take your time :)