goread icon indicating copy to clipboard operation
goread copied to clipboard

Lost all of my subscriptions on goread.io

Open qbeuek opened this issue 11 years ago • 14 comments

Yesterday I had my www.goread.io open, pressed 'r' to refresh the feeds and got a screen informing me I'm not subscribed to any feeds. This situation still remains. I lost all of my subscriptions! Also, in the top right, there is no information about my account. When I go to account details page though, I can see my payment is still active. I use a google integrated account.

qbeuek avatar Jul 23 '13 16:07 qbeuek

You are the second person to report this. If it's the same as the first, the feeds are likely gone. You'll have to upload your OPML file again. If you don't have a copy of it, then all I can say is I'm sorry. I'm not sure why this is happening, but I'll try to build some protections in against it.

maddyblue avatar Jul 23 '13 17:07 maddyblue

Thanks for the update. Maybe I'll try to hunt the bug myself then :-)

qbeuek avatar Jul 23 '13 17:07 qbeuek

The way it's built, goread doesn't have to modify the OPML ever. It's all done in the JS, and which is then sent over as a JSON blob. My first idea would be that the browser encountered some bug or error, and is sending over an empty OPML blob, which goread happily reads and saves. Second idea is more complicated: the backend is reading a UserData struct which fails, but the error isn't caught, then it writes it back with empty data. I suspect that it's not actually this because the other user for whom this happened still had their settings saved, and this would also nuke those.

maddyblue avatar Jul 23 '13 17:07 maddyblue

@qbeuek were you browsing on the HTTPS URL?

maddyblue avatar Jul 24 '13 08:07 maddyblue

No, straight http.

qbeuek avatar Jul 24 '13 17:07 qbeuek

I'm getting the same (?) thing on a self-hosted version. Did a refresh and got the "you don't have any feeds". Just updated to c4ad316 with no change.

The request to /user/list-feeds returns this:

{"Opml":null,"Stories":{},"Icons":{},"Options":"{\"folderClose\":{\"Comics\":true,\"Entertainment\":true,\"Games\":true,\"Development\":false,\"Design\":true,\"Technology\":false},\"nav\":true,\"expanded\":false,\"mode\":\"unread\",\"sort\":\"newest\",\"hideEmpty\":true}"}

And I see this in the appengine logs:

u.Read too old, fixing: 2013-07-11 19:10:07.885674 +0000 UTC
new: 2013-07-11 19:13:50.778148497 +0000 UTC
fix read: 0 -> 0
Saved; __appstats__:059800:part: 650.00B, __appstats__:759810528:full: 14.87KB

rng-zz avatar Jul 25 '13 19:07 rng-zz

@rng ah ha! I think your comment may have uncovered something. line 331 of user.go blindly sets ud.Opml (i.e., doesn't do an error check). This is perhaps the cause of the problem.

maddyblue avatar Jul 25 '13 19:07 maddyblue

This is now deployed. Will wait a few days and see if anyone else reports.

maddyblue avatar Jul 25 '13 19:07 maddyblue

Doesn't seem to fix it for me, and I don't get the error message on line 335. I added a check to the unmarshal code on line 177 and get this:

json uf unmashal err: unexpected end of JSON input, { []}

Is that relevant?

rng-zz avatar Jul 25 '13 20:07 rng-zz

It won't restore your feeds - they're gone. You'll have to either import new ones or use the feed history feature if that fired recently - a backup will be there.

However, yes, that is exactly what I wanted to see. This was certainly the bug. It means uf is being generated incorrectly, and the json marshaller couldn't handle it, which is what was causing the feeds to disappear. Now to figure out why uf is wrong.

maddyblue avatar Jul 25 '13 20:07 maddyblue

Hmm, but if I click admin->all feeds, I see my feeds there. Or is that something different?

Edit: oh, wait maybe I misunderstand - the admin list is all the feeds in the system, right? What I've lost is my specific list of feeds? So because my installation is single-user I can just download that list of feeds as opml and then reimport

rng-zz avatar Jul 25 '13 20:07 rng-zz

Yes. Actually, you should have an admin menu with a "all feeds opml" option. That should download all your site's feeds as an opml that you can then upload.

maddyblue avatar Jul 25 '13 20:07 maddyblue

Yep, got it, and feeds are back. Thanks! I'll post any new info if they disappear again.

rng-zz avatar Jul 25 '13 20:07 rng-zz

Could one of you please email your OPML to [email protected]? I've worked around the bug but I'd like to find the cause. Thanks.

maddyblue avatar Jul 26 '13 04:07 maddyblue