aries-framework-dotnet icon indicating copy to clipboard operation
aries-framework-dotnet copied to clipboard

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

Open anji22 opened this issue 3 years ago • 6 comments

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

anji22 avatar Aug 19 '21 09:08 anji22

@anji22 check this

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

sahil-khanna avatar Aug 26 '21 13:08 sahil-khanna

@anji22 check this

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

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

anji22 avatar Aug 26 '21 14:08 anji22

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

sahil-khanna avatar Sep 11 '21 04:09 sahil-khanna

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.

matrwolff33 avatar Oct 20 '21 00:10 matrwolff33

@matrwolff33 , you may refer to this

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

sahil-khanna avatar Oct 20 '21 06:10 sahil-khanna

@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.

naman20sharma avatar Oct 20 '21 06:10 naman20sharma