news
news copied to clipboard
0.4.0 no longer works with Nectcloud
Checklist
- [x] I am using the latest version
- [ ] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.
- [ ] This issue contains only one bug. I will open one issue for every bug report I want to file.
Steps to reproduce the bug
Actual behavior
Expected behavior
Screenshots/Screen recordings
Logs
Device info
- Android version/Custom ROM version:
- Device model:
After updating to 0.4.0, the News app no longer works with Nextcloud.
First, after updating, the News app automatically logged me out of my Nextcloud account. Second, after re-logging in, I am left with the spinning icon. Nothing in my nextcloud account loads into feeds, bookmarks or news.
I have tried logging in an out several times, all with the same effect.
Android 10: /e/OS Samsung S9
Yes, the same here. I see nothing interesting in adb logcat; however, on the Nextcloud server, a lot of “Token is not valid: Token does not exist: token does not exist” error messages appear in the log, when I start the News app and it attempts to sync the feeds.
Same goes here, not able to sign in through Nextcloud...
Edit: I managed to login but I ended up with infinte loading circule.
New version did log me out of Nextcloud but I was able to reconnect successfully. Android 13, Nextcloud 24.0.5
I don't use NC so I don't have an account to test it. Is anyone willing to create a test account for me so I can check what's going on? I tried a few "NC partner" services but most of them aren't working at all and the ones which work don't support NC News app.
I tried to debug the issue and it seems to me that (at least in my case), the problem is not with authentication or anything (it seems the messages in the server logs have been there always), but with the feed content and its processing in the Nextcloud-specific part of the code.
AFAICT, the problem was this commit which changed the implementation of toFeed from selfLink = url ?: "", alternateLink = link ?: "" to href = url!!.toHttpUrl(), href = link!!.toHttpUrl(): Notice the explicit not-null assertion operators added, which are apparently not warranted here! Unfortunately, the resulting exception is caught and then lost somewhere (resulting in just a blank screen), which is not ideal as well and made the investigation more difficult.
In my specific case, the problematic feed was http://what-if.xkcd.com/feed.atom (I did not try to find the specific strangeness with it.)
(I don’t know why the upgrade lost my login and it is probably a completely different issue, but that’s not a problem.)
@mormegil-cz yes, NC structures are extremely messy, you never know which field might be null, News app is probably too strict with "not null" assumptions and so on, which might also explain why some users have no problems. Some historical entries created by the older version of NC News backend might have different structure and more missing fields, I think I even saw a null ID field once lol
@mormegil-cz losing login is expected since DB schema changed a lot, it was to much work to keep backward-compatibility between 0.3.x and 0.4.x, I'm the only maintainer of that project and my time is limited
I got an NC account from one of the users and it seems to be working fine. If you know any examples of failing/problematic feeds, let me know.
@bubelov Could you let me know what I could give you to help debug this? I'm using the lastest versions of Nextcloud and the News plugin. Everything works fine for me using the browser app and an iOS client, just not the android client.
It seems to me the main problem is visible primarily in the initial sync?
I noticed a feed which makes a problem for the app: https://deadbeef.k47.cz/rss.xml where the issue is in the missing item urls, making the app die in the url!!.toHttpUrl() non-null assertion in ItemJson.toEntry().
When you complete the initial sync, and only then add the feed subscription and refresh, it mostly seems to work: The feed items do not sync, but the new feed is displayed in the feed list but without any items, but the app still works and shows the already synced feeds (I guess it does not sync new items, anyway). However, if you start with a fresh app/account which already has this feed subscribed, the initial sync never completes and the app is stuck in the syncing loop forever.
@mormegil-cz I can reproduce it with your feed, thanks for reporting!
Everyone affected: you can try the preview release and see if the issue is gone: https://github.com/bubelov/news/releases/tag/preview
@bubelov I just tested it. It did not fix the problem, Still looping loading circule.
to bad, I have issues too. The preview apk gives me 401 error so I can't even login. The normal release seems to have lots of issues. The text is "ghosting" around, there are no external browser options, there is no setting to view newest news at the bottom. Not sure if I'm missing something here but lots of old settings got removed?? Nextcloud single-signon is also not available anymore. Will use the official app for the time being until it's more stable. Will definitely return since I loved your app and it seems like it got even more beautiful with this overhaul. So yeah, hoping for the best :D
I wouldn't hope for that, things don't appear out of nothing, and NC integration has no maintainers so it isn't expected to improve, unless someone sends a pull request. Maybe someone will volunteer to maintain NC module but my personal priorities are Miniflux and standalone mode. @mormegil-cz tracked down some issues, but it looks like some users are still having problems with NC.
I see, thanks for letting us know.
Everyone affected: you can try the latest preview build and see if it works: https://github.com/bubelov/news/releases/tag/preview
It includes a few promising patches sent by @mormegil-cz, re-installing the app might be necessary
@bubelov It works fine now. 👌
@mahmoudk1000 cool, I'll prepare an official release
Big thanks for the fixes. seems like everything works again, even listing from oldest to newest is available again. Only thing missing now is Nextcloud SSO but that is mostly just for comfort and not necessary for it to work so no priority here. like I said, big thanks for this, it's the best NC news client after all.
@Rorschach1010 yea, SSO was a huge PITA to maintain so I got rid of it. It makes life a bit easier for users but it has a lot of issues code-wise which stay unresolved for years. It would be nice if Nextcoud invested some resources in keeping that SSO library up to date and I'm open to adding it back if the situation improves.
@Rorschach1010 yea, SSO was a huge PITA to maintain so I got rid of it. It makes life a bit easier for users but it has a lot of issues code-wise which stay unresolved for years. It would be nice if Nextcoud invested some resources in keeping that SSO library up to date and I'm open to adding it back if the situation improves.
Fair enough and in a normal case, users have to create a token once and that's it. In any case, the original issue from OP has been resolved so the issue can probably be closed. Thanks again for the hard work.