Preferences

Twitter is so full of weird connectivity bugs.

For the last weeks until a few days ago I've been unable to access twitter unless doing a hard refresh on every click. Because they installed a faulty service worker of some kind that would break most of the requests. (Both on desktop and android)

And on Android, every time I follow a link to Twitter in an app that opens in a web view, it gives me a faulty page that I have to refresh a few times before I'm able to view it. It loads the page fine, but some rest call or whatever to fetch the tweet crashes.

Edit: Not heard many others complain about this before, so mainly thought it was something about my setup. But the huge amount of upvotes this got suggests some Twitter engineers better look into this..


> And on Android, every time I follow a link to Twitter in an app that opens in a web view, it gives me a faulty page that I have to refresh a few times before I'm able to view it. It loads the page fine, but some rest call or whatever to fetch the tweet crashes.

I get this issue too, I figured it was part of some trick to make me want to use the app.

Does that on iOS too, every single time
Insane that one of the most used websites on the internet doesnt work most of the time.
Maybe it works when navigated to directly, but the only time I ever go to Twitter is if someone links it from Reddit. And without fail that looks like this: https://imgur.com/fQJ27MF

The button to “Try Again” doesn’t work either, you have to manually reload the page.

This is in Apollo on iOS, but it sounds like the same broken behavior happens in web views on Android.

I thought this was intended: any page load that does not finish within x seconds is aborted. It will normally succeed for me on the reload with the cached assets. I understood this to be a (bad) optimization for rejecting slow clients.
It does that for me even _in_ the app, so no, it's just broken...
Thank you for mentioning this. I've been getting frustrated with my Firefox install for a while because everything is so slow and it eats so much memory. After deleting the 200 service workers [1] I didn't even realize were installed, it is taking wildly less memory and seems generally snappier. I wouldn't call it "night and day", but it's faster.

I had been under the impression that service workers required approval from the user to be installed. I had service workers from websites that I haven't visited in years and don't even exist anymore, sitting there chewing on my RAM every time I started Firefox.

Also Twitter has also been broken for me this way for months.

Service workers have some nice features, but I submit that they need to be something to be whitelisted by users, not something websites can just toss in there whenever they feel like it. The odds of one of them screwing up and eating far more resources than they have any right to approach 1 as the number of them increases. I don't know exactly how they managed to collectively eat 2GB of RAM and I don't care; there is no way they were bringing that much value to me, especially as I permit no website to simply push me notifications.

[1]: A suspiciously round number; it was exactly 200. Is that a limit? I don't see it in about:config.

As a data point I've got 299 service workers according to about:debugging#/runtime/this-firefox

Time to remove these. Thanks!

And thank you for the link! I was not going to find that one on my own...
Thank you for the hint with the service workers, quickly checked my settings and figured out that thankfully Cookie Autodelete [0] can take care of those too. Down from ~200+ service workers to a few with my existing configuration.

[0]: https://addons.mozilla.org/en-US/firefox/addon/cookie-autode...

I'm not a fan of service workers myself. Another team at a previous job added a service worker to a site that served many separate backend apps. It caused endless loading, caching, and crashing problems for my team, for no clear benefit.

If you want a cache, use HTTP caching, not custom JS code.

Not just RAM, I noticed on Android 11 that with the broken Twitter service worker installed, Firefox was gobbling up battery as well.

I ignored Twitter being broken for a bit since I didn't mind not using it. Then I realized my Firefox battery usage had essentially doubled and was draining my battery faster than normal. Once I cleared all Twitter site data including the service worker, back to normal.

So it wasn't just my browser or my internet connection. I used CTRL + F5 in FF and it always worked, but on a normal refresh it would either display an error or the page didn't load at all.

Thought that my IP had landed on some list where Twitter degraded the connection and I wasn't even logged in.

Yeah, I got loads of these - this tweet is not available to you etc.

Recently, it appears that I can't load twitter URLs with query parameters - the Guardian use some really weird ones of these, but when i delete them the URL loads. Super weird.

I am relieved that I am not the only one. I thought it was something to do with my phone, the browser I am using or something else.

Happy to know that Twitter is just being Twitter.

In Safari it will just drop you to an error page 70% of the time you navigate to it through a link, I assume because it doesn’t get its tasty tracking data. You have to reload the page to get anything to show up.
On FF on Linux and Android it shows me that error message 100% of the time. Refreshing gets it to load.
Same here, now refreshing typically doesn't work.
Yes I get this too, for a long time. I’m constantly shocked that a major platform could be so fundamentally broken for so long lol
This has been my experience on mobile twitter for years, and in the last year on the desktop one as well. I thought it was a passive aggressive push for users to log in or install the official apps.
I have just gave up on clicking on any Twitter link. I guesses a log in was required now.
+1. I figured it was anti-abuse.
This has been happening for at least a year for me in Firefox. 100% of the time. It's rather odd.
Me too. First follow from external website to previously unvisited tweet, there's an error. If I open it again it works, and keeps working from then on. Also happening 100% of the time on new tweets.

Kinda funny that twitter can't figure out such basics such as opening a page correctly when following a link. This has been happening for months.

Web development is hard.

Loading a tweet really isn't that hard; it's just Twitter's engineering team is incompetent. Even tiny little websites that custom-roll their own forums have less trouble loading their content than Twitter.
Yep, same. I used to get a message saying I'd been rate-limited, now I just get a generic error.
I have the theory that they do this on purpose so more people opt to install their mobile apps, to which I strongly refuse.
I don't use Twitter except when I'm linked to it and for occasional searches, and it's been a huge step backwards with the new UI that was forced on everyone a few months ago. It even has a loading screen because it's much slower, and somehow also manages to show less content than the previous design.

If I remember correctly there was a brief period a while ago when they did use a JS-only "web app", but then switched back to simple HTML with JS enhancements (and I seem to remember they announced that change with much pride).

Of course, there is always mobile.twitter.com that is still static-only and quite usable without JS, but IMHO Twitter is the perfect example of how the "modern web" is doing less with more.

Go to about:serviceworkers and ctrl-f twitter and remove every instance. That will fix it.
TIL about service workers.

So there's a persistent cache of javascript that can't be cleared except one at a time? My cache is full of fly-by-night websites. Surely this is a shocking privacy hole?

Web browsers need to be more transparent about what state they are storing, and more accommodating of attempts to clear it.

> Surely this is a shocking privacy hole?

Also a performance/battery suck. Apple refuses to implement it in Safari, and it's one of the big reasons web developers deride Safari for being "the new IE"

> Also a performance/battery suck

That's far from obvious. Good cache control and offline usage are great for battery usage.

> Apple refuses to implement it in Safari

Wrong, Safari supports them. What Apple doesn't do well is enabling webapps that you pin to your homescreen ("PWAs") to work (they allow it, but from what I hear it's buggy and has weird restrictions), because they'd rather force you to make a native app.

You can have good cache control with HTTP headers, no need to run scripts on the client for that.
As I understand the docs, they can be killed any time, e.g. when their site is left, then they aren't different from page scripts. Well, it doesn't look like they solve any problem either.
The most crucial thing they solve is giving websites access to their cached pages, and they can thus show cached content while also making a request for new data in the background, still provide cached functionality while the device isn't connected to the internet, ...

In the wider concept of "PWA" (Progressive Web Apps), they also are used to enable webapps to act a bit like local apps if the user opts in - a user can add them to the homescreen, and they then are launched just like normal apps (but still sandboxed in the browser). An example that does this quite well is the Web-IRC client "The Lounge" - you can open and use it in the browser, but also pin it as a standalone app, including support for push notifications etc if you allow that.

Well, except there's nothing stopping a site from handing out a unique service worker with a hard-coded i.d. to every visitor. It's persistent state with behaviour, like a cookie that can do things.
Me as well, I look up about service workers.

I agree with the transparency, I was not aware about service workers until this post. In the meantime, there are Firefox/Chrome extensions that manages the service workers. Those extension can block service workers from installing without the user consent which that was nice.

