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

region detection #4

Closed
chloke opened this issue May 15, 2023 · 7 comments
Closed

region detection #4

chloke opened this issue May 15, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@chloke
Copy link

chloke commented May 15, 2023

Hey, sorry for not answering your last request on time.
I just tested it and saw the reason for the error in the log.
The problem is that your code adds the country code to the url instead of the region.
For example I live in Germany so my country code is DE. The url your plugin is trying to connect to is now app-api-de.dreo-cloud.com
but every dreo account in a country in Europe shares the same url which is app-api-eu.dreo-cloud.com.
So the current region detection code won't work unfortunately.
I guess the easiest solution would be to check if a connection to the us servers is successful, if not use the eu url, regardless of the country code.

@chloke chloke added the bug Something isn't working label May 15, 2023
@NTK421
Copy link

NTK421 commented May 24, 2023

What's going on with this issue. I'm having the same error when starting the plugin. I'm in the UK

@czitooo
Copy link

czitooo commented May 24, 2023

With respect for having this plugin available at all... for a 'verified' plugin this really should have been sorted by now since it's a fairly simple fix.
I'm also in the UK and changing the region to 'eu' manually (eg. 'app-api-eu.dreo-cloud.com') works instantly by going into the code, as mentioned by @chloke
The best fix surely is just let the user select the correct region upon setup since many countries are grouped together?

Repository owner deleted a comment from NTK421 May 25, 2023
@zyonse
Copy link
Owner

zyonse commented May 25, 2023

I took another look at the API calls that the app makes when connecting to the Dreo servers, and it looks like the app keeps an internal list of what countries/regions are assigned to each server. Going to try to implement similar logic in the plugin.

Also let's try to keep the comments constructive here.

@zyonse
Copy link
Owner

zyonse commented May 25, 2023

@czitooo Can you test the code I just pushed?

edit: published as v2.0.2

@daveramirez5
Copy link

It worked for me from Mexico

@zyonse zyonse self-assigned this May 26, 2023
@NTK421
Copy link

NTK421 commented May 26, 2023

Worked for me perfectly in the UK

@czitooo
Copy link

czitooo commented May 26, 2023

@zyonse Works perfectly, nicely done 👍

@zyonse zyonse closed this as completed May 26, 2023
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

5 participants