One android application accessing two subdomains.
The use case is: when launching the application the user is accessing the homepage https://choice.eu.app.example.
This homepage is a small html with simple javascript site. It also imports Turbo to be compatible with the turbo-android application.
There he can select a region to connect to.
Depending on his choice he will be redirected to a rails application serving its region, https://us.app.exampleor https://eu.app.example
Now we want to provide an android application using turbo-android. Actually we already have on pointing to https://eu.app.example that is working great.
We changed the HOME_URL form https://eu.app.example to https://choice.eu.app.example.
The BASE_URL is still https://eu.app.example.
We updated the isNavigable method to check the app.example domain to allow navigation.
Issue
When opening the application the https://choice.eu.app.example is displayed correctly in the mobile application.
But when we select a region the mobile application performs a lot of requests, looking like loops and finishes by displaying the
https://eu.app.example/u/sign_in page (when user not logged in).
I don't understand why it performs 4 additional sets of requests, especially since it has the page to display on the second request it performs. This results in a lot of spinning and delay in the mobile application.
I even tried with the demo application. Same result.
I don't understand why it loops on those urls, why it stops at some point nor how to debug it.
Here are the logs of the application. You can see the first two visitProposedLocation that I suppose correct. And then more visitPropopsedLocation that points to the same urls as the first two visitProposedLocation.
Versions:
turbo
7.3.0
turbo-android7.0.0-rc18
Context
One android application accessing two subdomains. The use case is: when launching the application the user is accessing the homepage
https://choice.eu.app.example
. This homepage is a small html with simple javascript site. It also imports Turbo to be compatible with the turbo-android application. There he can select a region to connect to. Depending on his choice he will be redirected to a rails application serving its region,https://us.app.example
orhttps://eu.app.example
Now we want to provide an android application using turbo-android. Actually we already have on pointing to
https://eu.app.example
that is working great.We changed the
HOME_URL
formhttps://eu.app.example
tohttps://choice.eu.app.example
. TheBASE_URL
is stillhttps://eu.app.example
. We updated theisNavigable
method to check theapp.example
domain to allow navigation.Issue
When opening the application the https://choice.eu.app.example is displayed correctly in the mobile application. But when we select a region the mobile application performs a lot of requests, looking like loops and finishes by displaying the
https://eu.app.example/u/sign_in
page (when user not logged in).I don't understand why it performs 4 additional sets of requests, especially since it has the page to display on the second request it performs. This results in a lot of spinning and delay in the mobile application.
I even tried with the demo application. Same result.
I don't understand why it loops on those urls, why it stops at some point nor how to debug it.
Here are the logs of the application. You can see the first two visitProposedLocation that I suppose correct. And then more visitPropopsedLocation that points to the same urls as the first two visitProposedLocation.