title: Firebase Firestore Bundle problem: Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream
body: <p>I'm trying to configure a Firestore bundle for my React site.</p>
  <p>Specific error:</p>
  <p><em>Uncaught (in promise) Error: Source of <code>toByteStreamReader</code> has to be a ArrayBuffer or ReadableStream</em></p>
  <p>firebase.config:</p>
  <pre><code>import { initializeApp } from 'firebase/app';
  import { getFirestore } from 'firebase/firestore';
  
  const firebaseConfig = {...};
  
  const app = initializeApp(firebaseConfig);
  export const db = getFirestore(app);
  </code></pre>
  <p>app.js:</p>
  <pre><code>const fetchReadings = async () =&gt; {
  
      const resp = await fetch('/createBundle');
      await loadBundle(db, resp.data);
      const bundleQuery = await namedQuery(bundle, 'all-readings-query');
      const readingSnapshot = await bundleQuery.get({ source: 'cache' });
  </code></pre>
  <p>Previously I was getting my <code>readingSnapshot</code> with this and it worked fine:</p>
  <pre><code>const readingQuery = query(collection(db, &quot;readings&quot;));
  const readingSnapshot = await getDocs(readingQuery);
  </code></pre>
  <p>Any insight as to what I'm missing would be appreciated. I don't seem to be able to find any examples of this implementation online so am fumbling round a bit.</p>