NetNewsWire icon indicating copy to clipboard operation
NetNewsWire copied to clipboard

miniflux greader errors

Open adamcstephens opened this issue 2 years ago • 8 comments

Hello. I'm using NNW iOS with the recently landed Miniflux greader support (mentioned in #2859). It works pretty well, but with a few issues/errors.

I spent some time digging in to the miniflux implementation, with the expectation that I'd need to fix the issues there. After investigating, they all seemed like they could be reported here first. Let me know if you disagree and I'd be happy to report them to miniflux or try and resolve them.

Unread state toggles back and forth in the NNW UI on each refresh

I verified miniflux is correctly returning the unread items every query to the greader API on the command line using curl 'https://rss/reader/api/0/stream/items/ids?n=1000&output=json&s=user/-/state/com.google/starred' -H "Authorization: GoogleLogin auth=$GR_AUTH" | jq ".itemRefs | length"

Adding new subscriptions causes a duplicate feed error

It appears that NNW is attempting to send two subscription requests. First it sends a quickadd which succeeds

app_1  | [DEBUG] [HTTPS] 0.0.0.0 POST /reader/api/0/subscription/quickadd?quickadd=https://github.com/seashell/drago/releases.atom

Then it sends another subscribe to the subscription endpoint:

app_1  | [DEBUG] [HTTPS] 0.0.0.0 POST /reader/api/0/subscription/edit
app_1  | [INFO] [GoogleReader][/subscription/edit][ClientIP=0.0.0.0] Incoming Request for userID #2
app_1  | [DEBUG] Edit subscription map[T:[token] a:[user/-/label/Released] ac:[subscribe] s:[feed/134]]

Possibly miniflux could handle this, but it seems redundant to send two subscription requests.

Changing subscription labels fails

When trying to change the folder/label in NNW, I receive an error and nothing changes. It appears that NNW is attempting to remove the old label, prior to the adding the new label which doesn't appear to be supported by miniflux. https://github.com/miniflux/v2/blob/f6825c1c60a4e125b17f3cd27c26cccb2d520f35/googlereader/handler.go#L721-L729

The greader API seems to support the adding and removing in one API call, if I'm not mislead by https://github.com/mihaip/google-reader-api/blob/master/wiki/ApiSubscriptionEdit.wiki

app_1  | [DEBUG] [HTTPS] 0.0.0.0 POST /reader/api/0/subscription/edit
app_1  | [INFO] [GoogleReader][/subscription/edit][ClientIP=0.0.0.0] Incoming Request for userID #2
app_1  | [DEBUG] Edit subscription map[T:[token] ac:[edit] r:[user/-/label/All] s:[feed/134]]
app_1  | [ERROR] [HTTP:Bad Request] /reader/api/0/subscription/edit => destination must be a label

adamcstephens avatar Mar 30 '22 14:03 adamcstephens

I believe the adding a subscription and changing subscription folders/labels issues are fixed by PR #3227 which hasn't shipped in a non-beta release yet.

I also see the read status toggling issue on iOS, which I'm not sure what's causing that. I'm guessing it's got something to do with threading on the UI side of the house as scrolling items in and out of view "fixes" the displayed read/unread status.

dave-atx avatar Mar 30 '22 19:03 dave-atx

@dave-atx is there a TestFlight build? I'd be happy to test the possible subscription fix.

adamcstephens avatar Mar 30 '22 20:03 adamcstephens

Test Flight info is here: https://netnewswire.com/test-ios

vincode-io avatar Mar 30 '22 20:03 vincode-io

Installed version from TestFlight. This version allows for successful adding of feeds with labels and modification of labels.

Unfortunately the adding of a feed generates an error popup for either the All or any other label stating "Internal Server Error". On the bright side it still succeeds in adding the feed correctly. :)

