AR-js-org / studio

An authoring platform to build Web Augmented Reality experiences, without coding knowledge
https://ar-js-org.github.io/studio/
MIT License
264 stars 69 forks source link

URLs generate in "HTTP" when personal github page (github.io) redirects to custom URL #76

Closed arturojreal closed 4 years ago

arturojreal commented 4 years ago

Recent test at https://github.com/arturojreal/ddb50-test-1hur3ri generates the following link:

http://arturojreal.com/ddb50-test-1hur3ri/

However, because the link that's generated is in HTTP instead of HTTPS, when opening on Chrome browser on Android, the visitor receives the following prompt:

Webcam Error Name: Message: Web RTC issue-! navigator.mediaDevices not present in your browser

After adding the "s" to "https" in the generated URL, the experience works as expected

thauska commented 4 years ago

WebRTC works only on HTTPS

gciandro13 commented 4 years ago

Hi @arturojreal , sorry but I'm missing something ... how was a different link generated from the traditional format "github.io" page? What steps did you follow to publish the experience?

Is your personal github page redirect to another URL? If so, we may need to manage the generation of links with HTTPS instead of HTTP.

arturojreal commented 4 years ago

WebRTC works only on HTTPS

Hi @thauska, That's my understanding, too. With that in mind, should we not be generating HTTPS links, instead? To save folks the manual step of adding the "s" to the generated URL?

Hi @arturojreal , sorry but I'm missing something ... how was a different link generated from the traditional format "github.io" page? What steps did you follow to publish the experience?

Is your personal github page redirect to another URL? If so, we may need to manage the generation of links with HTTPS instead of HTTP.

Hi @gciandro13,

I was also under the impression that a "github.io" page would be generated.

I published the experience via the current live version of Marker-based Experiences at https://ar-js-org.github.io/studio/. It's possible that because arturojreal.github.io redirects to arturojreal.com, the github.io link that would've been generated from my GitHub account took on the arturojreal.com domain instead?

gciandro13 commented 4 years ago

@arturojreal http://arturojreal.com/ddb50-test-1hur3ri/ was the link generated from arjs-Studio page when the site was uploaded? Or Ar.js Studio generate a link with "github.io", and then clicking it redirects to the other domain?

I think that the problem could be related to the fact that github page domain is redirected to another URL: may be with some tests we can try to figure it what happens in these scenarios, and try to solve it. I am pretty confidence about that because when the "github.io" is link to the github domain (no custom domain linked), the https is generated correctly.

I ask you also if you checked "Enforce Https" in your configuration's site github personal page, when you redirected your github pages from "github.io" to ".com"

arturojreal commented 4 years ago

@gciandro13, the link generated from AR.js Studio was already from arturojreal.com. Maybe not a bug but a feature?

I'll check on Enforce HTTPS and generate a new link and see if that might fix.

gciandro13 commented 4 years ago

Yes, please let me know if it resolve.

Otherwise, we have to take a look to this scenario: I think that github pubblication in case of URL redirection was never tested.

Then, we can say that is not a bug but a feature :D

arturojreal commented 4 years ago

@gciandro13, I think I've set forth the necessary changes to Enforce HTTPS on GitHub's end, but those changes may take up to 24 hours to propagate. In the meantime, I also configured the arturojreal.com domain to auto-redirect to HTTPS, which somewhat served the same purpose (though for now, the URL generated by AR.js Studio was still with HTTP rather than HTTPS).

I tested renaming the repository that was generated from the above test from y-prim-bird4vcxzk to y-prim-bird and was able to view the experience through http://arturojreal.com/y-prim-bird/ instead of http://arturojreal.com/y-prim-bird4vcxzk/ (thanks to the auto-redirect). I can certainly see myself creating future experiences with deliberate subdirectories like http://arturojreal.com/ar or the like, so leaning harder toward feature than bug still!

I'll report back once the changes have taken effect on whether the new link does indeed generate with HTTPS.

gciandro13 commented 4 years ago

Hi @arturojreal , yeah everything seems very clear and thank you for your work and feebdack. So please let me know if arjs studio generate link with HTTPS instead of HTTP when the dns will refresh its pointers to the domain.

For what concern repository's name, the "4vcxzk" string that arjs studio generated and you deleted from repository's name is important to make unique the name because if someone else decide to call its experience "y-prim-bird" we would have a problem to handle multiple repositories with the same name. I think that @nicolocarpignoli can clarify better this technical aspect, if you want to focus on it.

arturojreal commented 4 years ago

Hey @gciandro13 , I was able to Enforce HTTPS from GitHub's end now but AR.js studio continues to generate links with HTTP and not HTTPS.

As for the need for a unique identifier after the repository name, I'd love a breakdown (maybe @nicolocarpignoli can chime in?)

gciandro13 commented 4 years ago

Ok @arturojreal , thanks for the feedback.

So we checked that the problem is closely related to the github flow, in this cases; we simply put the link that they generate, so by your side you have to go only adding the "s" on the http link.

Then, I will close this issue; for the repository's name identifier, if you want to open an issue closely related to a bug or a improvement about that, please open another thread and we will help you on it.

Thank you :D

arturojreal commented 4 years ago

Thanks @gciandro13 !