hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
85 stars 74 forks source link

Getting Hyperledger.Indy.IOException: An IO error occurred. while running Mobile Agent in Android 10 #195

Open anji22 opened 3 years ago

anji22 commented 3 years ago

Unable to write the .indyClient files in the Android 10 device.Getting below issue.All permissions are granted Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x0002d] in D:\a\1\s\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 at SSIWalletApplication.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\Users....\Documents\SSIMasterBranch\src\SSIWalletApplication\SSIWalletApplication\Services\PoolConfigurator.cs:54 [0:] SSIWalletApplication.Services.PoolConfigurator: Critical: Couldn't create pool config

sahil-khanna commented 3 years ago

@anji22 check this

https://github.com/hyperledger/aries-mobile-agent-xamarin/issues/19#issuecomment-779790627

anji22 commented 3 years ago

@anji22 check this

hyperledger/aries-mobile-agent-xamarin#19 (comment)

@sahil-khanna Thanks for the information. it's working now.

sahil-khanna commented 3 years ago

@anji22, you may close this issue if it's resolved.

matrwolff33 commented 3 years ago

Apologize if this should be a separate ticket, but facing this issue with Android 11 since new apps must be submitted targeting API 30. It seems the legacy external storage tag is ignored with 11.

sahil-khanna commented 3 years ago

@matrwolff33 , you may refer to this

https://github.com/hyperledger/indy-sdk/issues/2382#issuecomment-893565952

naman20sharma commented 3 years ago

@matrwolff33 Adding the following line should work in your mainactivity,cs, right before loading indy libraries. Android.Systems.Os.Setenv("EXTERNAL_STORAGE", GetExternalFilesDir(null).AbsolutePath, true); JavaSystem.LoadLibrary("c++_shared"); @TimoGlastra did the same in RN-aries application. After this you won't need android:requestLegacyExternalStorage="true" flag in your manifest file.