Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
s-jain-cognam opened this issue Nov 25, 2022 · 13 comments
Closed

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

s-jain-cognam opened this issue Nov 25, 2022 · 13 comments
Assignees
Labels
Platform: Windows Building on Windows. Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@s-jain-cognam
Copy link

s-jain-cognam commented Nov 25, 2022

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.

@s-jain-cognam s-jain-cognam changed the title Build failed with an exception Build failed with an exception rn@0.71.0-rc.2 Nov 25, 2022
@cortinico
Copy link
Contributor

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

@s-jain-cognam
Copy link
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.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Nov 25, 2022
@cortinico
Copy link
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?

@cortinico cortinico added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Nov 25, 2022
@s-jain-cognam
Copy link
Author

s-jain-cognam commented Nov 25, 2022

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

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Nov 25, 2022
@cortinico
Copy link
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 👍

@mganandraj
Copy link
Contributor

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

@shivenmian
Copy link
Contributor

shivenmian commented Nov 28, 2022

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

@cortinico
Copy link
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

@cortinico
Copy link
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?

@s-jain-cognam
Copy link
Author

Yes thanks.

@shivenmian
Copy link
Contributor

@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.

@cortinico cortinico added Resolution: Fixed A PR that fixes this issue has been merged. and removed Needs: Attention Issues where the author has responded to feedback. labels Dec 6, 2022
@bcye
Copy link

bcye commented Jul 3, 2023

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

@bcye
Copy link

bcye commented Jul 14, 2023

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 :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Platform: Windows Building on Windows. Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests

6 participants