Recent increase in 'No matching activity' errors from `WebBrowser.openBrowserAsync()`
See original GitHub issueSummary
An app in production since August 2020 that launches a web browser using WebBrowser.openBrowserAsync()
is failing to do so without throwing ‘No matching activity’ errors on some Android devices, but with an increasing frequency during 2021 so far. It seems to be mostly affecting devices running Android 11 (a full list of device models is available).
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
No response
Environment
Expo CLI 3.28.5 environment info: System: OS: macOS 10.15.7 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.19.0 - /usr/local/bin/node npm: 6.14.11 - /usr/local/bin/npm Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 IDEs: Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: expo: ^37.0.0 => 37.0.12 react: 16.9.0 => 16.9.0 react-dom: 16.9.0 => 16.9.0 react-native: 0.61.4 => 0.61.4 react-native-web: ^0.11.7 => 0.11.7 react-navigation: ^4.0.10 => 4.4.0 npmGlobalPackages: expo-cli: 3.28.5 Expo Workflow: bare
Reproducible demo or steps to reproduce from a blank project
...
try {
await WebBrowser.openBrowserAsync("https://www.google.co.uk");
} catch (e) {
console.error(e.message); // === "No matching activity"
}
The issue above is occurring with increasing frequency on an app in production on Expo 37. I am aware of WebBrowser.getCustomTabsSupportingBrowsersAsync()
which will be implemented to determine whether a browser is available before attempting to open one, but I would like to know why this may be suddenly occurring more often. A new version of the app on Expo 39 is not ready to be released but I am concerned that the problem will still persist. I am unable to replicate in the Emulator running Android 11.
For reference, the affected devices to date are:
- CPH2025
- J8110
- J8210
- Pixel 2
- Pixel 3
- Pixel 3a
- Pixel 5
- SM-F916B
- SM-G770F
- SM-G780F
- SM-G781B
- SM-G970F
- SM-G973F
- SM-G975F
- SM-G977B
- SM-G980F
- SM-G981B
- SM-G986B
- SM-G988B
- SM-G991B
- SM-G996B
- SM-G998B
- SM-N770F
- SM-N970F
- SM-N975F
- SM-N976B
- SM-N980F
- SM-N981B
- SM-N986B
- T799H
- XQ-AT51
- XQ-AU51
- XQ-AU52
Unfortunately OS versions are not currently logged in the version of the app in production but my suspicion is that these are Android 11.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:60 (14 by maintainers)
I’m experiencing the same issue. It fails randomly on Android devices. Expo 41.
This issue is, in fact, not stale