3

Recently there was a post with a case of android.os.NetworkOnMainThreadException. In search of a fitting original for this almost certainly duplicate, I followed a link provided below this post and found Caused by: android.os.NetworkOnMainThreadException [duplicate].

The first strange thing about this eight year old question is that the is no link to an original post although it was closed as duplicate:

title and close notice of orphaned dupe

So this was not really a candidate for closing the current post as duplicate, but all well there since someone else had provided one in the mean time:

How to fix 'android.os.NetworkOnMainThreadException'?

Back to my orphaned duplicate: maybe it should be merged/ linked to the valid original? Closer inspection of the accepted answer showed that there would be no value added - it mentions something which is considered very bad practice in android development as one of two equally valid options.

By the way, the asker of the recent question was happy with the hacky "solution" to their problem, so although the problem answer is old, it is still doing harm.

In my opinion the entire post should best be deleted: the android.os.NetworkOnMainThreadException was introduced because waiting for a response from a network call on the UI thread may cause the UI to freeze, which is not acceptable to many users (and some app stores). So bypassing this rule is likely to cause issues later on.

I've noticed there is a delete Button, but I'm not sure whether it's possible to have a question deleted which has an accepted answer with 121 upvotes. And my downvote.

So what should be done with this post?

6
  • 1
    Deleting closed posts can be done regardless of the amount of upvotes/answers with upvotes on them. It just needs to be closed for a couple of days before the delete button appears. I'm all for deleting this one, even if it weren't a duplicate it lacks a minimal reproducible example (I'm using link, redirecting users off site if they actually want to figure out what's going on).
    – Erik A
    Dec 22, 2020 at 9:29
  • 3
    I've gone ahead and fixed the duplicate marking. We can probably just delete it, but for now, I don't see it doing any harm. Dec 22, 2020 at 9:32
  • @CodyGray That did clear any delete votes and made us unable to cast new ones for a couple of days. If you think the answer holds value, consider merging, else deleting. The entire problem statement relies on a link, and if I follow that link, I encounter a blog post written in 2017, over 5 years after the question was asked. The question is not reproducible, and this can't be fixed by incorporating content from that link, aside from it being a duplicate.
    – Erik A
    Dec 22, 2020 at 9:57
  • 1
    I did not want to make the decision of whether the answer is valuable or not, @Erik, because it's outside of my expertise. But fine, I've merged them now. I don't see why it is that big of a deal. The question is closed, you don't need to fix it. Dec 22, 2020 at 9:59
  • Not really a big deal, just don't like to see my delete votes cleared of questions I consider closeworthy for multiple reasons and unsalvageable by edits. Those should not persist indefinitely on the network imo.
    – Erik A
    Dec 22, 2020 at 10:08
  • Well, I would not have been sad to see the bad answer deleted. But having it as one of very many answers, and not among those with the most upvotes, is an improvement :) To be fair, the valid original question also has answers suggesting the hacky approach, and I'm not going to read, much less up- or downvote each and every one of those 87 answers. So I'm OK with the outcome for this particular case. Dec 22, 2020 at 10:16

0

Browse other questions tagged .