Skip to content

Build failed with an exception rn@0.71.0-rc.2 #35472

Closed

Description

@s-jain-cognam

Description

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Illegal character in authority at index 7: file://C:\Users\Sawai\Desktop\myapp\node_modules\react-native/android

Version

0.71.0-rc.2

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
Memory: 5.23 GB / 15.75 GB
Binaries:
Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.7199119
Visual Studio: Not Found
Languages:
Java: 17.0.5 - C:\Users\Sawai\Documents\jdk-17.0.5\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.0-rc.2 => 0.71.0-rc.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Create a new react native project with 0.71.0-rc.2 version or upgrade to the existing.

Snack, code example, screenshot, or link to a repository

I have tried in multile windows system.

Activity

  1. changed the title [-]Build failed with an exception[/-] [+]Build failed with an exception rn@0.71.0-rc.2[/+] on Nov 25, 2022
  2. cortinico commented on Nov 25, 2022

    @cortinico
    Contributor

    Thanks for testign our latest RC @s-jain-cognam
    Could you share your whole build log? Thank you.

  3. s-jain-cognam commented on Nov 25, 2022

    @s-jain-cognam
    Author

    myapp@0.0.1 run:android
    react-native run-android

    warn Package react-native-ui-lib contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" co
    mmand and contact the package maintainers about this.
    warn Package react-native-vector-icons contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and
    contact the package maintainers about this.
    info JS server already running.
    info Installing the app...
    5 actionable tasks: 5 up-to-date

    FAILURE: Build failed with an exception.

    • What went wrong:
      A problem occurred configuring project ':app'.

    Illegal character in authority at index 7: file://C:\Users\jains\OneDrive\Desktop\myapp\node_modules\react-native/android

    • Try:

    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.

    BUILD FAILED in 12s

    error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

    FAILURE: Build failed with an exception.

    • What went wrong:
      A problem occurred configuring project ':app'.

    Illegal character in authority at index 7: file://C:\Users\jains\OneDrive\Desktop\myapp\node_modules\react-native/android

    • Try:

    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.

    BUILD FAILED in 12s

    at makeError (C:\Users\jains\OneDrive\Desktop\myapp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)        
    at C:\Users\jains\OneDrive\Desktop\myapp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (C:\Users\jains\OneDrive\Desktop\myapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runO
    

    nAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\jains\OneDrive\Desktop\myapp\node_modules@react-native-community\cli\build\index.js:142:9)
    info Run CLI with --verbose flag for more details.

  4. added
    Needs: Attention
    and removed on Nov 25, 2022
  5. cortinico commented on Nov 25, 2022

    @cortinico
    Contributor

    warn Package react-native-ui-lib contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" co

    It seems like you're not on a new project right?
    What is react-native-ui-lib?

  6. added and removed
    Needs: Attention
    on Nov 25, 2022
  7. s-jain-cognam commented on Nov 25, 2022

    @s-jain-cognam
    Author

    First i tried upgrading my own project (which logs are in upper comment) so that library comes from there and after on diffrent same os windows based system i initialized a new app with this same rc and got the same issue.

    There are the new App Log

    C:\Users\Sawai\Desktop\Blended\test\newappl\android>gradlew clean
    Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':app'.
    > Illegal character in authority at index 7: file://C:\Users\Sawai\Desktop\Blended\test\newapp\node_modules\react-native/android
    
    * Try:
    > 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 31s
    5 actionable tasks: 1 executed, 4 up-to-date
    
  8. added
    Needs: Attention
    and removed on Nov 25, 2022
  9. cortinico commented on Nov 25, 2022

    @cortinico
    Contributor

    @kelset This needs attention for .71. @mganandraj if you could also take a look at what's going on for Windows would be great 👍

  10. added
    Platform: Windows
    on Nov 25, 2022
  11. mganandraj commented on Nov 28, 2022

    @mganandraj
    Contributor

    The issue is that the file:\ uri scheme supports only forward slashes. @shivenmian was working on a fix.

  12. shivenmian commented on Nov 28, 2022

    @shivenmian

    Yes, I'm working on a fix. You can assign this (and other related issues like #34878) to me.

  13. cortinico commented on Nov 28, 2022

    @cortinico
    Contributor

    Yes, I'm working on a fix. You can assign this (and other related issues like #34878) to me.

    Great thanks for the heads up.
    I believe this might already solve the issue actually: #35496

  14. cortinico commented on Dec 1, 2022

    @cortinico
    Contributor

    @s-jain-cognam RC3 has just been released which should fix the path issue. @shivenmian can you cross check and let me know if we need further Windows fix to be included in RC4?

  15. s-jain-cognam commented on Dec 1, 2022

    @s-jain-cognam
    Author

    Yes thanks.

  16. shivenmian commented on Dec 5, 2022

    @shivenmian

    @cortinico yep, I had tested RC3 last week and things work fine for me too, so your PR is good. I had a look at the actual fix you made in DependencyUtils.kt and toURI() is better than the slash replacement I was trying. We can also probably close #34878 since that is similar.

  17. added
    Resolution: Fixed
    and removed
    Needs: Attention
    on Dec 6, 2022
  18. bcye commented on Jul 3, 2023

    @bcye

    Hi,

    I'm receiving this issue after having upgraded to 0.71.11 from 0.70.5. I wasn't able to find the fix from RC3 that should have fixed this to debug further, could someone point me in the right direction?

    Thanks :)

    My build log:

    info JS server already running.
    info Installing the app...
    > Task :react-native-gradle-plugin:compileKotlin UP-TO-DATE
    > Task :react-native-gradle-plugin:compileJava NO-SOURCE
    > Task :react-native-gradle-plugin:pluginDescriptors UP-TO-DATE
    > Task :react-native-gradle-plugin:processResources UP-TO-DATE
    > Task :react-native-gradle-plugin:classes UP-TO-DATE
    > Task :react-native-gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE
    > Task :react-native-gradle-plugin:jar UP-TO-DATE
    5 actionable tasks: 5 up-to-date
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':app'.
    > Illegal character in authority at index 7: file://C:\Users\bruce\Developer\Projects\project\project\node_modules\react-native/android
    
    * Try:
    > 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 13s
    
    Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':app'.
    > Illegal character in authority at index 7: file://C:\Users\bruce\Developer\Projects\project\project\node_modules\react-native/android
    
    * Try:
    > 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 13s
    
        at makeError (C:\Users\bruce\Developer\Projects\project\project\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
        at C:\Users\bruce\Developer\Projects\project\project\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async runOnAllDevices (C:\Users\bruce\Developer\Projects\project\project\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
        at async Command.handleAction (C:\Users\bruce\Developer\Projects\project\project\node_modules\@react-native-community\cli\build\index.js:108:9)
    

    Info:

    System:
        OS: Windows 10 10.0.22621
        CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
        Memory: 3.28 GB / 15.40 GB
      Binaries:
        Node: 18.16.1 - C:\Program Files\nodejs\node.EXE
        Yarn: Not Found
        npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
        Watchman: 20230505.211210.0 - C:\ProgramData\chocolatey\bin\watchman.EXE
      SDKs:
        Android SDK:
          API Levels: 31, 33
          Build Tools: 30.0.3, 31.0.0, 33.0.0, 33.0.2
          System Images: android-33 | Google APIs Intel x86_64 Atom
          Android NDK: Not Found
        Windows SDK: Not Found
      IDEs:
        Android Studio: Not Found
        Visual Studio: Not Found
      Languages:
        Java: 11.0.18
      npmPackages:
        @react-native-community/cli: Not Found
        react: 18.2.0 => 18.2.0
        react-native: ^0.71.0 => 0.71.11
        react-native-windows: Not Found
      npmGlobalPackages:
        *react-native*: Not Found
    
  19. bcye commented on Jul 14, 2023

    @bcye

    For anyone else finding this: turns out I had listed react-native-gradle-plugin seperately in my package.json with a different version (0.72), removed it, package-lock and node_modules and re-installed and its working now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Platform: WindowsResolution: Fixed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions