Follow

In mastodon, I seem not to be able to look up users I'm following if the remote server is down. The "follows and followers" advanced interface probably lists this user, but you can't search there. This means I can't unfollow zombie users through the UI. The unfollow API takes a local user ID which cannot be guessed based on remote acct, so I think I need to loop over everyone I'm following to find the mapping.
Before I go writing some crummy python, am I missing a way to do this through the UI?

for searches where resolve = true (like exact username searches), there's handling and test coverage for 404 and 410 (github.com/mastodon/mastodon/b and github.com/mastodon/mastodon/b but doesn't seem to be coverage for HTTP::Error and OpenSSL::SSL::SSLError like a lot of other generic "deal with things going bad on the internet" rescue blocks in the rest of the app.

I left Oj::ParseError off that list, but if I guess you need that too to handle (webfinger endpoint replaced with server that responds with 200, but non-json response)

@ryan If you type the full handle, it works; it only requires the instance to be up if you type a partial handle.

Alternatively, you can search for a post you favourited.

@wizzwizz4 when I search for the full handle I get "503 Remote data could not be fetched" and the search results are the default follow suggestions. searching for a post is a good idea, but I'd have to remember some phrase that user used in a post.

@ryan So if the remote server is down you can't search for the user on the timeline search and unfollow over the results?

@tagomago yes, but only for some servers. I'm guessing the ui does searches with remote=true when the query looks like a username, and that some kinds of remote fetch failures (like ssl cert expiration) cause the whole request to fail so the api can report the error. the ui does not then retry with remote=false, it just gives up.

@ryan Umm, weird behavior though. I assumed that if a local profile matches, the results would show that instead of trying to fetch the remote one. Are you looking for username@domain or just username?

@ryan I've just made a test with a follower of mine who's on a dead server (soc.ialis.me) and the search of both username and username@domain showed them on the results.

@tagomago like I said, it's only happening for some servers. I'm not sure what your test proves.

@ryan That this is not the case:

>I'm guessing the ui does searches with remote=true when the query looks like a username, and that some kinds of remote fetch failures (like ssl cert expiration) cause the whole request to fail so the api can report the error. the ui does not then retry with remote=false, it just gives up.

@tagomago if you didn't hit "some kinds of remote fetch failures," that statement could still be true.

@ryan You can cross out "dead server" and keep testing, then.

@tagomago didn't get to the bottom of it, but found special handling for 404 to explain some of what I saw, at least enough to file github.com/mastodon/mastodon/i

@ryan Probably your server logs are pointing to the smoking gun, aren't they?

Sign in to participate in the conversation
hates.company

single-user instance for @ryan@hates.company