The Cookie AutoDelete extension has an option to delete them. I'd highly recommend having that extension anyway!
>Surely this is a shocking privacy hole?

AFAIK it's fine because they get cleared when you delete cookies/site data, so it's no worse than a site using localstorage, for instance.

It doesn’t answer how Twitter can be so bad at this, though. Looks like a like of us have experienced this for a long time, I’m mystified why they wouldn’t fix the bug.
Yup, that fixed it for a few days at least last time. The issue about the whole page being inaccessible. The issue with the page loading but not the tweet is still ever present..
Wow, I guess this is common. This has happened to me for months using Chrome on Ubuntu with UBlock & Privacy Badger. I always assumed it was the extensions but I guess not.

Twitter is literally so buggy. Most of the time I have to refresh a page several times. Maybe it's because I don't have an account and refuse to use their apps?

I've seen similar issues. Who knew it was so hard to display 280 characters?
I've been experiencing something similar, every time I click on a twitter link from outside of Twitter, Firefox errors with "There has been a protocol violation" error and a hard refresh fixes it.

I'm not sure whether it's because I've setup FF containers to open all twitter.com links in a separate container.

You can stop the error by clearing Twitter cookies.

Or as @miffe said, "Go to about:serviceworkers and ctrl-f twitter and remove every instance. That will fix it."

Service workers are hard to get right and if they've for example updated the service worker, it might be damn near impossible to unregister the old one and installing the newer one before the old worker is set to be cleared from the cache.
Reminds me of an awesome talk at jsconf a while ago.

Outbreak: index-sw-9a4c43b4b4778e7d1ca619eaaf5ac1db.js https://youtu.be/CPP9ew4Co0M

I switched to using nitter.net for all links to twitter. At least this trick works.
No freakin way... this whole month I thought twitter was broken... I figured it was some censorship related filter. Every visit (for me at least) requires a reload to work properly.
I’ve noticed something weird moving between hacker news and Twitter safari on my iPhone 7. If I first visit Twitter then in the same tab go to hacker news. The favicon is the Twitter one but the tab says hacker news. This doesn’t work with other sites like google that I tested. It’s quite odd. It’s like the favicon for Twitter overrides the hacker news one for the first page load
My iPad does this except the icon is TechCrunch's. Not sure why.
Oh, so it’s not my browser being weird, thanks :) I have to refresh every tweet I load unless it’s opened within a few seconds of the first.
I see this a lot in Safari on iOS. I don't think it's happened in Firefox yet. Which is weird because it uses Safari on iOS.
It's been like that for me for the past full year on iOS Safari. Surprised to hear it's reached Android!
This also happens to me. I just assumed that it was a dark pattern because I don’t have an account.
Been having this exact same experience for weeks, maybe months. Desktop on two OS’s and mobile.
I had seen it a lot with the android client (I'm on the beta channel so I've probably been experiencing it longer than most). Glad it wasn't just me.

Kudos to the OP for investigating and documenting their findings.

@Twitter: please fix! kthxbai

There are some websites that I just accept only work 60-70% of the time for me; Twitter is one
It used to be the case for reddit too but they appear to have sorted most of the issues.
I have the same issue with Firefox on MacOS. 3rd party cookies disabled, privacy protection on, uBlock Origin, and PiHole. I assume it's a poorly handled call to a tracking or ad domain that fails, blowing it up.
Oh I assumed that was intentional, to make you sign up for an account or something. I get it almost every time, opening in incogneto helps.
The issue on Android also happens for me. I honestly assumed it was a deliberate dark pattern to encourage installing the app
I get the same thing on my android. I always wonder how an issue like that can go on for years with no fix.
This, for me, was due to an expired cookie. You need to clear the cookies and local storage and log ba in to fix.

Not ideal

I have to refresh the page once or twice when attempting to load a tweet in Safari or Chrome on iOS, otherwise I usually get a cryptic "this tweet is not available to you" message or something similar. I also just assumed it was a dark pattern to get me to use the app.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal