enakada / foxy-manga-reader

Manga reading add-on for Mozilla Firefox
Mozilla Public License 2.0
6 stars 1 forks source link

Sync issue #13

Open magecu opened 6 years ago

magecu commented 6 years ago

There seems to be still an issue with syncing.

One of the parts of the sync is still to large:

1519300371714 Sync.Engine.Extension-Storage ERROR Syncing foxy-manga-reader@enakada: request failed: Error: HTTP 507; Error: HTTP 507 Insufficient Storage: Resource access is forbidden for this user (Collection maximum size exceeded (216351 > 204800 Bytes).) (resource://services-common/kinto-http-client.js:2354:21) JS Stack trace: formatResponse@kinto-http-client.js:2377:21 < processResponse@kinto-http-client.js:2352:14 1519300371714 Sync.Engine.Extension-Storage WARN Syncing failed: Error: HTTP 507; Error: HTTP 507 Insufficient Storage: Resource access is forbidden for this user (Collection maximum size exceeded (216351 > 204800 Bytes).) (resource://services-common/kinto-http-client.js:2354:21) JS Stack trace: formatResponse@kinto-http-client.js:2377:21 < processResponse@kinto-http-client.js:2352:14

enakada commented 6 years ago

Hi there,

This error is a little different from the one before. I was expecting this at some point. The problem is that the sync storage has a size limit. Mozilla's documents says 100kb maximum, but it seems to be 200kb.

I've been optimizing the size of what is stored in the sync storage, but for now I can only limit the maximum number of manga allowed.

magecu commented 6 years ago

Yeah that is not that helpful from mozilla's side. T_T At the moment I have 322 mangas bookmarked. I could probably halve the number by just removing the mangas that are completed and fully read. Thanks for the heads up.

Maybe better than limit the amount of manga, would be better to warn the user that he has exceeded the limit imposed by Mozilla. And give an option for manual synchronisation trough import export. Also a nice perk would be to have more info about the manga on the dashobard. Like number of chapter, the last chapter read. If the site support's it maybe also an indication if the manga is completed and if it is a One shot.

But I don't think that any of these features is a high priority or a must.

If anything maybe an indicator of a successful/unsuccessful sync and a warning about the limit of maximum synchronizable bookmarks.

On my end I will solve the problem, by just removing some of the mangas.

Thank you for the heads-up. I never really took the time to check the development of browser extensions, was always busy with something else. :)

And again thank you for the amazing extension!

enakada commented 6 years ago

Maybe better than limit the amount of manga, would be better to warn the user that he has exceeded the limit imposed by Mozilla. And give an option for manual synchronisation trough import export.

I really liked your idea, but the problem is that there is no way to know when the sync storage limit is exceeded. Even though MDN documentation says If you try to store more than this, the call will fail with an error message, that's not what happens.

To make things worse, when you delete an entry from the sync storage, it changes the entry status to deleted until it can synchronize with the server. However, because it already exceeded the size limit, the sync won't complete, making it impossible to recover from this error.

For now I will limit the size to 300 manga and I will think of an alternative. Maybe a way of using Dropbox to sync the data.

Also a nice perk would be to have more info about the manga on the dashobard. Like number of chapter, the last chapter read. If the site support's it maybe also an indication if the manga is completed and if it is a One shot.

I've added chapter progress information to the Dashboard. It will be available in the next version. The 'completed' vs 'ongoing' information would be a nice plus, I will see what I can do about it! :)

Thanks again for your help with the sync related problems!

magecu commented 6 years ago

You are welcome and thank you.

Even though MDN documentation says If you try to store more than this, the call will fail with an error message, that's not what happens.

I hate it so much when the documentation doesn't match the with how things actually work. Still better than no documentation at all. :)

GameBurrow commented 6 years ago

Maybe temporarily add option to disable the sync feature to allow more manga?

enakada commented 6 years ago

Maybe temporarily add option to disable the sync feature to allow more manga?

My idea is to add an option to let users choose where they want to save their data:

I'm currently working on this, I will probably release an update next week allowing users to switch between local and sync storage. The Dropbox integration will have to wait a little bit though.

magecu commented 6 years ago

Wow that would be great. An amazing set of options, that should satisfy everyone. Anyway with the completed mangas removed form the list, sync is working great for me now.