react-native-inappbrowser icon indicating copy to clipboard operation
react-native-inappbrowser copied to clipboard

React native new architecture support

Open juac08 opened this issue 10 months ago • 9 comments

It doesn’t work with the new architecture. Any fix coming?

juac08 avatar Mar 14 '25 20:03 juac08

What do you mean "doesn’t work"? Could you please discribe what exactly goes wrong?

UraFIZ avatar May 08 '25 14:05 UraFIZ

@UraFIZ https://reactnative.directory/?search=react-native-inappbrowser

Image

MadeinFrance avatar May 10 '25 10:05 MadeinFrance

Can confirm its not working with newArchEnabled

idoodler avatar May 21 '25 13:05 idoodler

Can somebody provide a minimal repository that shows the issue with newArchEnabled? Is the issue specific to iOS or Android? I've created two minimal react native repos for v0.75.5 and v0.76.6 and experienced no issues with the latest. Both utilizing (no bridge) / fabric / concurrentRoot

https://github.com/tristanheilman/BrowserNewArch https://github.com/tristanheilman/BrowserNewArch76

tristanheilman avatar May 23 '25 15:05 tristanheilman

@tristanheilman Currently I am trying to upgrade my project to version 0.80 and android build is failing with the below error.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-inappbrowser-reborn:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
   > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
      > Could not find com.android.support:support-annotations:1.0.2.
        Required by:
            project :react-native-inappbrowser-reborn
   > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'.
      > Could not find com.android.support:customtabs:1.0.2.
        Required by:
            project :react-native-inappbrowser-reborn

* Try:
> The project declares repositories, effectively ignoring the repositories you have declared in the settings.
   To determine how project repositories are declared, configure your build to fail on project repositories.
   For more information, please refer to https://docs.gradle.org/8.14.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 16s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installStagingdebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':react-native-inappbrowser-reborn:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not find com.android.support:support-annotations:1.0.2. Required by: project :react-native-inappbrowser-reborn > Could not resolve all dependencies for configuration ':react-native-inappbrowser-reborn:debugCompileClasspath'. > Could not find com.android.support:customtabs:1.0.2. Required by: project :react-native-inappbrowser-reborn * Try:
> The project declares repositories, effectively ignoring the repositories you have declared in the settings. To determine how project repositories are declared, configure your build to fail on project repositories. For more information, please refer to https://docs.gradle.org/8.14.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 16s.
info Run CLI with --verbose flag for more details.

ElChawich avatar Jun 23 '25 11:06 ElChawich

@ElChawich Can you please provide a minimal reproduction repository for React Native v0.80.0 that produces this error when building for android?

I was unable to reproduce the error in this example repo: https://github.com/tristanheilman/BrowserNewArch80

Note that AndroidX is used for RN 0.80.0 by default; check your grade.properties for this boolean flag and make sure it's set to true. Also, check your build.gradle file. I suggest setting a specific AndroidX version here OR leave it blank and upgrade your min & target SDK version to 36. This will allow your project to compile with androidX v1.9.0-alphaX by default.

tristanheilman avatar Jun 23 '25 19:06 tristanheilman

thank you @tristanheilman, after upgrading my min & target SDK version to 36 it worked.

ElChawich avatar Jun 24 '25 15:06 ElChawich

Also, when running npx expo-doctor it says: Unsupported on New Architecture: react-native-inappbrowser-reborn, but i assume that's cz of the RN directory

Image

is that right?

Thanks for confirming 🙏 cc @tristanheilman

Though looking at @ElChawich's response above, it seems to be working for him, so I can just ignore expo doctor's warning? 🤔? (our company haven't tried yet, but we were sort of upgrading react native/expo sdk and noticed the above)

NiharR027 avatar Jun 29 '25 23:06 NiharR027

+1 for this

lethaale avatar Sep 30 '25 12:09 lethaale