openwallet-foundation / bifold-wallet

Aries Mobile Agent React Native - Part of the Aries Bifold effort to provide SSI capabilities in a production ready app.
Apache License 2.0
146 stars 141 forks source link

Error running bifold on android virtual (pixel 3a) and physical (pixel 7) phone #1005

Open deshmukhrajvardhan opened 11 months ago

deshmukhrajvardhan commented 11 months ago

Description of the problem

Error running bifold on Android virtual (pixel 3a) and physical (pixel 7) phone. Would appreciate your help with solving this issue.

Question: Have you taken a look at this setup link for AFJ (https://www.youtube.com/watch?v=Ho9Db0PSaGM&list=PLopHpZBbk8wM4FRFZl3LXeAhz6fbX4_lk&index=4) they use "Expo" which helps quite a lot with the setup. (I haven't tried following the steps in that video and built+tried to run bifold as described below )

Steps taken to solve

Screenshots and/or log output

Approach 1: Build the app and Run it using Android studio Screenshot 2023-10-23 at 7 21 52 PM after clicking reload on the phone screen Screenshot 2023-10-23 at 7 21 59 PM

Approach 2:

cd packages/legacy/app/android/app
arch -arm64 yarn start

Error seen on cmd line:

info Reloading app...
 BUNDLE  ./index.js 

error: Error: While resolving module `@hyperledger/aries-oca/build/legacy`, the Haste package `@hyperledger/aries-oca` was found. However the module `build/legacy` could not be found within the package. Indeed, none of these files exist:

  * `/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/packages/oca/build/legacy(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)`
  * `/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/packages/oca/build/legacy/index(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)`
    at resolveHasteName (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro-resolver/src/resolve.js:218:9)
    at Object.resolve (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro-resolver/src/resolve.js:92:20)
    at ModuleResolver.resolveDependency (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:79:31)
    at DependencyGraph.resolveDependency (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
    at Object.resolve (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/lib/transformHelpers.js:169:21)
    at Graph._resolveDependencies (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/DeltaBundler/Graph.js:473:35)
    at Graph._processModule (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/DeltaBundler/Graph.js:261:38)
    at async Graph._addDependency (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/DeltaBundler/Graph.js:372:20)
    at async Promise.all (index 21)
    at async Graph._processModule (/Users/rajvdesh/src/verifiable-credentials/wallets/bifold/node_modules/metro/src/DeltaBundler/Graph.js:322:5)

Screenshot 2023-10-23 at 7 23 26 PM Screenshot 2023-10-23 at 7 23 47 PM

Please let me know if you need more info

Development Environment

NimeshNB commented 11 months ago

i'm also facing same issue did you found any solution? @deshmukhrajvardhan

cvarjao commented 11 months ago

did you try running yarn run build or yarn lerna run build. The github action will always have the most up-to-date and reliable documentation on how to build: https://github.com/hyperledger/aries-mobile-agent-react-native/blob/main/.github/workflows/main.yaml

NimeshNB commented 11 months ago

did you try running yarn run build or yarn lerna run build. The github action will always have the most up-to-date and reliable documentation on how to build: https://github.com/hyperledger/aries-mobile-agent-react-native/blob/main/.github/workflows/main.yaml

Yes its work thanks!

deshmukhrajvardhan commented 10 months ago
yarn run build
cd packages/legacy/app/android
npx react-native run-android

Worked for me on just the emulator. Doesn't work on the physical device.