We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Saber mais

Possible incompliances with the indexedDB Spec

  • 2 respostas
  • 0 têm este problema
  • 1 visualização
  • Última resposta por cor-el

more options

I was working in a project where I use the indexedDB API to store the state of some process on the client side until the app could connect to the server. The state of the process is represented by an instance of Object with a heavy nested structure (usually of 4 to 5 layers: some properties of the object instance were arrays of other objects who has more arrays within). The process is being stored in its own ObjectStore with a key path linked to a property of the first layer of the object instance (an uid) and I'm using a put request to update the stored object as the process advances. The problem is that, when the process starts I can store it without any problem and even I can update it as it grows, but when it becomes big enough something goes worng. The put request still is being completed without error events and even the success event is fired but the API stores not an instance of Object but instead of Array (more precisely an array of strings that joined are some kind serialization of the object instance) and with that I can not access to the data of my process reliably.

More important than my description of what is happening in firefox is the observation that in the chromium based browsers this is not happening and my code works as expected and I could maintain the process state as my app runs.

I was working in a project where I use the indexedDB API to store the state of some process on the client side until the app could connect to the server. The state of the process is represented by an instance of Object with a heavy nested structure (usually of 4 to 5 layers: some properties of the object instance were arrays of other objects who has more arrays within). The process is being stored in its own ObjectStore with a key path linked to a property of the first layer of the object instance (an uid) and I'm using a put request to update the stored object as the process advances. The problem is that, when the process starts I can store it without any problem and even I can update it as it grows, but when it becomes big enough something goes worng. The put request still is being completed without error events and even the success event is fired but the API stores not an instance of Object but instead of Array (more precisely an array of strings that joined are some kind serialization of the object instance) and with that I can not access to the data of my process reliably. More important than my description of what is happening in firefox is the observation that in the chromium based browsers this is not happening and my code works as expected and I could maintain the process state as my app runs.
Capturas de ecrã anexadas

Todas as respostas (2)

more options

I forgot to say that I'm in local and I have plenty of quota. So this is not related to a QuotaExceededError but rather it seems to be a problem with the size of the value of the record that i'm attempting to put in the object store

more options

Try to ask advice on a web development oriented forum.