Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
firebase RTDB startAfter() is not a function

I am trying to paginate a list of items with Vuefire, and for some reason I am getting an error with the below code (when I call startAfter(), the function works fine with startAt())

lastVisible is an object in my component's state with the property expire_date (a UNIX timestamp)

This is the error I get

Any idea what is wrong?

    async seeFurtherGames() {
      var games_ref = db.ref('games')
      console.log("GameBrowser.seeOlderGames()", this.lastVisible, games_ref)
      if (this.lastVisible) {
        var start = this.lastVisible.expire_date
        var query = games_ref.orderByChild('expire_date').startAfter(start).limitToFirst(this.item_limit)
        await this.$bind("games", query)
        this.setLastVisible()
        
      }
    }
Uncaught (in promise) TypeError: games_ref.orderByChild(...).startAfter is not a function
    at _callee3$ (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/GameBrowser.vue?vue&type=script&lang=js&:257)
    at f (chrome-extension://bfnaelmomeimhlpmgjnjophhpkkoljpa/content_script/inpage.js:141)
    at Generator._invoke (chrome-extension://bfnaelmomeimhlpmgjnjophhpkkoljpa/content_script/inpage.js:141)
    at Generator.next (chrome-extension://bfnaelmomeimhlpmgjnjophhpkkoljpa/content_script/inpage.js:141)
    at asyncGeneratorStep (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:9)
    at _next (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:31)
    at eval (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:38)
    at new Promise (<anonymous>)
    at eval (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:27)
    at VueComponent.seeFurtherGames (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/GameBrowser.vue?vue&type=script&lang=js&:270)
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The startAfter and endBefore operations in the Firebase Realtime Database were introduced in version 8.2.7 of the JavaScript SDK.

about 4 years ago · Juan Pablo Isaza Denunciar

0

I was able to fix this problem by upgrading firebase from v8 to v9

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda