facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.15k stars 24.21k forks source link

Unable to open URL on iPhone 13 Pro Max (version 17.5.1) #45961

Closed aminos02 closed 8 hours ago

aminos02 commented 1 month ago

Description

Sentry reported an issue that some users are facing an issue when trying to open the email in production build (Appstore) with iPhone 13 Pro Max iOS 17.5.1, on other devices this issue doesn't happen , my code is :

try {
    const supported = await Linking.canOpenURL(url);
    if (!supported) {
      throw new Error(`Can't open ${url}`);
    }
    await Linking.openURL(url);  // the error happens here
  } catch (error) {
    // Logging the error to sentry
    Logging.logError(new Error('Failed to open url'), {
      error,
      url,
    });
  }
Device Info :
Architecture : arm64
Family : iOS
Free Memory : 320.6 MiB
Free Storage: 18.1 GiB
Memory Size : 5.5 GiB
Model : iPhone 13 Pro Max (D64AP)
Model Id : D64AP
Simulator : false
OperatingSystem :
Kernel Version : Darwin Kernel Version 23.5.0: Wed May 1 20:34:31 PDT 2024; root:xnu-10063.122.3~3/RELEASE_ARM64_T8110
Name : iOS
Rooted : no
Version : 17.5.1(21F90)
react_native_context: 
expo: false
fabric : false
hermes_debug_info : true
hermes_version : for RN 0.72.4
js_engine : hermes
react_native_version : 0.72.4
turbo_module : false

Stacktrace or Logs

{
code: EUNSPECIFIED,
domain: RCTErrorDomain,
message: Unable to open URL: mailto:customercare@roshn.sa,
name: Error,

nativeStackIOS: [
15 items
],
stack: 
Error: Unable to open URL: mailto:customercare@roshn.sa
    at promiseMethodWrapper (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:24288:45)
    at openURL (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:71748:81)
    at ?anon_0_ (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:389529:43)
    at next (native)
    at asyncGeneratorStep (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:64084:26)
    at _next (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:64103:29)
    at tryCallOne (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:329990:16)
    at anonymous (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:330071:27)
    at apply (native)
    at anonymous (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:36950:26)
    at _callTimer (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:36839:17)
    at _callReactNativeMicrotasksPass (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:36877:17)
    at callReactNativeMicrotasks (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:37080:44)
    at __callReactNativeMicrotasks (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:23201:46)
    at anonymous (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:23066:45)
    at __guard (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:23174:15)
    at flushedQueue (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:23065:21)
    at invokeCallbackAndReturnFlushedQueue (/Users/gitlab/Library/Developer/Xcode/DerivedData/RoshnApp-ahpqonerlaovgubduglkxkcyjlah/Build/Intermediates.noindex/ArchiveIntermediates/RoshnApp/BuildProductsPath/Production-iphoneos/main.jsbundle:23059:33)
,
userInfo: null
}

React Native Version

0.72.4

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.3
  CPU: (12) arm64 Apple M2 Pro
  Memory: 77.98 MB / 32.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 18.17.1
    path: ~/.nvm/versions/node/v18.17.1/bin/node
  Yarn:
    version: 3.6.1
    path: ~/.nvm/versions/node/v18.17.1/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.1/bin/npm
  Watchman:
    version: 2024.07.01.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/mac/.rvm/rubies/ruby-3.0.6/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 34.0.0
    System Images:
      - android-21 | Google APIs ARM EABI v7a
      - android-25 | Google APIs Intel x86 Atom
      - android-25 | Google APIs Intel x86_64 Atom
      - android-26 | ARM 64 v8a
      - android-27 | ARM 64 v8a
      - android-27 | Intel x86_64 Atom
      - android-27 | Google APIs ARM 64 v8a
      - android-27 | Google APIs Intel x86 Atom
      - android-27 | Google Play Intel x86 Atom
      - android-28 | Google APIs ARM 64 v8a
      - android-29 | Google Play ARM 64 v8a
      - android-29 | Google Play Intel x86 Atom
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.0.6
    path: /Users/mac/.rvm/rubies/ruby-3.0.6/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 11.3.6
    wanted: 11.3.6
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: true
  newArchEnabled: false
react-native-bot commented 1 month ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.72.15. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
react-native-bot commented 1 month ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
julhenry commented 2 weeks ago

Hi @aminos02, I have the same problem. I don't know if my users are finally redirected to the browser. I can't reproduce this bug (simu + device). Have you found a solution for this? Thanks !

react-native-bot commented 8 hours ago
:warning: Unsupported Version of React Native
:information_source: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
cortinico commented 8 hours ago

Closing as 0.72 is sadly unsupported. We're an extremely small team and we can focus only on issue related to supported versions of React Native + with a reliable reproducer.