Facing problem while running react native app

> MyProject@0.0.1 start
> react-native start

info Welcome to React Native v0.74
info Starting dev server on port 8081...
error listen EADDRINUSE: address already in use :::8081.
Error: listen EADDRINUSE: address already in use :::8081
    at Server.setupListenHandle [as _listen2] (node:net:1898:16)
    at listenInCluster (node:net:1946:12)
    at Server.listen (node:net:2044:7)
    at /Users/xyz/MyProject/node_modules/metro/src/index.flow.js:321:14
    at new Promise (<anonymous>)
    at earlyPortCheck (/Users/xyz/MyProject/node_modules/metro/src/index.flow.js:317:11)
    at exports.runServer (/Users/xyz/MyProject/node_modules/metro/src/index.flow.js:124:9)
    at Object.runServer [as func] (/Users/xyz/MyProject/node_modules/@react-native/community-cli-plugin/dist/commands/start/runServer.js:126:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.handleAction (/Users/xyz/MyProject/node_modules/@react-native-community/cli/build/index.js:118:9)
info Run CLI with --verbose flag for more details.
xyz MyProject % npm start -- --port 8082         

> MyProject@0.0.1 start
> react-native start --port 8082

info Welcome to React Native v0.74
info Starting dev server on port 8082...

                        β–’β–’β–“β–“β–“β–“β–’β–’
                     β–’β–“β–“β–“β–’β–’β–‘β–‘β–’β–’β–“β–“β–“β–’
                  β–’β–“β–“β–“β–“β–‘β–‘β–‘β–’β–’β–’β–’β–‘β–‘β–‘β–“β–“β–“β–“β–’
                 β–“β–“β–’β–’β–’β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–’β–’β–’β–“β–“
                 β–“β–“β–‘β–‘β–‘β–‘β–‘β–’β–“β–“β–“β–“β–“β–“β–’β–‘β–‘β–‘β–‘β–‘β–“β–“
                 β–“β–“β–‘β–‘β–“β–“β–’β–‘β–‘β–‘β–’β–’β–‘β–‘β–‘β–’β–“β–’β–‘β–‘β–“β–“
                 β–“β–“β–‘β–‘β–“β–“β–“β–“β–“β–’β–’β–’β–’β–“β–“β–“β–“β–’β–‘β–‘β–“β–“
                 β–“β–“β–‘β–‘β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–’β–‘β–‘β–“β–“
                 β–“β–“β–’β–‘β–‘β–’β–’β–“β–“β–“β–“β–“β–“β–“β–“β–’β–‘β–‘β–‘β–’β–“β–“
                  β–’β–“β–“β–“β–’β–‘β–‘β–‘β–’β–“β–“β–’β–‘β–‘β–‘β–’β–“β–“β–“β–’
                     β–’β–“β–“β–“β–’β–‘β–‘β–‘β–‘β–’β–“β–“β–“β–’
                        β–’β–’β–“β–“β–“β–“β–’β–’


                Welcome to Metro v0.80.9
              Fast - Scalable - Integrated


warning: Watchman `watch-project` returned a warning: Recrawled this watch 7 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/xyz/MyProject' ; watchman watch-project '/Users/xyz/MyProject'`

warning: Watchman `query` returned a warning: Recrawled this watch 7 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/xyz/MyProject' ; watchman watch-project '/Users/xyz/MyProject'`

Recrawled this watch 7 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del '/Users/xyz/MyProject' ; watchman watch-project '/Users/xyz/MyProject'`

info Dev server ready

i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app

info Opening app on Android...
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)

info πŸ’‘ Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration 'classpath'.
> Could not resolve org.gradle.toolchains:foojay-resolver:0.5.0.
  Required by:
      unspecified:unspecified:unspecified > org.gradle.toolchains.foojay-resolver-convention:org.gradle.toolchains.foojay-resolver-convention.gradle.plugin:0.5.0
   > Could not resolve org.gradle.toolchains:foojay-resolver:0.5.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/org/gradle/toolchains/foojay-resolver/0.5.0/foojay-resolver-0.5.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/org/gradle/toolchains/foojay-resolver/0.5.0/foojay-resolver-0.5.0.pom'.
            > Got SSL handshake exception during request. It might be caused by SSL misconfiguration
               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve org.gradle.toolchains:foojay-resolver:0.5.0.
      > Could not get resource 'https://plugins.gradle.org/m2/org/gradle/toolchains/foojay-resolver/0.5.0/foojay-resolver-0.5.0.pom'.
         > Could not GET 'https://plugins-artifacts.gradle.org/org.gradle.toolchains/foojay-resolver/0.5.0/824e8819d685581917eb6211904b03f18152247338bc5df231a3c251438212b0/foojay-resolver-0.5.0.pom'.
            > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* 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 5s
info Run CLI with --verbose flag for more details.

at initial i m getting error port in use & after killing the port.Its giving me error as Could not resolve org.gradle.toolchains:foojay-resolver:0.5.0. while i m running my react native app on mac. It would be great if u would help me out

It’s there a question hidden somewhere? :slight_smile:

at initial i m getting error port in use & after killing the port.Its giving me error as Could not resolve org.gradle.toolchains:foojay-resolver:0.5.0. while i m running my react native app on mac. It would be great if u would help me out

The error you get says there is a problem with the HTTPS connection when trying to download that plugin.
Typically the cause for such PKIX path building errors are either that the JDK you run Gradle with is broken / has broken ceritificates, or that you need to use some Proxy which you do not have configured for Gradle, which then for example causes some portal site to be shown that does not match the HTTPS certificate.

1 Like