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

EPIC: Language List unavailable for some domain and the program does not open #1582

Open
foxprogs opened this issue May 30, 2023 · 20 comments
Open
Assignees
Labels

Comments

@foxprogs
Copy link

foxprogs commented May 30, 2023

Seems like td.unfoldingword.org is blocked from certain locations. We'll have to make a change to the tcCreate app so that the Language List is available to the users.

RU GL region does not have access to this file https://td.unfoldingword.org/exports/langnames.json
It turns out only if I use vpn. Therefore, the program cannot be started.
изображение

@jacobwegner
Copy link

Hi @foxprogs. Could you please provide the error in the console related to this CORS failure?

And could you please try running a test using the link below?

https://www.test-cors.org/#?client_method=GET&client_credentials=true&server_url=https%3A%2F%2Ftd.unfoldingword.org%2Fexports%2Flangnames.json&server_enable=true&server_status=200&server_credentials=false&server_tabs=remote

When I use that site (from a US-based IP address), I see the following:

image

@jacobwegner
Copy link

I also just ran a test from https://create.translationcore.com/ in a Chrome console that succeeded:

fetch('https://td.unfoldingword.org/exports/langnames.json');
image

@foxprogs
Copy link
Author

foxprogs commented Jun 2, 2023

@jacobwegner
изображение
Is it right?

@foxprogs
Copy link
Author

foxprogs commented Jun 2, 2023

@jacobwegner I don't have chrome but I have Brave.
изображение

@jacobwegner
Copy link

@foxprogs Thanks for the screenshots. So the last screenshot it looks to be a time out error (and I don't see the request in the logs).

If you're able to reproduce the original CORS error from your first comment (#1582 (comment)) that might also be hepful.

You mentioned that you can access the file from a VPN. When the VPN is disabled, is there any other kind of proxy or DNS configuration you're using?

Put another way, when the VPN is disabled, can you reach the main homepage for translationDatabase:

https://td.unfoldingword.org/

@jacobwegner
Copy link

I just did another test from my US-based IP in Brave and didn't have any issues loading the URL:

image

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

@jacobwegner The first screenshot was taken with firefox. There is also a timeout, if you look at the scale, you can see that more than 90 seconds have passed. It is possible that firefox somehow determines the type of error in a different way, and therefore he wrote that cors. From our region, there is no access not only to this file, but in principle to https://td.unfoldingword.org. I can only open this with vpn. For example, everything works with Georgia.

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

@jacobwegner The site does not open not only for me. I tried with the provider at my place, with mobile internet. They can't open from other cities either. Most likely due to sanctions, access to the resource is somehow blocked.

@yakob-aleksandrovich
Copy link

yakob-aleksandrovich commented Jun 5, 2023

@foxprogs Can you check if the whole unfoldingword.org domain is blocked, or just the TD host? Does www.unfoldingword.org open?

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

@foxprogs Can you check if the whole unfoldingword.org domain is blocked, or just the TD host? Does www.unfoldingword.org open?

@yakob-aleksandrovich TD host only

@yakob-aleksandrovich
Copy link

@jacobwegner Thanks for figuring out it had nothing do with CORS, but with a timeout. We'll have to work around the blockage, somehow, probably we'll need to setup the file at a different location, which requires a change to tcCreate.

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

@jacobwegner @yakob-aleksandrovich Thank you. I'm sorry that I didn't accurately describe the error. It was necessary to me to specify at once that does not open because of a timeout.

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

@jacobwegner
изображение

@foxprogs
Copy link
Author

foxprogs commented Jun 5, 2023

And this domain works great https://translation-database.herokuapp.com/

@elsylambert elsylambert changed the title the program does not open Language List unavailable for some domain and the program does not open Jun 9, 2023
@elsylambert
Copy link
Contributor

elsylambert commented Jun 12, 2023

Workaround Option 1: Use https://td2.unfoldingword.org/exports/langnames.json instead of https://td.unfoldingword.org/.
Option 2: Can we make this be configured for future? Using two Parameters- Server and timeout.
Option 3: Multiple servers configured, and trying them in a timeout methodology.
Option 4: Use DCS directly.
uw-languages-rcl

@PhotoNomad0 PhotoNomad0 changed the title Language List unavailable for some domain and the program does not open EPIC: Language List unavailable for some domain and the program does not open Jun 13, 2023
@abelpz
Copy link
Member

abelpz commented Jul 26, 2023

@elsylambert @birchamp I think this is fixed.

@yakob-aleksandrovich
Copy link

We have td2 and td3 available, of course.
But a better option is Rich's solution: https://qa.door43.org/api/v1/languages/langnames.json
This basically pulls it through the DCS API system.
More info: https://unfoldingword.zulipchat.com/#narrow/stream/311721-Infrastructure---ST/topic/td.2Eunfoldingword.2Eorg/near/393731146

@yakob-aleksandrovich
Copy link

On top of that, it would be good to have this

  • configurable through an env/build variable in tC Create
  • be able to loop through various options, checking for timeouts (or would that be overkill)?

@richmahn
Copy link
Member

We have td2 and td3 available, of course. But a better option is Rich's solution: https://qa.door43.org/api/v1/languages/langnames.json This basically pulls it through the DCS API system. More info: https://unfoldingword.zulipchat.com/#narrow/stream/311721-Infrastructure---ST/topic/td.2Eunfoldingword.2Eorg/near/393731146

Yes, this is now available in production https://git.door43.org/api/v1/languages/langnames.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants