question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recent increase in 'No matching activity' errors from `WebBrowser.openBrowserAsync()`

See original GitHub issue

Summary

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:open
  • Created 3 years ago
  • Reactions:14
  • Comments:60 (14 by maintainers)

github_iconTop GitHub Comments

11reactions
nnabinhcommented, May 25, 2021

I’m experiencing the same issue. It fails randomly on Android devices. Expo 41.

8reactions
tajetajecommented, Jun 21, 2022

This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

This issue is, in fact, not stale

Read more comments on GitHub >

github_iconTop Results From Across the Web

No matching activity error in React Native/Expo on Android
... I have been receiving several "no matching activity errors", and then "browser has already been launched" errors when on Android.
Read more >
WebBrowser - Expo Documentation
As of iOS 11, SFSafariViewController no longer shares cookies with Safari, so if you are using WebBrowser for authentication you will want to...
Read more >
Can't use WebBrowser in Android on SDK 30+ - Reddit
Basically, WebBrowser is throwing an error with no matching activity in SDK 30+, and then just failing to launch after that.
Read more >
@expo/metro-config | Yarn - Package Manager
This is the log of notable changes to the Expo client that are developer-facing. Package-specific changes not released in any SDK will be...
Read more >
MSAL.PS - PowerShell Gallery
and will attempt to acquire a new access token using client credentials. ... On Linux, uses the default system browser instead, as Edge...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found