Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Building fails for ios and android. Need better installation guide. #64

Open
AlexAndrei98 opened this issue Nov 24, 2022 · 7 comments
Open

Comments

@AlexAndrei98
Copy link

It is not clear from the readme what the steps are to use this library.
Doing an npm install is not sufficient for our app. I do not have an ios nor an android folder in my react native app. How do I go about installing the native dependencies?
I am using expo to build the app.

@AlexAndrei98 AlexAndrei98 changed the title Building fails for ios. Need better installation guide. Building fails for ios and android. Need better installation guide. Nov 24, 2022
@AlexAndrei98
Copy link
Author

this is what I get for my ios 13 emulator

Alexandrus-MBP:roots-react-native alex$ expo run:ios
┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   There is a new version of expo-cli available (6.0.8).                 │
│   You are currently using expo-cli 6.0.5                                │
│   Install expo-cli globally using the package manager of your choice;   │
│   for example: `npm install -g expo-cli` to get the latest version      │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

This command is being executed with the global Expo CLI. Learn more.
To use the local CLI instead (recommended in SDK 46 and higher), run:
› npx expo run:ios

⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Unable to find a specification for `DidcommSDK` depended upon by `didcomm-react-native`

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

@AlexAndrei98
Copy link
Author

this is what I get when I try to build for android

Alexandrus-MBP:roots-react-native alex$ expo run:android
┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   There is a new version of expo-cli available (6.0.8).                 │
│   You are currently using expo-cli 6.0.5                                │
│   Install expo-cli globally using the package manager of your choice;   │
│   for example: `npm install -g expo-cli` to get the latest version      │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

This command is being executed with the global Expo CLI. Learn more.
To use the local CLI instead (recommended in SDK 46 and higher), run:
› npx expo run:android

✔ Created native project | gitignore already synced
✔ Updated package.json and added index.js entry point for iOS and Android
📦 Using npm to install packages.
✔ Cleaned JavaScript dependencies 10092ms
✔ Installed JavaScript dependencies 28862ms
» android: userInterfaceStyle: Install expo-system-ui in your project to enable this feature.
✔ Config synced
› Building app...

[....]

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/alex/Projects/rootid/roots-react-native/node_modules/@sicpa_open_source/didcomm-react-native/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating project ':sicpa_open_source_didcomm-react-native'.
> Plugin with id 'kotlin-android' not found.

* 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:
A problem occurred configuring project ':sicpa_open_source_didcomm-react-native'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================

@AlexAndrei98
Copy link
Author

all I did is
npm install @sicpa_open_source/didcomm-react-native
to https://github.com/roots-id/roots-react-native

@AlexAndrei98
Copy link
Author

@dmitry-vychikov do you have any tips on how to link the libraries?

@dmitry-vychikov
Copy link
Contributor

Hi @AlexAndrei98

We haven't tried to use expo for building. We tested only with plain react-native app.
I don't have much experience with expo, but after looking at this doc https://docs.expo.dev/workflow/using-libraries/#determining-third-party-library-compatibility I would say this library is just not compatible with expo.

@dkulic @yvgny
Please prioritise this. It seems we should play around with expo ourselves and see if we can add support for it.

@dkulic
Copy link
Contributor

dkulic commented Dec 1, 2022

Hi @AlexAndrei98, unfortunately, we do not have plans to support Expo at least in short term. Do you think it would be possible to contribute?

@AlexAndrei98
Copy link
Author

@dkulic I am not familiar with expo modules but I will do some research and let you know! I have tried to build with the react-native cli and I am getting

TypeError: Cannot read property 'getConstants' of null, js engine: hermes
    at App (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.rootsdidcommreact&modulesOnly=false&runModule=true:93619:54)
    at RCTView
    at View
    at RCTView
    at View
    at AppContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.rootsdidcommreact&modulesOnly=false&runModule=true:85300:36)
    at rootsDidcommReact(RootComponent) (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.rootsdidcommreact&modulesOnly=false&runModule=true:89907:28)
 ERROR  TypeError: Cannot read property 'DIDCommResolversProxy' of undefined

Are there any other steps besides npm installing this package? Do I need to change something in the metro.config.js or in the babel.js?

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants