Skip to content
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

Removal of feed endpoints #668

Closed
ghost opened this issue Apr 23, 2023 · 55 comments
Closed

Removal of feed endpoints #668

ghost opened this issue Apr 23, 2023 · 55 comments
Labels
bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Apr 23, 2023

I have now fixed this, check out #698

Github Releases
Source Code

Comment on feeds

#668 (comment)

Describe the bug
I get the error type 'Null' is not a subtype of type 'String' in type cast when refreshing my feed

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Feed'
  2. Click on 'Refresh'
  3. See error

Screenshots
https://user-images.githubusercontent.com/123662124/233856792-46a33b7b-c09d-47f1-9c06-25a1d773e3ed.png

Device
Model: Moto G62 5G
OS: Android 12 (API 31)
Locale: en
Version: 3.0.0-beta7+300000957
Flavor: Github

@ghost ghost added the bug Something isn't working label Apr 23, 2023
@moocow1452
Copy link

moocow1452 commented Apr 23, 2023

Same, it was working earlier for me after a clean install, now I have the same error.

Screenshot_20230423-143818.png

Edit: Did some troubleshooting. Clearing Cache and Storage got it into a workable state again, but once the app was closed and I restarted, the error returned after a pull refresh.

@shayne3717
Copy link

I was able to get it working again by unchecking the "Show Replies" option in the overflow menu; it seems like unchecking either that or "Show Retweets" fixes the issue. Checking both causes the issue to return.

@moocow1452
Copy link

That's not a consistent fix on my side, error returns after a refresh, and no amount of toggling will bring the feed back.

@Undisputed00x
Copy link

Same thing here. Again app became unusable because of this bug.

@android-smiley
Copy link

android-smiley commented Apr 24, 2023

Toggling "Show Retweets/Replies" does fix for a moment, but stops working if both are re-enabled at the same time. After some more toggling of both options it fails completely to load. The error message states type 'Null' is not a subtype of type 'String' in type cast (same as above).

The API access seems to be working now, I assume this is now client-side.

@JVT038
Copy link

JVT038 commented Apr 24, 2023

image

I have the same issue.

@anton-isidore
Copy link

This happens practically immediately after closing the app.

I assume something bad gets saved into local storage that keeps crashing the app.

Sadly this bug renders the app practically unusable.

@s0racat s0racat mentioned this issue Apr 25, 2023
@hounsell
Copy link

Having a quick look into this issue, it looks like the issue is that the top cursor is missing in some stored chunks, which trips this up:

if (latestChunk != null) {
searchCursor = latestChunk['cursor_top'] as String;
} else {

I've worked around this in my local copy just by adding in an additional null check for cursor_top before trying to cast it, like so:

if (latestChunk != null && latestChunk['cursor_top'] != null) {
    searchCursor = latestChunk['cursor_top'] as String;
} else {

And this does seem to get the app functioning again, but now some tweets in my feed get duplicated. I guess this is because the chunks are getting re-fetched, or at least another chunk is requested that contains some of the same tweets because the cursor wasn't in place to delineate where the existing chunk finished off. The proper fix is probably then to look at why some stored chunks are missing their top cursor.

@ghost
Copy link
Author

ghost commented Apr 26, 2023

Having a quick look into this issue, it looks like the issue is that the top cursor is missing in some stored chunks, which trips this up:

if (latestChunk != null) {
searchCursor = latestChunk['cursor_top'] as String;
} else {

I've worked around this in my local copy just by adding in an additional null check for cursor_top before trying to cast it, like so:

if (latestChunk != null && latestChunk['cursor_top'] != null) {
    searchCursor = latestChunk['cursor_top'] as String;
} else {

And this does seem to get the app functioning again, but now some tweets in my feed get duplicated. I guess this is because the chunks are getting re-fetched, or at least another chunk is requested that contains some of the same tweets because the cursor wasn't in place to delineate where the existing chunk finished off. The proper fix is probably then to look at why some stored chunks are missing their top cursor.

Thanks for this, I am using this while a fix can be integrated into the app

@j-fbriere
Copy link
Contributor

This #679 PR should fix the problem.

@moocow1452
Copy link

Not sure if that also fixes this new issue. Screenshot_20230427-003347.png

@j-fbriere
Copy link
Contributor

It doesn't fix the new issue that appeared today unfortunately.
It seems that the graphql endpoint has been shut down.
At least for the moment.
Since a few hours ago, it returns a 404 error.

This was referenced Apr 29, 2023
@jonjomckay
Copy link
Owner

I'm sorry to say it, but I think this is probably going to be the end of feed support in Fritter. It was always a fragile hack on top of the search API, and now it looks like Muskrat has finally removed support for searching publicly.

I don't see any way around this, besides logging in with an account, which is something Fritter won't support by design, due to the privacy concerns, and the point of Fritter is to browse Twitter as invisibly as possible.

Before people jump in and say "why can't you combine multiple profile tweet feeds into one, and use that?" - it's not feasible, unfortunately. Only 20 tweets can be fetched at a time, from a single profile, and there are now heavy rate limits in place for those endpoints. Even having a feed of 10 users who tweet semi-regularly would encounter constant rate limit errors, and be incredibly slow to load.

I'll shortly be removing the code that handles and displays feeds, and will be modifying groups to provide a list of accounts, rather than a feed view. I know that's going to be bad news for some of you, but I can't leave the functionality in and broken.

On the plus side, supporting the feed was always where the majority of my time was spent while maintaining Fritter, and it was always the most frustrating part to work on, due to its fragility. Not having to maintain it any more will allow me to better utilise the time I spend on Fritter to work on the other parts of the app 🙂

Thanks for understanding, and I hope you all continue to use and enjoy the app, until Elon decides to remove even more public endpoints 🙈

@eye-writ
Copy link

eye-writ commented May 5, 2023

It's a lifesaver of an update from HCJ, but continued love for Jonjo too. Not easy when the Tesla nonce throws a spanner in the works!

🔧

@ghost
Copy link
Author

ghost commented May 5, 2023 via email

@ghost ghost mentioned this issue May 5, 2023
@Igaru22
Copy link

Igaru22 commented May 6, 2023

Crashes on open

@ghost
Copy link
Author

ghost commented May 6, 2023

Crashes on open

Seems the api has broke again, I feel like feeds cannot be fixed until Elon opens up the api or Fritter starts using it's own way of getting data off twitter.

@ghost ghost closed this as completed May 6, 2023
@ghost ghost closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2023
@eye-writ
Copy link

eye-writ commented May 6, 2023

I'm probably speaking too soon, but it's still working fine for me.

@Undisputed00x
Copy link

@TheHCJ still works pretty good

@ghost ghost reopened this May 6, 2023
@Igaru22
Copy link

Igaru22 commented May 6, 2023

Yesterday it worked on my Android 11 device but crashed on open on my Android 5 tablet. Today neither works

@Undisputed00x
Copy link

@Igaru22 did you download the correct apk from @TheHCJ ?

@moocow1452
Copy link

moocow1452 commented May 6, 2023 via email

@ghost
Copy link
Author

ghost commented May 6, 2023

Just made a pull request to fix this, I will attach an apk soon!
#698

EDIT: Github Release

@Igaru22
Copy link

Igaru22 commented May 7, 2023

@Igaru22 did you download the correct apk from @TheHCJ ?

Yes I tried them all. The Android 5 does not seem to work on any 3.x version. The Android 11 worked with Beta 7 for a while. I'm about to check out the new fix

@ghost
Copy link
Author

ghost commented May 7, 2023

Just added an updated apk in the description of this issue! 😀

@Undisputed00x
Copy link

Undisputed00x commented May 7, 2023

@TheHCJ Your new updated apk has a bug when opening some retweets
https://imgur.com/a/WmlDdKh

Reverted to your previous apk (beta.7) and those retweets are shown just fine

EDIT happens also on tweets

@ghost
Copy link
Author

ghost commented May 7, 2023 via email

@Undisputed00x
Copy link

@TheHCJ ok your fix needs to be pulled to master branch as fast as possible so this issue can be closed and be able reporting bugs I've found, which are a bunch

@ghost
Copy link
Author

ghost commented May 7, 2023 via email

@ghost ghost changed the title [BUG] Removal of feed endpoints [BUG] Feed is broken (Fixed in #698) May 7, 2023
@ghost ghost changed the title [BUG] Feed is broken (Fixed in #698) [BUG] Feed is broken (Fixed in https://github.com/jonjomckay/fritter/pull/698) May 7, 2023
@ghost ghost changed the title [BUG] Feed is broken (Fixed in https://github.com/jonjomckay/fritter/pull/698) [BUG] Feed is broken (Fixed in [#698](https://github.com/jonjomckay/fritter/pull/698)) May 7, 2023
@ghost ghost changed the title [BUG] Feed is broken (Fixed in [#698](https://github.com/jonjomckay/fritter/pull/698)) [BUG] Feed is broken (Fixed in pull request #698) May 7, 2023
@jonjomckay
Copy link
Owner

jonjomckay commented May 8, 2023

TLDR; I'm not going to be reinstating the feed, as it's too hard to maintain and bad for people's mental health.

Hi all. I won't be reinstating the feed to Fritter. I've been thinking about it a lot this past week, and there are multiple reasons why I don't think it's a good idea.

As I mentioned above, maintenance of the feed is by far the largest time and effort drain when developing Fritter. It's the least fun and the least interesting part of the app for me to work on. It's fragile (out of necessity because there's no direct "give me the feed" API on Twitter), and prone to a lot of breakage, due to Twitter constantly changing their APIs. The endpoint being completely removed recently, then being added back in was the final straw here - I simply don't want to, and can't, maintain something that relies on something so unreliable. I don't like it, and I know you all don't like it when you get cryptic error messages for days on end - it's almost never because of me, it's Twitter breaking things!

Alongside that, removing the feed was a bit of a cathartic moment for me. Since I took it out, I'm able to think about Fritter without feeling frustrated or overwhelmed. I don't mean this in a negative way, but some of the comments on recent issues and Play Store reviews are starting to bring those feelings back, and I'd rather not have that looming over my head.

In my head, Fritter was never intended to be another one of those endless scroll social media apps. I've never been a fan of doomscrolling, and the mental health issues it can lead to or exacerbate are not something that I would like to encourage. GitHub issue peer pressure is the true killer 🙂

Fritter started off as a fun project, to create a privacy friendly viewer for Twitter (well, Nitter, technically), and I'd like to take it back to that - something fun and useful for me to create, and for the user to enjoy.

For those who disagree with my decision, or don't respect it, I would really encourage you to research the mental dangers of doomscrolling and endless social media feeds. I know a lot of you have it under control, and others don't want to be told what to do, but I would really encourage and appreciate it. There's a very good accessible article from the BBC on it here.

@TheHCJ if you'd like to continue a fork that has the feed, I'm happy for you to do so (MIT license, bro), but we should chat about your branding, changing the use of the Fritter name, choosing a new package name, etc. It would be nice to share a base, as it doesn't pay to write the same things twice 😅

Thank you all for understanding, and if you'd like to continue this conversation, I've opened a discussion for it, rather than keep this endless thread (heh).

@jonjomckay jonjomckay closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
@jonjomckay jonjomckay changed the title [BUG] Feed is broken (Fixed in pull request #698) Removal of feed endpoints May 8, 2023
@jonjomckay jonjomckay added this to the v3.0.0 milestone May 8, 2023
Repository owner locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests