Skip to content

runTransaction doesn't work in Chrome extension MV3Β #6483

Open
@tarasinf

Description

@tarasinf
  • Operating System version: Ubuntu 20.04.3 LTS
  • Browser version: 102.0.5005.61
  • Firebase SDK version: 9.6.5
  • Firebase Product: firestore
  • Chrome extension: VM3

The problem

I can't use runTransaction in Chrome extension MV3 as it doesn't support XMLHttpRequest. All other commands work well.
I found that it was fixed on GH (for some reasons, not for transactions).

Steps to reproduce:

    let userRef = doc(db, 'users', userInfo.id);
    runTransaction(db, transaction => {
      return transaction.get(userRef).then(userDoc => {
        return transaction.update(userRef, { 'eventName': 42 });
      });
    });

I got an error: Uncaught (in promise) FirebaseError: ReferenceError: XMLHttpRequest is not defined

My assumption is that V9 still uses XMLHttpRequest in runTransaction.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions