unfoldingWord / tc-create-app

translationCore Create
https://create.translationcore.com/
MIT License
0 stars 5 forks source link

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

Open foxprogs opened 1 year ago

foxprogs commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

foxprogs commented 1 year ago

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

jacobwegner commented 1 year ago

@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 (https://github.com/unfoldingWord/tc-create-app/issues/1582#issue-1732678316) 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 commented 1 year ago

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

image
foxprogs commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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

foxprogs commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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.

jacobwegner commented 1 year ago

@foxprogs and @yakob-aleksandrovich: Another thing to try is with a different host name:

https://translation-database.herokuapp.com/

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

image
foxprogs commented 1 year ago

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

foxprogs commented 1 year ago

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

elsylambert commented 1 year ago

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

abelpz commented 11 months ago

@elsylambert @birchamp I think this is fixed.

yakob-aleksandrovich commented 9 months ago

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 commented 9 months ago

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

richmahn commented 6 months ago

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