YouTube has found itself fighting battles on two fronts this week.

Advertisers have launched a concerted attack against the video-streaming platform for its devil-may-care attitude to extremist content. They argue it is too hard to guarantee that advertising spend won’t end up going to the likes of far-right group Britain First, and have decided to boycott the platform en masse until YouTube can confirm changes.

In response, YouTube’s parent company Google has apologised, and promised a raft of changes to appease the big spenders, from better categorisation of hate speech to simpler, more powerful controls for advertisers. It’s also promised to hire “significant numbers of people”, on top of the thousands who already do the work, to review questionable content.

At the same time, in a very different community, YouTube creators are lambasting the site after the discovery that its “restricted mode”, a feature intended to let schools, parents and libraries filter out content not appropriate for children, also removed a vast amount of LGBT content. Some videos from pop duo Tegan and Sara, who are gay, were hidden from view, as were videos from bisexual YouTuber NeonFiona – but only those which talked about her sexuality.

Facebook Twitter Pinterest Censored by YouTube … Tegan and Sara. Photograph: Mark Metcalfe/Getty Images

YouTube has apologised there too. Initially, it argued that “LGBTQ+ videos are available in Restricted Mode, but videos that discuss more sensitive issues may not be”. That defence was torpedoed, however, as the community continued to experiment with what was getting blocked: a video titled “GAY flag and me petting my cat to see if youtube blocks this” – showing just that – was blocked on restricted mode. The company now admits that the system sometimes “makes mistakes in understanding context and nuances when it assesses which videos to make available in Restricted Mode”, and as a result many videos were wrongly blocked.

In other words, YouTube is currently being attacked by advertisers for not censoring enough and by creators for censoring too much. It’s almost enough to make you feel sorry for them.

Not quite, though. Because really, the two problems are the same: YouTube sucks at categorising videos, and the larger the site gets, the more serious the ramifications.

The problem is one of scale. YouTube didn’t grow to the size it is by manually checking every video, and it’s not about to start it now. For one thing, it would be hugely expensive: 300 hours of video are uploaded every minute. Even assuming staff members did nothing but watch videos for eight hours a day, it would take more than 50,000 full-time staff to manually moderate it.

So the company relies on tricks which do scale: algorithmically classifying videos, by scanning the titles and video content itself; relying on users to flag problematic uploads; and, in large part, by trusting creators themselves to correctly label their work. That trust is backed up by force, though, with YouTube reserving the right to pull channels entirely from the site if creators consistently miscategorise their work.

But those tricks are showing their limitations, now. It’s taken a while, but Google has waded into the same battlefield that Facebook’s been losing on for years. At a certain size, it’s impossible to run a censorship regime that won’t produce a steady stream of errors indefinitely.

Facebook even has a standard boilerplate it trots out in such cases: “The post was removed in error and restored as soon as we were able to investigate. Our team processes millions of reports each week, and we sometimes get things wrong. We’re very sorry about this mistake.” We’ve heard that as the company’s apology for removing posts about a Californian rapist, closing pages of Palestinian journalists, removing video of environmental protestors, banning a Black Lives Matter activist, and deleting the profile of a Chicagoan artist.

So it’s no surprise that both YouTube and Facebook have the same ultimate solution for the problems: cross your fingers and hope that AI will solve it. “We’ll be … developing new tools powered by our latest advancements in AI and machine learning to increase our capacity to review questionable content for advertising,” Google’s chief business officer Philipp Schindler promised advertisers on Tuesday. His intervention is similar, if less ambitious, to Mark Zuckerberg’s promise in February to create an AI-powered, democratically driven model for automatic worldwide censorship.

Whether the companies’ critics can hold on that long, though, remains to be seen.