Closed valavanisleonidas closed 9 months ago
btw if I use "@hyperledger/aries-askar-react-native": "0.2.0-dev.1",
instead of 0.1.1
I get this error during build
I run using Mac M2 node v16.16 and tried v18.0 as well
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':hyperledger_aries-askar-react-native:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/.cxx/Debug/5d4t2544/arm64-v8a'
[1/5] Building CXX object 'CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp.o'
FAILED: CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp.o
/Users/user/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --sysroot=/Users/user/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dariesaskarreactnative_EXPORTS -I/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../cpp -I/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../cpp/include -I/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../native/mobile/android/arm64-v8a -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon/callinvoker -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon/jsi -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon/runtimeexecutor -I/Users/testApp/mobileAppTest/node_modules/react-native/ReactCommon/yoga -isystem /Users/user/.gradle/caches/transforms-3/8fe27c04def1192978b13f3646b3fab6/transformed/jetified-react-android-0.72.4-debug/prefab/modules/jsi/include -isystem /Users/user/.gradle/caches/transforms-3/8fe27c04def1192978b13f3646b3fab6/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include -isystem /Users/user/.gradle/caches/transforms-3/521cd468cbebe6dc0785507890aaf83f/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include -fexceptions -frtti -std=c++1y -DONANDROID -g -fno-limit-debug-info -fPIC -MD -MT 'CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp.o' -MF CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp.o.d -o 'CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp.o' -c '/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp'
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp:278:20: error: no matching function for call to 'askar_store_set_default_profile'
ErrorCode code = askar_store_set_default_profile(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../cpp/include/libaries_askar.h:594:11: note: candidate function not viable: no overload of 'callbackWithResponse' matching 'void (*)(CallbackId, ErrorCode)' (aka 'void (*)(long, ErrorCode)') for 3rd argument
ErrorCode askar_store_set_default_profile(StoreHandle handle,
^
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp:1048:20: error: no matching function for call to 'askar_string_list_count'
ErrorCode code = askar_string_list_count(stringListHandle, &out);
^~~~~~~~~~~~~~~~~~~~~~~
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../cpp/include/libaries_askar.h:599:11: note: candidate function not viable: no known conversion from 'ArcHandle_FfiEntryList' to 'StringListHandle' (aka 'ArcHandle_FfiStringList') for 1st argument
ErrorCode askar_string_list_count(StringListHandle handle, int32_t *count);
^
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/ariesAskar.cpp:1057:3: error: no matching function for call to 'askar_string_list_free'
askar_string_list_free(stringListHandle);
^~~~~~~~~~~~~~~~~~~~~~
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/../cpp/include/libaries_askar.h:601:6: note: candidate function not viable: no known conversion from 'ArcHandle_FfiEntryList' to 'StringListHandle' (aka 'ArcHandle_FfiStringList') for 1st argument
void askar_string_list_free(StringListHandle handle);
^
3 errors generated.
[2/5] Building CXX object 'CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/HostObject.cpp.o'
[3/5] Building CXX object CMakeFiles/ariesaskarreactnative.dir/cpp-adapter.cpp.o
[4/5] Building CXX object 'CMakeFiles/ariesaskarreactnative.dir/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/cpp/turboModuleUtility.cpp.o'
ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing:
/Users/user/Library/Android/sdk/cmake/3.22.1/bin/ninja \
-C \
/Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android/.cxx/Debug/5d4t2544/arm64-v8a \
ariesaskarreactnative
from /Users/testApp/mobileAppTest/node_modules/@hyperledger/aries-askar-react-native/android
Using 0.1.0 in RN environment M1, app is building fine, credential definition created successfully from node app, we have node agent as issuer
@djleonskennedy thanks for your answer. I think we have a different use case though.
First of all, you use 0.1.0 for askar ? Also, I want to offer credentials from the mobile so i want to import the did and create a schema and definition in the mobile.
I can create a definition in the node app as well but the same code doesn't work in the mobile
Hmm this seems like an indy-vdr error, where it is expecting an unqualified did, but a qualified did (with did:indy:bcovrin:test
) is passed.
@valavanisleonidas did you try to run the same code in Node.JS to see if it succeeds?
Hey @TimoGlastra thanks for your answer. Yes I have tried the same code in nodeJs and it works
In my code I pass a qualifiedDid but even if I pass only TGScrcgjEykofSnVdJqPWp
it crashes
const schemaResult = await agent.modules.anoncreds.registerSchema({
schema: {
attrNames: ['name', 'age'],
issuerId: 'did:indy:bcovrin:test:TGScrcgjEykofSnVdJqPWp',
name: 'Example Schema to register',
version: '2.0.6',
},
options: {},
});
@valavanisleonidas can you try to reproduce the issue with the latest 0.5.0 alpha release and 0.2.0 for all the shared components? If the issue still persists happy to take a look at it further
Closing for now, but please re-open if it persists
Hello,
I am running a mobile agent in React native with all the latest release versions except from aries-askar because it fails to build and when I try to create to register the schema definition I get this error . Can anyone help me with this error or at least share a working version with the packages that should be working ? I also have a discord thread for that issue if thats easier :) Thanks a lot !!!
The error is
My package.json looks like this
and my code like this