# \[Archive\] React Native SDK Quick Start doesn't work

**URL:** <https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [February 9, 2024, 4:25am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605 "2024-02-09T04:25:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammad.tahmid.isla](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@muhammad.tahmid.isla](https://builder.metamask.io/u/muhammad.tahmid.isla)\
**Post date:** [February 9, 2024, 4:25am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/1 "2024-02-09T04:25:55Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **muhammad.tahmid.isla** on 2/9/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

I cloned the repository and try to set it up and run. But I am getting this error.  
How to resolve it? I can’t run it on my android device.

> FAILURE: Build completed with 2 failures.
> 
> ## 1: Task failed with an exception.
> 
> - What went wrong:  
> Execution failed for task ‘:app:mergeDebugNativeLibs’.
> 
> > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction  
> > 2 files found with path ‘lib/arm64-v8a/libcrypto.so’ from inputs:  
> > - /home/tahmid/Projects/reactnative\_mobile\_app/newonw/w3a-rn-bare-demo/w3a-rn-bare-demo/web3auth-pnp-examples/react-native/rn-bare-quick-start/node\_modules/react-native-quick-crypto/android/build/intermediates/library\_jni/debug/jni/arm64-v8a/libcrypto.so  
> > - /home/tahmid/.gradle/caches/transforms-3/61058fb40c4670eaad4c5b69643fae17/transformed/jetified-flipper-0.182.0/jni/arm64-v8a/libcrypto.so  
> > If you are using jniLibs and CMake IMPORTED targets, see  
> > [Android Gradle plugin 8.2 release notes &nbsp;|&nbsp; Android Studio &nbsp;|&nbsp; Android Developers](https://developer.android.com/r/tools/jniLibs-vs-imported-targets)
> 
> - 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.  
> > ==============================================================================
> 
> ## 2: Task failed with an exception.
> 
> - What went wrong:  
> java.lang.StackOverflowError (no error message)
> 
> - 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](https://help.gradle.org)
> 
> BUILD FAILED in 44s
> 
> error Failed to install the app.  
> info Run CLI with --verbose flag for more details.

---

<div class="post-metadata">

**Author:** ![vjgee](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vjgee](https://builder.metamask.io/u/vjgee)\
**Post date:** [February 9, 2024, 4:36am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/2 "2024-02-09T04:36:42Z")

</div>

@muhammad.tahmid.isla Thanks for reporting.

Your feedback has been forwarded to our team and we will get back to you with further updates.

---

<div class="post-metadata">

**Author:** ![vjgee](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vjgee](https://builder.metamask.io/u/vjgee)\
**Post date:** [February 15, 2024, 6:13am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/3 "2024-02-15T06:13:45Z")

</div>

@muhammad.tahmid.isla Our team are reviewing your issue and will get back. Please avoid creating duplicate threads for the same issue.

---

<div class="post-metadata">

**Author:** ![muhammad.tahmid.isla](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@muhammad.tahmid.isla](https://builder.metamask.io/u/muhammad.tahmid.isla)\
**Post date:** [February 18, 2024, 4:26pm UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/4 "2024-02-18T16:26:09Z")

</div>

The new post was regarding a new issue. It asked me to install crypto and when I installed crypto, it still didn’t work. I am still looking forward to having a response from the team which I haven’t yet. It’s been 10 days. How long does it generally take to get help?

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [February 19, 2024, 1:42am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/5 "2024-02-19T01:42:54Z")

</div>

Hey @muhammad.tahmid.isla,

I see you’re encountering an issue with resolving the crypto package. To address this, I recommend checking out the metro.config.js configuration suggested in our documentation, which you can find [here](https://web3auth.io/docs/troubleshooting/metro-issues#metroconfigjs). Additionally, ensure you’ve installed the necessary polyfilled packages as outlined in the guide.

I also want to mention that if there was an issue with our quickstart example for Android, it would have affected our demo preview as well. Since the demo at [this link](http://web3auth.io/docs/quick-start?product=PNP&sdk=PNP_REACT_NATIVE&framework=ANDROID&stepIndex=0&stepIndex=0) is functioning correctly, it suggests that the quickstart example should be operational. Please take a moment to review the demo to ensure your setup aligns with the provided example.

If you have followed these steps and continue to experience difficulties, please don’t hesitate to let me know. I’m here to assist you with any further issues you might encounter.

---

<div class="post-metadata">

**Author:** ![muhammad.tahmid.isla](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@muhammad.tahmid.isla](https://builder.metamask.io/u/muhammad.tahmid.isla)\
**Post date:** [February 25, 2024, 10:50am UTC](https://builder.metamask.io/t/archive-react-native-sdk-quick-start-doesnt-work/1605/6 "2024-02-25T10:50:09Z")

</div>

Hello @maharshi @vjgee

Thanks for your response. I have tried everything you said and the previous issues are resolved. However, there is a new error and I think the empty module is not working for this error.

For Your Informatio, I couldn’t make degit work so I cloned the whole repository. and experienced the following case -

The error I got this is as follows -

FAILURE: Build completed with 2 failures.

```auto
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libcrypto.so' from inputs:
      - /home/tahmid/Projects/reactnative_mobile_app/thirdproject/web3auth-pnp-examples/react-native/rn-bare-quick-start/node_modules/react-native-quick-crypto/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libcrypto.so
      - /home/tahmid/.gradle/caches/transforms-3/61058fb40c4670eaad4c5b69643fae17/transformed/jetified-flipper-0.182.0/jni/arm64-v8a/libcrypto.so
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets
2: Task failed with an exception.

```

After receiving this error, I created a new project and pasted the copied content from the example.  
But, the build failed again with another error -

```auto
error: Error: Unable to resolve module missing-asset-registry-path from /home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/react-native/Libraries/LogBox/UI/LogBoxImages/chevron-left.png: missing-asset-registry-path could not be found within the project or in these directories:
  node_modules/react-native/node_modules
  node_modules
> 1 | �PNG
  2 | �
  3 | 
  4 | IHD�8��EIDATx�c�	�'.�p�?
                               ���1i���@:�t�@���ѥ	+ l�#G�L��=��C0������+IEND�B`�
    at ModuleResolver.resolveDependency (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:153:15)
    at DependencyGraph.resolveDependency (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/node-haste/DependencyGraph.js:271:43)
    at /home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/lib/transformHelpers.js:176:21
    at resolveDependencies (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/DeltaBundler/buildSubgraph.js:56:25)
    at visit (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/DeltaBundler/buildSubgraph.js:107:30)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 11)
    at async visit (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)
    at async Promise.all (index 10)
    at async visit (/home/tahmid/Projects/reactnative_mobile_app/reactCLI/MyWeb3AuthApp/node_modules/metro/src/DeltaBundler/buildSubgraph.js:116:5)

```

hevron-left.png is located at home/user/Projects/reactnative\_mobile\_app/reactCLI/MyWeb3AuthApp/node\_modules/react-native/Libraries/LogBox/UI/LogBoxImages

Global.js -  
global.Buffer = require(“buffer”).Buffer;

// Needed so that ‘stream-http’ chooses the right default protocol.

```auto
global.location = {
  protocol: "file:",
};
global.process.version = “v16.0.0”;
if (!global.process.version) {
global.process = require(“process”);
console.log({ process: global.process });
}

```

metro.config.js →

```auto
const { getDefaultConfig } = require("metro-config");
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig(__dirname);
const defaultSourceExts = […sourceExts, “svg”, “mjs”, “cjs”];
return {
resolver: {
extraNodeModules: {
assert: require.resolve(“empty-module”), // assert can be polyfilled here if needed
http: require.resolve(“empty-module”), // stream-http can be polyfilled here if needed
https: require.resolve(“empty-module”), // https-browserify can be polyfilled here if needed
os: require.resolve(“empty-module”), // os-browserify can be polyfilled here if needed
url: require.resolve(“empty-module”), // url can be polyfilled here if needed
zlib: require.resolve(“empty-module”), // browserify-zlib can be polyfilled here if needed
path: require.resolve(“empty-module”),
crypto: require.resolve(“crypto-browserify”),
stream: require.resolve(“readable-stream”),
},
  assetExts: assetExts.filter((ext) =&gt; ext !== "svg"),

  sourceExts: process.env.TEST_REACT_NATIVE ? ["e2e.js"].concat(defaultSourceExts) : defaultSourceExts,
},
transformer: {
  getTransformOptions: async () =&gt; ({
    transform: {
      experimentalImportSupport: false,
      inlineRequires: true,
    },
  }),
},

```

package.json →

````auto
  "name": "MyWeb3AuthApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@ethersproject/shims": "^5.7.0",
    "@toruslabs/react-native-web-browser": "^1.1.0",
    "@web3auth/base": "^7.3.2",
    "@web3auth/ethereum-provider": "^7.3.2",
    "@web3auth/react-native-sdk": "^5.1.0",
    "buffer": "^6.0.3",
    "crypto-browserify": "^3.12.0",
    "empty-module": "^0.0.2",
    "ethers": "^6.11.0",
    "process": "^0.11.10",
    "react": "18.2.0",
    "react-native": "0.73.4",
    "react-native-crypto": "^2.2.0",
    "react-native-encrypted-storage": "^4.0.3",
    "react-native-get-random-values": "^1.10.0",
    "react-native-randombytes": "^3.6.1",
    "readable-stream": "^4.5.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.73.21",
    "@react-native/eslint-config": "0.73.2",
    "@react-native/metro-config": "0.73.5",
    "@react-native/typescript-config": "0.73.1",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.2.0",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}```
These are the file in my project folder -
![image|690x206](upload://3N6o3ukv8SFIRiS7ve7rCvOMwKA.png)

````
