Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Notes longer than 9 characters not saved in Firefox #2065

Open
RathaWynter opened this issue Oct 3, 2024 · 10 comments
Open

[BUG] Notes longer than 9 characters not saved in Firefox #2065

RathaWynter opened this issue Oct 3, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@RathaWynter
Copy link

Notes on the Steam Store page are not saved in Firefox if they are 10 or more characters long, but will save if they are 9 characters. Upon clicking the save button, the edits to the note appear to be discarded. Opening a long preexisting note making an edit, and then saving will not result in any change to the existing note.

Note saving appears to work correctly in Chrome.

Steps to Reproduce the Problem

  1. Edit a preexisting note, or start a new one.
  2. Type until there are 10 or more characters.
  3. Click green Save button (or press enter)
  4. Note will not update on the store page.
  5. Subsequent refreshes / newly opened tabs of that store page will also not show the update. (Not just a page refresh issue.)

Specifications

  • Augmented Steam Version: 4.1.2
  • Browser Version: Firefox 130.0.1 - Sep 25, 2024
@RathaWynter RathaWynter added the bug Something isn't working label Oct 3, 2024
@candela97
Copy link
Collaborator

Do you have a lot of notes? You might have reached the storage limit, so you'll need to switch to the local database storage method in options, and optionally use ITAD to sync your notes.

@RathaWynter
Copy link
Author

Not sure if you still need this info:

Augmented Steam > Options >IsThereAnyDeal > "Sync notes automatically" (off)
Augmented Steam > Options > Store > User notes > "Synced/Local"

I wouldnt say i have a LOT of notes, about 170 or so. Total text size is probably less than 4000 bytes. This issue specifically is related to adding / editing the notes from the Steam store page (which should be local storage.)

I have tried to synced data to/from ITAD between Chrome and Firefox a week ago, but dont think both browser versions have the same notes due to importing seeming to not finish up properly in either browser.)

Its possible that Chrome has fewer characters in notes than Firefox does after the import weirdness and so FF isnt letting me update the notes further. I wouldnt think id have hit a character cap for local storage notes though unless local storage was corrupted / bloated from the 25+ minute sync attempt that i had to cancel multiple times.

@candela97
Copy link
Collaborator

I wouldnt say i have a LOT of notes, about 170 or so. Total text size is probably less than 4000 bytes. This issue specifically is related to adding / editing the notes from the Steam store page (which should be local storage.)

You can test by entering about:debugging in the address bar, click on the Inspect button for this extension to open the dev console, then enter JSON.stringify(await browser.storage.sync.get("user_notes")).length

I have tried to synced data to/from ITAD between Chrome and Firefox a week ago, but dont think both browser versions have the same notes due to importing seeming to not finish up properly in either browser.)

If you have been using synced storage all this time, your notes should be no more than 8KB. You want to try again? Remember to push your notes before enabling auto sync, then you can check the ITAD site to see if all your notes are there.

@RathaWynter
Copy link
Author

RathaWynter commented Oct 3, 2024

Looks like the response to JSON.stringify(await browser.storage.sync.get("user_notes")).length was: 8194

I guess this might possibly explain why the sync never successfully imports if theres a character limit of 8k (I could have sworn i was under 4k, but turns out that maybe exporting from FF and then from Chrome and then trying to re-import to both put me over the limit on FF. Am not quite sure how much space is left on chrome.)

The first / only day i tried to use browser sync to ITAD was on the 25th of September 2024. Hadnt tried it since because it wasnt working as expected. (Probably due to being near/at the cap.)

Will setting: Augmented Steam > Options > Store > User notes > "Synced/Local" to LOCAL
allow me to go over the 8k cap, or is it capped at 8k for both online and local storage?

I thought it'd be nice to have notes synced between FF and Chrome, but if it cant sync due to being too large, and i cant add any more notes due to being over the cap, gonna need to figure out a different solution.

Is it possible to delete local notes without wiping the rest of the saved data?

EDIT: Are the notes on https://isthereanydeal.com/notes/ displayed in any particular order? They seem pretty random. Its not alphabetical, and its not sorted by add or edit date, and its not sorted by app id either.

EDIT2: At this point the data stored in both browsers and on ITAD are all different and im not really sure how to rectify the issue if im at the online storage cap.

@candela97
Copy link
Collaborator

candela97 commented Oct 3, 2024

I think we need to clear up some things first 😅
Synced/local means you can sync data by logging in the same browser profile across multiple devices. This doesn't support cross browser syncing and you'll have to manually export/import, and there's also a storage limit set by browsers.
Local database means storing notes on your hard drive, so you can store as many notes as you want as long as there's available space. This doesn't support any sort of syncing and you'll have to do so manually.
Syncing via ITAD was added recently and is a separate optional feature. There is a per note character limit, but total size shouldn't be something you need to worry about for now.

So in your case, I would suggest switching to local database, then if you'd like to use ITAD sync, determine which browser holds all of your notes and export to ITAD from there, or edit them manually by exporting/importing settings first (user notes are stored under the user_notes key, a diff checker https://www.diffchecker.com/ may also be of help). After that, you can enable auto sync in options and all browsers logged into ITAD will be synced according to data saved on ITAD.

To delete notes only you can run await browser.storage.sync.remove("user_notes") on FF, or await chrome.storage.sync.remove("user_notes") on chrome while your notes are saved in synced storage. Editing local database involves more steps so I suggest you deal with them before changing storage methods.

@RathaWynter
Copy link
Author

Thanks for the detailed response.

I dont have multiple devices, just one Firefox and one Chrome browser on the same PC that i use Augmented Steam / ITAD with.

I had different notes stored in Firefox and Chrome prior to the recent addition of note syncing on ITAD. On the 25th had attempted to sync them both to ITAD so that i could re-download the complete set to each browser, but at the time the download indicators would never stop spinning so im pretty certain that they didnt sync fully to local storage.

Exported Augmented Steam settings from both browsers and found the notes sections were quite different. Ive got a bit of work ahead of me to combine the notes, but i can probably manage it now that i know they're stored in the export.json.

Just to clarify: Setting Augmented Steam > Options > Store > User notes > "Synced/Local" to "Local Database" should solve the problem with being unable to edit notes?

(I set it to Local Database much earlier in the day, opened a new tab, and had trouble with adding a new note just a few minutes ago (~100 characters long.) Since this happened I've not been able to cause it to break again. Additionally, was able to save a fairly long note (300-400 characters worth of a test message. So im not really sure what happened. Seems to be working normally now.)

@candela97
Copy link
Collaborator

Just to clarify: Setting Augmented Steam > Options > Store > User notes > "Synced/Local" to "Local Database" should solve the problem with being unable to edit notes?

Yes

(I set it to Local Database much earlier in the day, opened a new tab, and had trouble with adding a new note just a few minutes ago (~100 characters long.) Since this happened I've not been able to cause it to break again. Additionally, was able to save a fairly long note (300-400 characters worth of a test message. So im not really sure what happened. Seems to be working normally now.)

What kind of trouble? Sadly if it's not reproducible it'll be difficult to investigate. Also ITAD may not be able to store a note that long. The current character limit is 255.

@RathaWynter
Copy link
Author

RathaWynter commented Oct 7, 2024

What trouble:
I had changed to Local Database earlier in the day, and then later in the day when i went to add a new note it didnt save the note. So i refreshed the page and it failed to store the note again. But the 3rd attempt it stored a short note successfully, and then it stored the 400 character note locally too.

Its possible that i was hitting Enter instead of clicking on the save button after changing it to local database (normally i click the button.) With a bit more testing it appears that pressing enter in Firefox will dismiss the note without saving. (But in Chrome pressing enter will save the note.)

EDIT: (When Sync/Local was enabled, i had done testing with clicking the button and hitting enter, but apparently because i was at the ~8k cap that might have been the cause of the note not saving in both instances. Once changing to Local Database notes, i didnt do much testing after it seemed to work. Pressing enter reliably dismisses the note (on Firefox) however.)

@candela97
Copy link
Collaborator

Its possible that i was hitting Enter instead of clicking on the save button after changing it to local database (normally i click the button.) With a bit more testing it appears that pressing enter in Firefox will dismiss the note without saving. (But in Chrome pressing enter will save the note.)

Ah, that sounds like #2057

@Korb
Copy link

Korb commented Dec 7, 2024

You can test by entering about:debugging in the address bar, click on the Inspect button for this extension to open the dev console, then enter JSON.stringify(await browser.storage.sync.get("user_notes")).length

I have completed the following steps:
2024-12-07_19-42-37

What is this supposed to mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants