Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore error: "transactionGetDocument called for non-existant transactionId 0" #1556

Closed
ghost opened this issue Oct 3, 2018 · 3 comments
Assignees
Labels
plugin: database Firebase Realtime Database
Milestone

Comments

@ghost
Copy link

ghost commented Oct 3, 2018

When I read a document after a transaction, this line is printed to my logs.

Does this indicate the transaction has failed/is not atomic?

const ok = await fsDb.runTransaction(async (t) => {
    t.set(docRef, data);
    // t.update(docRef, data);
    return true;
});
const d = await docRef.get();
transactionGetDocument called for non-existant transactionId 0

DLog(@"transactionGetDocument called for non-existant transactionId %@", transactionId);

Environment

  1. Application Target Platform:
    iOS

  2. Development Operating System:
    macOS

  3. Build Tools:
    Xcode

  4. React Native version:
    version "0.55.3"

  5. React Native Firebase Version:
    version "4.0.6"

  6. Firebase Module:
    Firestore

@Salakar Salakar added this to the v5.0.1+ milestone Oct 7, 2018
@Salakar Salakar self-assigned this Oct 7, 2018
@Salakar Salakar added plugin: database Firebase Realtime Database rn-reload Workflow: Needs Review Pending feedback or review from a maintainer. labels Oct 7, 2018
@ghost
Copy link
Author

ghost commented Oct 8, 2018

@Salakar Are transactions still safe to use, or does this log message indicate an error state?

@Salakar
Copy link
Member

Salakar commented Oct 11, 2018

@enzomd they are still safe, that log is purely there as a safeguard / fyi i.e. between RN reloads of your app in dev native vs JS can become out of sync, therefore, the transaction could exist in native but not in JS and vice versa.

Am assuming this was local dev of course?

@Salakar
Copy link
Member

Salakar commented Oct 17, 2018

@enzomd I've reworked the transaction logic for iOS in v5.1.0, could you try out the RC and report back in a new issue if you're still seeing this log, thank you.

yarn add [email protected] (use /tests app on master as a reference for SDK versions)


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

@Salakar Salakar closed this as completed Oct 17, 2018
@Salakar Salakar modified the milestones: v5.0.1+, v5.1.0 Oct 21, 2018
@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: database Firebase Realtime Database
Projects
None yet
Development

No branches or pull requests

2 participants