Skip to content

Conversation

jrodiz
Copy link

@jrodiz jrodiz commented Oct 8, 2025

The provided log points to a java.io.IOException with the message "Unable to create parent directories," which is the root cause of the crash.

This particular error occurred in the host process app and was triggered by a failure to create the necessary directory structure for a Jetpack DataStore file. The file path in question is in the internal directory $filesDir/datastore/aqs/sessionConfigsDataStore.data.version.

  1. FirebaseSessionsComponent is trying to provide a DataStore dependency, this DataStore dependency is located under the file $filesDir/datastore/aqs/sessionConfigsDataStore.data.
image
  1. However DataStore fails to validate the path $filesDir/datastore/aqs/sessionConfigsDataStore.data since $filesDir/datastore/aqs exists as a file without extension (not directory)
image

This check fails and throws an exception

  1. The issue is 100% reproducible if we create a file $filesDir/datastore/aqs before this check
image

The proposed fix is not suitable because there is a file called aqs which supposed to be the parent directory of our datastore:

Possible fix: Make AQS manually handle creating the parent directories for DataStore before initializing the two DataStores in https://github.com/firebase/firebase-android-sdk/blob/main/firebase-sessions/src/main/kotlin/com/google/firebase/sessions/FirebaseSessionsComponent.kt#L125

Proposal:

  1. Change directory folder name from $filesDir/datastore/aqs/ to something more oriented to firebase like $filesDir/datastore/firebase-aqs. This will reset values to default

  2. Remove aqs from the DataSore file structure: $filesDir/datastore/sessionConfigsDataStore.data.version. This will reset values to default

  3. Validate that the aqs file does not exist before initializing the two DataStores, throw and exception for host app.

Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@jrodiz
Copy link
Author

jrodiz commented Oct 10, 2025

closing it : Already integrated

@jrodiz jrodiz closed this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant