sprig
sprig copied to clipboard
Sprig code editor V2 not saving things properly on firefox on linux
it sometimes saves and sometimes doesnt so i have to keep backups
Are you able to give reproducible steps so I can test this? Saving works for me. When you say "sometimes doesn't", is it erroring, getting stuck, or saying saved but not actually saving?
Ofc, it says saved but when i close firefox and then open it again it often does not save even if it says its saved at the top to reproduce this use firefox in pop os (pop os comes with firefox but i think it is installed as a flatpack) and also pop os is based on ubuntu
you go to the new editor and you code i don't know if copy pasting things changes the behavior of the save, maybe it only
saves things when you type and not when you paste things, it doesnt seem to be that tough because i can copy paste
sometimes and it works, i will try to see if i see anything in the console
do you also get this?
i don't know what else i can show you because i don't know whats happening other than that
I haven't been able to reproduce this at all. @grymmy do you think you could sanity check me and give it a go as well.
@Patcybermind Given @kognise wasn't able to repro, can you please either
a) Provide clearly articulated steps to reproduce this issue (like step 1, go here. step 2, click this button. etc) or b) Can you possibly share a video screen recording of you experiencing the issue?
I think without some help from you, @Patcybermind, it'll be difficult to get to the bottom of this efficiently...
ok ill try my best :
- turn on computer with Linux on it
- open Firefox installed as a flatpack
- go to the new editor
- start a project
- save it
- write code
- close firefox
- open it again and see if the newest changes were saved if they were turn off your computer(idk if that changes anything) and do the steps 6 to 8 again
I will share a screen recording with more details too
Screencast from 2023-03-16 06:37:26 PM.webm i also copy pasted the yellow text :
Loading failed for the <script> with source “https://plausible.io/js/plausible.js”. [uS9x9ZogVUQOOm5F75aY:28:1](https://sprig.hackclub.com/~/uS9x9ZogVUQOOm5F75aY)
Content-Security-Policy warnings 4
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified [anchor](https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdopcUkAAAAADUyrxhp32xJ1PAh9pS9mmX00UPE&co=aHR0cHM6Ly9zcHJpZy5oYWNrY2x1Yi5jb206NDQz&hl=en&v=Trd6gj1dhC_fx0ma_AWHc1me&size=invisible&cb=pzmdl0yfj7ge)
Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified [anchor](https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdopcUkAAAAADUyrxhp32xJ1PAh9pS9mmX00UPE&co=aHR0cHM6Ly9zcHJpZy5oYWNrY2x1Yi5jb206NDQz&hl=en&v=Trd6gj1dhC_fx0ma_AWHc1me&size=invisible&cb=pzmdl0yfj7ge)
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified [anchor](https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdopcUkAAAAADUyrxhp32xJ1PAh9pS9mmX00UPE&co=aHR0cHM6Ly9zcHJpZy5oYWNrY2x1Yi5jb206NDQz&hl=en&v=Trd6gj1dhC_fx0ma_AWHc1me&size=invisible&cb=pzmdl0yfj7ge)
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified [anchor](https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdopcUkAAAAADUyrxhp32xJ1PAh9pS9mmX00UPE&co=aHR0cHM6Ly9zcHJpZy5oYWNrY2x1Yi5jb206NDQz&hl=en&v=Trd6gj1dhC_fx0ma_AWHc1me&size=invisible&cb=pzmdl0yfj7ge)
Partitioned cookie or storage access was provided to “https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdopcUkAAAAADUyrxhp32xJ1PAh9pS9mmX00UPE&co=aHR0cHM6Ly9zcHJpZy5oYWNrY2x1Yi5jb206NDQz&hl=en&v=Trd6gj1dhC_fx0ma_AWHc1me&size=invisible&cb=pzmdl0yfj7ge” because it is loaded in the third-party context and dynamic state partitioning is enabled.
Some cookies are misusing the recommended “SameSite“ attribute 2
Cookie “hideHelp” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite [editor.95a811ac.js:217:162](https://sprig.hackclub.com/_astro/editor.95a811ac.js)
Cookie “outputAreaSize” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite [editor.95a811ac.js:217:2057](https://sprig.hackclub.com/_astro/editor.95a811ac.js)
downloadable font: no supported format found (font-family: "Roboto" style:normal weight:400 stretch:100 src index:1) source: (end of source list)
Storage access denied, but a redirect would be bad for UX [legacy-migration.2bb16353.js:1:806](https://sprig.hackclub.com/_astro/legacy-migration.2bb16353.js)
and heres the neofetch output
patcybermind@pop-os:~$ neofetch
///////////// patcybermind@pop-os
///////////////////// -------------------
///////*767//////////////// OS: Pop!_OS 22.04 LTS x86_64
//////7676767676*////////////// Host: Alienware Aurora R9 1.0.14
/////76767//7676767////////////// Kernel: 6.2.0-76060200-generic
/////767676///*76767/////////////// Uptime: 2 hours, 20 mins
///////767676///76767.///7676*/////// Packages: 2249 (dpkg), 52 (flatpak)
/////////767676//76767///767676//////// Shell: bash 5.1.16
//////////76767676767////76767///////// Resolution: 1920x1080
///////////76767676//////7676////////// DE: GNOME 42.5
////////////,7676,///////767/////////// WM: Mutter
/////////////*7676///////76//////////// WM Theme: Pop
///////////////7676//////////////////// Theme: Pop-dark [GTK2/3]
///////////////7676///767//////////// Icons: Pop [GTK2/3]
//////////////////////'//////////// Terminal: gnome-terminal
//////.7676767676767676767,////// CPU: Intel i7-9700 (8) @ 4.700GHz
/////767676767676767676767///// GPU: NVIDIA GeForce RTX 2080 SUPER
/////////////////////////// GPU: Intel CoffeeLake-S GT2 [UHD Grap
///////////////////// Memory: 8827MiB / 15821MiB
i think and hope this is enough!
@Patcybermind Thank you for the excellent video and explanation of your setup. For those looking for the money shot in the vid, 2:15 shows the editor clearly saying text was saved, and then firefox is closed and reopened to the same URL, and boom Pat's changes are gone.
RE: the Storage access denied, but a redirect
error, looking at the code it seems that log is emitted during the decision-making process of whether to display some migration UI notification - doesn't seem related to this issue, but @kognise might be able to double-check me there...
Moving this to the bug queue with high priority.
Thank you SO SO much for your reproduction! I was able to reproduce macOS Firefox. Some details:
Graham is correct, the Storage access denied
error is unrelated.
I discovered that the editor is actually saving the file properly! This bug only occurs if "Open previous windows and tabs" is enabled in Firefox preferences; for some reason when the tab is restored the original content loads in rather than the new content. If you reload the tab without making any changes, the code will actually be restored!
Will do further investigation into this to figure out what layer this bug is at.
Looks like I fixed this in 47b2368 (PR incoming) but for future regressions: this can be easily reproduced/tested with Ctrl-Shift-T.
@kognise you are right i just need to reload the tab!
Seems like this issue is happening again on firefox (see issue #1225)
a user also reported this issue happening on Edge