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

Hubs client does not load in WebKit Webviews (Chrome/Slack on iOS) #181

Closed
brianpeiris opened this issue Apr 11, 2018 · 12 comments
Closed
Labels

Comments

@brianpeiris
Copy link
Contributor

brianpeiris commented Apr 11, 2018

Could also be a problem with Android Slack? We'll have to detect and bust out of the webview into Safari.

@robertlong
Copy link
Contributor

How do you get the client to open up in this webview? Links always open up in Firefox for me.

@brianpeiris brianpeiris changed the title Slack on macOS uses a webview which breaks the client. Slack on iOS uses a webview which breaks the client. Apr 17, 2018
@robertlong
Copy link
Contributor

Hmm, I still can't reproduce this on Android or iOS. They both open in a browser for me.

@robertlong
Copy link
Contributor

Ok, there's a setting in Slack to set what browser to use when opening links. Mine was set to Safari on iOS and Firefox on Android.

I don't think there is any way to bust out of the webview on iOS.

On Android this works:

<html>
  <head></head>
  <script>
    document.location = "intent://google.com#Intent;scheme=http;action=android.intent.action.VIEW;end;";
  </script>
  <body>
  </body>
</html>

Should we do this hack on Android or just try to show a message to open the page in Safari/Chrome/Firefox if we detect that they are in a webview?

@robertlong
Copy link
Contributor

robertlong commented Apr 24, 2018

Removing this from the MVP as we haven't found a clean way to do this.

@cvan
Copy link
Contributor

cvan commented Apr 30, 2018

I encounter this same issue using Chrome for iOS too. Investigating a solution here.

@brianpeiris
Copy link
Contributor Author

I think we settled on showing a message at least, unless there is a proper solution.

@cvan
Copy link
Contributor

cvan commented Apr 30, 2018

I think we settled on showing a message at least, unless there is a proper solution.

having not personally Remote Debugged it yet, what have you determined the errors/issues are? any Console/Sentry errors?

@brianpeiris
Copy link
Contributor Author

I think Robert did the debugging, but the main issue was lack of access to getUserMedia, IIRC

@cvan
Copy link
Contributor

cvan commented May 1, 2018

wow, several hours later, and I still cannot figure out how to remotely debug iOS from my macOS with anything other than Safari: any WebKit webview (i.e., those used in Chrome, Slack, etc.).

I've tried the following with zero success:

image

and it's unclear from RemoteDebug.org what's going on either.

long story short: remotely debugging web pages in Safari is easy. debugging pages in Chrome for iOS/any other app with a webview: IDK! if you know, please send help! 👍

@cvan cvan changed the title Slack on iOS uses a webview which breaks the client. Hubs client does not load in WebKit Webviews (Chrome/Slack on iOS) May 2, 2018
@cvan
Copy link
Contributor

cvan commented May 2, 2018

@robertlong I've been hearing some people encounter the same issue now in the stock, vanilla Safari for iOS browser. can you provide any info on what you've discovered so far?

@cvan
Copy link
Contributor

cvan commented May 17, 2018

btw, I figured out this fails at this spot because navigator.mediaDevices.enumerateDevices is not a function. on iOS, WKWebViews do not yet have access to navigator.mediaDevices/getUserMedia (supposedly it is temporarily disabled behind a flag), reserving navigator.mediaDevices/getUserMedia to only Safari at the moment.

additionally, and unfortunately, to my knowledge (and Stack Overflow's), there is no way to open Safari from a custom-protocol handler or any other mechanism (e.g., window.open) via HTML anchors or JavaScript code. (there is a way to open Chrome on iOS from Safari, but not vice versa, heh.)

@gfodor
Copy link
Contributor

gfodor commented Jun 20, 2018

we won't be supporting this due to the issues mentioned above, but @InfiniteLee pushed a UX update that will guide the user out of the webview.

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

4 participants