hyperledger-archives / aries-mobile-agent-xamarin

Apache License 2.0
39 stars 31 forks source link

Cannot create Pool using the CreatePoolAsync() function #32

Closed syedshahzebhasnain closed 3 years ago

syedshahzebhasnain commented 3 years ago

Hi,

Hoping somebody could help me out with an issue I am facing. I am trying to create pool using the code mentioned in aries-mobileagent xamarin/src/Osma.Mobile.App/Services/PoolConfigurator.cs.

The code fails on this line : await poolService.CreatePoolAsync(config.Key, filename).ConfigureAwait(false);

I keep getting an IO error while trying to create a pool. Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync

I am following the same pattern in as in this project to write./read genesis.txn file.

I have also verified that the android device has the correct permissions to read write files

horationunez commented 3 years ago

Can you confirm me which version of Android you are using here? The recent versions have a new permission system that can fail silently and impact this particular step (we don't have explicit support for this yet).

syedshahzebhasnain commented 3 years ago

Hi @horationunez ,

Thanks for the quick response. I did figure out that if my application targets Android 29, the application fails. However, with Android 28, it works fine.

horationunez commented 3 years ago

@syedshahzebhasnain this will work with Android 29, but you will need this line in your manifest:
<application android:requestLegacyExternalStorage="true" android:label="YourAppName"></application>

syedshahzebhasnain commented 3 years ago

Hi @horationunez , I already had this snippet android:requestLegacyExternalStorage="true" in the manifest file yet I was still getting the same issue.