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

Expo WebBrowser on iOS fails to open after closing a page sheet browser too quickly #27197

Closed
MichailiK opened this issue Feb 21, 2024 · 1 comment · Fixed by #28452
Closed
Assignees
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@MichailiK
Copy link

Minimal reproducible example

https://snack.expo.dev/@michailk-dc/af7b9d?platform=ios

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

Yes

Summary

Using expo-web-browser to open a web browser using presentationStyle: WebBrowserPresentationStyle.PAGE_SHEET on iOS can result in subsequent requests to open a web browser fail, when the user dismisses the browser too quickly.

Demo using Expo Go:

RPReplay_Final1708509511.MP4

Additionally, the following warning gets logged on the console:
Attempted to call WebBrowser.openBrowserAsync multiple times while already active. Only one WebBrowser controller can be active at any given time.

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Yarn: 1.22.19 - ~/.local/state/nodenv/shims/yarn
      npm: 10.2.3 - ~/Library/Application Support/Herd/config/nvm/versions/node/v20.10.0/bin/npm
    Managers:
      CocoaPods: 1.14.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      expo: ~50.0.7 => 50.0.7 
      react: 18.2.0 => 18.2.0 
      react-native: 0.73.4 => 0.73.4 
    Expo Workflow: managed

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!
@MichailiK MichailiK added the needs validation Issue needs to be validated label Feb 21, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Feb 21, 2024
@manuelmhtr
Copy link

I have a similar problem when opening a URL immediately when the app loads:

  1. It closes the WebBrowser (this may be a related problem or different).
  2. As it was quickly closed, it refuses to open again.
  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 13.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
      Yarn: 4.0.2 - ~/.nvm/versions/node/v18.13.0/bin/yarn
      npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
    Managers:
      CocoaPods: 1.14.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      @expo/metro-config: ~0.17.1 => 0.17.3 
      babel-preset-expo: ^10.0.0 => 10.0.1 
      expo: ~50.0.8 => 50.0.8 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.73.4 => 0.73.4 
      react-native-web: ^0.19.10 => 0.19.10 
    npmGlobalPackages:
      eas-cli: 7.3.0
    Expo Workflow: managed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants