-
Notifications
You must be signed in to change notification settings - Fork 9
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
Strange error when saving the tiddlywiki #3
Comments
Had the same happening to me. The file was corrupted afterwards though. Happened after (seemingly) too frequent saves (multiple within a couple of seconds). |
Looks like TW is trying to modify the served wiki while another http request is happening (maybe a background save?). @OutOfBrain are you also on android? |
This happened to me today on iOS, and resulted in a corrupted wiki so it's just a blank page when you open it. |
I haven't been able to repro this. Can anyone offer more details on their usage? Perhaps install with Do you have the wiki file open in multiple tabs? |
I can reproduce it on my server. The error occurs when you have multiple overlapping PUT requests. In my case, I'm running widdler I'm hosting a ~20mb wiki behind a reverse proxy. Save requests are pretty slow, so it's easy to accidentally send multiple. |
Update and clarification: the overlapping saves are what cause the error message, but I haven't been able to get it to reliable corrupt the wiki with that alone. However, if I start a save request on my phone, and then immediately close the browser or change tabs before the save completes, then it will corrupt 100% of the time. I'm guessing iOS interrupts xhr requests when a tab is in the background or something? |
Ok, I think I have a solution for the 423 issue but I think the corruption when saving is interrupted will be more involved. |
Hopefully this helps with #3 (at least the HTTP 423 errors).
Would anyone hitting the 423 issue be willing to try the muxd-handlers branch? |
I'm not a go expert. I installed it with
but got this error:
|
Ah OK |
I still experience that error. Not on localhost, but I host |
Ok, dang. I have been testing on localhost (loading a wiki up with a large number of images) - I'll try a remote install to see if I can repro |
Maybe you can add sleep to the PUT handler. :)
|
Alright, anyone wanna try 1.2.0? ( I extended the locking a bit (shout out to diamondburned in #go-lang:matrix.org for the pointers!). I still haven't been able to repro the 423 error. My vps is running OpenBSD.. maybe that has something to do with it - I will continue testing with a linux box and see what I get. |
I just tested it and it seems like the error from overlapping requests is gone (the corruption issue still exists though) To test locally, I used Firefox's network throttling feature (under the network tab in the dev tools). I sent overlapping save requests this way and didn't encounter the error from before. I also repeated it with version 1.1.3 to verify, and I did get the error in the older version. On the 1.1.3 test I didn't get error 423 either, just an ajax error with error code 0. I wasn't able to reproduce the 423 error either. |
@AlexRamallo thanks for including the testing steps! I'll think more on the corruption. |
I can reproduce this on my android phone and on Chrome: when saving, I get "Error while saving: XMLHttpRequest error code: 423".
It seems however that the file is saved correctly.
The text was updated successfully, but these errors were encountered: