WebBrowser.openBrowserAsync since expo 33

Hello everybody,

i would like to upgrade an app from expo 32 to 34,
but the changed behavior in WebBrowser.openBrowserAsync is hindering me to do this.

until expo 32 the promise from WebBrowser.openBrowserAsync()
would not resolve until the window was closed.
and also WebBrowser.dismissBrowser() was available.

since expo 33 WebBrowser.openBrowserAsync() (on android) always resolves the promise with type=opened
and dismissBrowser() is not available anymore.

does anybody know why this change was made?

i am trying to redirect from browser window back to the app.
but all the examples from the docs and from github won’t work anymore.
eg. https://github.com/expo/examples/blob/master/with-webbrowser-redirect/app/App.js

according to the docs you should

  1. create a back-url with Linking.makeUrl() and pass it to the browser
  2. in the browser add a eg. with onclick=“document.location.href = [back-url]”

this works so far and also the ‘url’ event fires in the app.
but the main problem is, that the browser window won’t close.
and the app won’t come to the foreground.
also a window.close() in the browser won’t work.

does anybody have a solution for this?


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.