aws-sdk-android icon indicating copy to clipboard operation
aws-sdk-android copied to clipboard

Analytics SDK - Android - InitializationException in amazonmobileanalytics. Encountered an error accessing the file system

Open ramprasad-vuclip opened this issue 1 year ago • 2 comments

Describe the bug A clear and concise description of what the bug is. Crash is observed in craslytics as 'Caused by com.amazonaws.mobileconnectors.amazonmobileanalytics.InitializationException' Encountered an error accessing the file system

To Reproduce A code sample or steps:

Couldn't reproduce this bug and it is observed in crashlytics.

Caused by com.amazonaws.mobileconnectors.amazonmobileanalytics.InitializationException
Encountered an error accessing the file system
com.amazonaws.mobileconnectors.amazonmobileanalytics.MobileAnalyticsManager.<init> (MobileAnalyticsManager.java:137)
com.amazonaws.mobileconnectors.amazonmobileanalytics.MobileAnalyticsManager.getOrCreateInstance (MobileAnalyticsManager.java:308)
com.amazonaws.mobileconnectors.amazonmobileanalytics.MobileAnalyticsManager.getOrCreateInstance (MobileAnalyticsManager.java:267)

We are calling above code during app initialisation. 
In turn in SDK, 
1. MobileAnalyticsManager's constructor calls validate(context) 
2. In FileManagerValidator cass, validate method creates file using "validatorFile = fileManager.createFile(new File(fileManager.getDirectory(""),
                    "validatorFile"));" 
3. Here the exception is thrown
Please support for any resolution

Which AWS service(s) are affected? Amazon Analytics and app crashes due to this

Expected behavior After successful initialisation of Amazon sdk, app can send events.

Screenshots Not available

Environment Information (please complete the following information):

  • Using com.amazonaws:aws-android-sdk-mobileanalytics:2.2.4
  • Any device
  • Any Android Version

ramprasad-vuclip avatar Jan 25 '24 09:01 ramprasad-vuclip

Thanks for the report @ramprasad-vuclip, someone from our team will have a look.

mattcreaser avatar Jan 29 '24 13:01 mattcreaser

@ramprasad-vuclip v2.2.4 is more than 3 years old and includes a large number of bug fixes in that timeframe. Can you upgrade to 2.75.0 and report back if you are still seeing the issue?

tylerjroach avatar Feb 08 '24 20:02 tylerjroach