javascriptfirebasebrowsergoogle-cloud-firestorekindle

Kindle browser limitations for google firebase


I'm trying to develop a very simple web app and deploy it through Google Firebase to use on my Kindle. While I've had no problem getting it work on modern browsers, the Kindle's very primitive "Experimental Browser", as Amazon calls it, doesn't seem to be able to correctly display the content from a Firestore database. Here's how it looks on a modern (Chromium-based) browser:

enter image description here

The kindle will print its user agent like expected:

Mozilla/5.0 (X11;; U; Linux armv7l; en-us) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+

but not the to-do list.

My code:

document.addEventListener('DOMContentLoaded', function() {
        var db = firebase.firestore();
        db.collection("reminders").get().then((querySnapshot) => {
          querySnapshot.forEach((doc) => {
            var node = document.createElement("li");
            node.appendChild(document.createTextNode(`${doc.data().name}`));
            document.getElementById("reminders").appendChild(node);
          })
        })
      })

For now, I'm not using any kind of authentication (if I can, I plan to do so in the future, though), so that's not the problem.

Does anyone know what is causing the browser to malfunction, and how can I solve it?


Solution

  • The Firestore JavaScript SDK is a quite advanced, and memory intensive, JavaScript library. I doubt the Kindle experimental browser has enough power and memory to run it. If you're able to find the JavaScript console in the browser, you may be able to see what error message is logged. But I'm having a hard time finding information on how to get even that.

    You're likely going to have a rough time if you continue down this path. I'd expect you're more likely to have success if you encapsulate the Firestore code in a simple HTTP(S) endpoint (for example through Cloud Functions), and then call that from a much simpler JavaScript that runs in the Kindle browser.