Marks & Spencer became the latest retailer to take its grocery business online this week when it lifted the lid on a one-hour delivery trial.

The high street stalwart is offering selected products, including “dinner for tonight” options, fresh food, drinks and desserts, for delivery to shoppers in the vicinity of its Camden branch.

But those modest, tentative steps into the food ecommerce arena should serve as a warning of the profitability challenges posed by the growing channel.

Following the relentless onslaught of discount duo Aldi and Lidl, which has forced prices down across the sector, the 5% and 6% margins enjoyed by the big four have been left firmly in the past.

Instead, margins in and around the 3% mark have become the new norm.

Even in an inflationary market, the likes of Tesco, Sainsbury’s, Morrisons, Asda and the Co-op have all vowed to keep shelf price rises to a minimum for the benefit of its customers.

Amid such a competitive landscape, making a profit from store-based operations is challenging enough – as Aldi itself proved this week after unveiling a 17% drop in operating profit for the 2016 calendar year.

But as the consumer shift to online continues at a pace, the grocers find themselves almost obligated to offer an ecommerce home delivery service, offering slim to zero, or perhaps even negative margins.

Indeed, former M&S boss Marc Bolland had previously poured cold water on the merits of the retailer launching a food offer online for that very reason.

Yet Steve Rowe – Bolland’s successor and the man who was in charge of M&S’s grocery division during the Dutchman’s reign – clearly feels there is an opportunity to explore, albeit with an understandable, toe-dipping degree of caution.

Sainsbury’s and Tesco both insist their online food operations are profitable, although they have consistently declined to break out a profit figure from their ecommerce divisions.

Their big four rival Morrisons said it delivered £14m in profit during its first half from a combination of wholesale, services, interest and online, although it is not clear how much of that came from the latter category.

And you only need to look at online grocery specialist Ocado to see the true extent of the challenge.

The business took 15 years to turn its first profit and last week its chief financial officer Duncan Tatton-Brown told me that the cost of the ‘last mile’ – delivering goods from its warehouses to customers’ homes – represented a chunky 11% of sales.

In other words, for every £100 order, the cost to Ocado of delivering that basket to a customer’s home is around £11.

When you consider the fact it sells a Smart Pass, offering unlimited deliveries on orders over £40, for just £69.99 per year, Ocado will be incurring costs to fulfil orders.

M&S has kickstarted its small-scale trial by offering free deliveries, something that is equally unsustainable in the longer term.

While M&S’ efforts clearly represent a pilot, online grocery is no longer just an interesting experiment for others in the market.

In the same way that discount and convenience have become ingrained in shopper habits, online grocery is here to stay.

With that in mind, food retailers have thus far been happy not to recover the full cost of deliveries from their customers in order to drive shopper loyalty.

But if they are to make a profit from the channel in the longer term, the time for them to be honest with consumers about the true cost of fulfilment – and start charging higher delivery prices – is rapidly approaching.