Can't fetch database content when deployed, "Only absolute URLS are supported"

Question:
Since replit phased out the “Always On” setting, I had to migrate my Discord bot to one of the deployment options. The deployment itself works fine, but every time it tries to fetch a user’s data from the replit database, the whole thing crashes. It prints the following error: “TypeError: Only absolut URLS are supported.” How do I fix this?

Here’s an example of fetching stuff from the database. This one runs every time the bot starts to set up cron jobs, so the bot immediately crashes upon launching.

GetAllProfiles: async function() {
    let UserIDs = []
    let Profiles = []

    return new Promise((resolve) => {
      Database.list().then(Keys => {
        let Counter = 0
        Keys.forEach(function (item, index) {
          Database.get(item).then(Profile => {
            UserIDs.push(item);
            Profiles.push(Profile);
            Counter += 1;

            if(Counter == (Object.keys(Keys).length)) {
              resolve([UserIDs, Profiles]);
            }
          });
        });
      });
    });
  }
3 Likes

Found this hidden away in the docs, anyone know how to use /tmp/replitdb?

1 Like

Were you able to find a solution for this?