TO OPPOSE the government of Justin Trudeau has been no fun. Canada’s prime minister has shrugged off controversies that would have hurt a less charismatic politician. Few Canadians seemed to mind when he accepted a helicopter ride from the Aga Khan to holiday on his private island in the Bahamas; most yawned when the government paid C$10.5m ($8.4m) to settle a lawsuit brought by a former inmate of Guantánamo. After a flattering cover story on Mr Trudeau appeared in Rolling Stone in July, Michelle Rempel, an MP from the opposition Conservative Party, vented her frustration: the press treat him and his team as “Prince Charmings who can do no wrong, all while flying through a rainbow on a unicorn”.

But mistakes and mishaps are starting to hurt Mr Trudeau’s Liberal government as it nears the mid-point of its four-year term on October 19th. Among the goofs are a cultural policy that enraged Quebec, the French-speaking province, and a tax-reform proposal that riles doctors, farmers and owners of small businesses. Other problems are outside the Liberals’ control. They include the renegotiation of the North American Free-Trade Agreement (a pact with Mexico and the United States that Donald Trump keeps threatening to rip up), and the cancellation of a planned oil pipeline, which angered the western province of Alberta.

Many Canadians think Mr Trudeau has done too little to keep such promises as protecting the environment and improving relations with indigenous groups. He broke a campaign pledge to change the first-past-the-post electoral system.

The opposition was leaderless until May, when Andrew Scheer became head of the Conservatives; Jagmeet Singh took charge of the left-wing New Democrats this month. Although the Liberals are still ahead in the polls, with the support of 37% of voters, compared with 33% for the Conservatives, the gap is narrowing. Mr Trudeau’s approval rating is still above 50% but has been trending downwards. The unicorn is flying into heavier weather.

Tax and offend

The issue putting the Liberals on the defensive is tax. The government wants to close loopholes that let rich people lower their bills by paying tax as if they were small businesses. Although the government began its tenure by raising taxes on high earners, its new idea has provoked a backlash. “Conservatives wake up every day trying to think of new ways to lower taxes,” Mr Scheer thundered. Liberals just think of “new ways to raise them”.

In town-hall meetings Liberal MPs are being lambasted by constituents who say the government is painting them as tax cheats. Embarrassingly, Mr Trudeau and Bill Morneau, the finance minister, have used (legal) methods that are not targeted by the reforms to reduce the tax they owe on family wealth. The government thinks two-thirds of Canadians support its proposal and plans to introduce a modified version of it. That is a mistake, says Paul Boothe, a former finance-ministry official. It would be better to present a more comprehensive plan that would include simplifying business taxes.

On the environment, Mr Trudeau has failed to please green activists while alienating voters in oil-producing provinces. Albertans say new environmental rules for pipelines are the reason TransCanada, an Albertan firm, this month cancelled construction of the proposed Energy East pipeline. They allege that Mr Trudeau is trying to “beggar the west” just like his father Pierre, a prime minister who in 1980 proposed a plan to hold down oil prices.

In fact, Energy East was doomed by today’s low oil price and by overcapacity. One reason for it is that the government approved another project, an expansion of the capacity of the Trans Mountain pipeline through British Columbia, which alienated environmentalists. They are not mollified by a plan to impose a national carbon price. Parliament’s environment commissioner chided the government this month for implementing its climate-change policies too slowly.

A much-touted plan to protect Canadian culture from digital invaders, especially American ones, pleased nobody. Presented by the heritage minister, Mélanie Joly, on September 28th, it turned out to be little more than a deal with Netflix, which agreed to spend C$100m a year to make Canadian programmes. Quebeckers had wanted the government to impose a sales tax on non-Canadian media firms. Some English-speakers were disappointed that the was no extra support for the CBC, the state broadcaster, or subsidy for print publications. There is speculation that Ms Joly, once a high flyer, may lose her job.

Another black mark is a malfunctioning inquiry into why many indigenous women and girls were murdered or went missing in recent decades. This is part of Mr Trudeau’s promise to improve relations with 1.4m indigenous Canadians. The commission conducting the inquiry has lost much of its staff; its head says the government has not given it administrative support. Indigenous people are angry. An effort at reconciliation is having the opposite effect.

What keeps Mr Trudeau astride the unicorn is the economy. It is expected to grow by 3% this year, the fastest rate among the rich G7 economies; in September the unemployment rate was a non-disastrous 6.2%. A new child-care benefit provided a fiscal boost; infrastructure spending could provide another. Most forecasters expect growth to slow in 2018 but to remain faster than in other G7 countries. Unless, that is, Mr Trump starts a trade war. That could knock Prince Charming off his mount.