app_1  | [DEBUG] [HTTPS] 192.16.0.162 POST /reader/api/0/subscription/quickadd
app_1  | [INFO] [GoogleReader][/subscription/quickadd][ClientIP=192.16.0.162] Incoming Request for userID  #2
app_1  | [DEBUG] [HttpClient:Before] Method=GET InputURL="https://helix-editor.com/atom.xml" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true
app_1  | [DEBUG] [HttpClient:After] Method=GET InputURL="https://helix-editor.com/atom.xml" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true; Response => StatusCode=200 EffectiveURL="https://helix-editor.com/atom.xml" LastModified="Wed, 30 Mar 2022 18:56:47 GMT" ETag=W/"6244a7ef-28c4" Expires=Thu, 31 Mar 2022 12:50:23 GMT ContentType="application/xml" ContentLength=-1
app_1  | [DEBUG] [HttpClient] inputURL=https://helix-editor.com/atom.xml took 148.377971ms
app_1  | [DEBUG] [HttpClient:Before] Method=GET InputURL="https://helix-editor.com/atom.xml" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true
app_1  | [DEBUG] [HttpClient:After] Method=GET InputURL="https://helix-editor.com/atom.xml" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true; Response => StatusCode=200 EffectiveURL="https://helix-editor.com/atom.xml" LastModified="Wed, 30 Mar 2022 18:56:47 GMT" ETag=W/"6244a7ef-28c4" Expires=Thu, 31 Mar 2022 12:50:23 GMT ContentType="application/xml" ContentLength=-1
app_1  | [DEBUG] [HttpClient] inputURL=https://helix-editor.com/atom.xml took 101.449245ms
app_1  | [DEBUG] [Processor] Processing entry "https://helix-editor.com" from feed "https://helix-editor.com/atom.xml"
app_1  | [DEBUG] [Rewrite] Applying rules [{add_pdf_download_link []}] for "https://helix-editor.com"
app_1  | [DEBUG] [CreateFeed] Feed saved with ID: 139
app_1  | [DEBUG] [FindIcon] Trying to find an icon: rootURL="https://helix-editor.com/" websiteURL="https://helix-editor.com" userAgent=""
app_1  | [DEBUG] [HttpClient:Before] Method=GET InputURL="https://helix-editor.com/" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true
app_1  | [DEBUG] [HttpClient:After] Method=GET InputURL="https://helix-editor.com/" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true; Response => StatusCode=200 EffectiveURL="https://helix-editor.com/" LastModified="Wed, 30 Mar 2022 18:56:47 GMT" ETag=W/"6244a7ef-f4c" Expires=Thu, 31 Mar 2022 12:46:48 GMT ContentType="text/html; charset=utf-8" ContentLength=-1
app_1  | [DEBUG] [HttpClient] inputURL=https://helix-editor.com/ took 114.101597ms
app_1  | [DEBUG] [FindIcon] Fetching icon => https://helix-editor.com/favicon.ico
app_1  | [DEBUG] [HttpClient:Before] Method=GET InputURL="https://helix-editor.com/favicon.ico" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true
app_1  | [DEBUG] [HttpClient:After] Method=GET InputURL="https://helix-editor.com/favicon.ico" ETag=None LastMod=None Auth=false UserAgent="Mozilla/5.0 (compatible; Miniflux/2.0.36; +https://miniflux.app)" Verify=true; Response => StatusCode=404 EffectiveURL="https://helix-editor.com/favicon.ico" LastModified="" ETag="6244a7ef-44" Expires= ContentType="text/html; charset=utf-8" ContentLength=68
app_1  | [DEBUG] [HttpClient] inputURL=https://helix-editor.com/favicon.ico took 92.83686ms
app_1  | [DEBUG] [CheckFeedIcon] icon: unable to download icon: status=404 (feedID=139 websiteURL=https://helix-editor.com)
app_1  | [DEBUG] [CreateFeed] FeedURL=https://helix-editor.com/atom.xml took 330.955362ms
app_1  | [DEBUG] [HTTPS] 192.16.0.162 GET /reader/api/0/subscription/list?output=json
app_1  | [INFO] [GoogleReader][/subscription/list][ClientIP=192.16.0.162] Incoming Request for userID #2
app_1  | [DEBUG] [HTTPS] 192.16.0.162 POST /reader/api/0/subscription/edit
app_1  | [INFO] [GoogleReader][/subscription/edit][ClientIP=192.16.0.162] Incoming Request for userID #2
app_1  | [INFO] [HTTP:OK] /reader/api/0/subscription/edit
app_1  | [DEBUG] [HTTPS] 192.16.0.162 GET /reader/api/0/stream/items/ids?n=1000&output=json&ot=1640960152&s=feed/139
app_1  | [INFO] [GoogleReader][/stream/items/ids][ClientIP=192.16.0.162] Incoming Request for userID #2
app_1  | [DEBUG] Request Modifiers: UserID: 2
app_1  | Streams: 1
app_1  |          FeedStream - '139'
app_1  | Exclusions: 0
app_1  | Filter: 0
app_1  | Count: 1000
app_1  | Sort Direction: desc
app_1  | Continuation Token: 
app_1  | Start Time: 1640960152
app_1  | Stop Time: 0
app_1  | 
app_1  | [INFO] [GoogleReader][/stream/items/ids] [ClientIP=192.16.0.162] Unknown Stream: GET /reader/api/0/stream/items/ids?n=1000&output=json&ot=1640960152&s=feed/139 HTTP/1.1
app_1  | Host: rss.private
app_1  | Accept: */*
app_1  | Accept-Encoding: gzip, deflate, br
app_1  | Accept-Language: en-US,en;q=0.9
app_1  | Authorization: GoogleLogin auth=TOKEN
app_1  | User-Agent: NetNewsWire (RSS Reader; https://netnewswire.com/)
app_1  | X-Forwarded-For: 192.16.0.162
app_1  | X-Forwarded-Host: rss.private
app_1  | X-Forwarded-Port: 443
app_1  | X-Forwarded-Proto: https
app_1  | X-Forwarded-Server: efa3eac3ca12
app_1  | X-Real-Ip: 192.16.0.162
app_1  | 
app_1  | 
app_1  | [ERROR] [GoogleReader][/stream/items/ids] [ClientIP=192.16.0.162] unknown stream type
app_1  | [ERROR] [HTTP:Internal Server Error] /reader/api/0/stream/items/ids?n=1000&output=json&ot=1640960152&s=feed/139 => unknown stream type

adamcstephens avatar Mar 31 '22 13:03 adamcstephens

@adamcstephens That 500 error is actually because miniflux doesn't (yet) implement that part of the Google Reader API (specifically a /reader/api/0/stream/items/ids request with a stream type of feed/*). I'll see if I can get a PR into miiniflux to add that in the next few days.

dave-atx avatar Mar 31 '22 13:03 dave-atx

And here's the miniflux PR that fixes that 500 error: https://github.com/miniflux/v2/pull/1402

dave-atx avatar Mar 31 '22 15:03 dave-atx

The testflight build has expired. Will it be refreshed, or should I go back to stable without the fix? Thanks!

adamcstephens avatar Jul 07 '22 16:07 adamcstephens

We’re hoping to have a new TestFlight build in the next few days.

brentsimmons avatar Jul 07 '22 21:07 brentsimmons

The "unread indicators toggle state" part of the issue is fixed in the latest miniflux release (2.0.39). @adamcstephens if you want to also verify on your end, we can probably close this issue.

Also thanks to @vincode-io for not merging my bad "this definitely doesn't fix the problem" PR above... definitely was a problem on the miniflux side of things. :)

dave-atx avatar Oct 17 '22 14:10 dave-atx

@dave-atx I can confirm that miniflux 2.0.39 does indeed resolve the unread state toggling.

Thanks for following up and your assistance with getting this backend supported!

adamcstephens avatar Oct 17 '22 20:10 adamcstephens