ScotRail has admitted it will not hit a target of stopping the dumping of human waste onto railway tracks by 2020.
The train operator had signed up to a UK-wide pledge to stop the practice of emptying raw sewage on to the railways.
But severe delays to a fleet of refurbished trains means ScotRail will still be using rolling stock without toilet waste tanks next year.
The firm said it is working to introduce the refurbished trains as soon as possible.
ScotRail was meant to have received 26 refurbished high-speed trains, with waste tanks fitted, for routes linking Scotland's seven cities from rail firm Wabtec by December last year.
Only eight of these models - which date back to the 1970s but have been renovated - have been delivered so far.
ScotRail has been forced to hire 'classic' trains, without waste retention tanks fitted, to make up some of the shortfall and nine of these will still be in operation next year.
Mick Hogg, the RMT union's regional organiser in Scotland, said: "We are livid that this promise has been broken.
"Why should our members be subjected to these disgusting conditions, being sprayed by this foul waste, as they go about their work at the trackside.
"This deal has been a disgrace for taxpayer and the travelling public, who is asking the serious questions of why these refurbished trains are going to be years late."
The practice of dumping sewage on the railways was ended by ScotRail in 2017.
However, it was reintroduced last year as an interim measure after delays to the fleet of refurbished intercity trains.
A number of other rail operators across the UK will also miss the 2020 waste target.
Research by industry regulator, the Office of Road and Rail, found that the risk of infection to railway workers from the waste was low.
A ScotRail spokesman said there was no specific legislative requirement to have retentions tanks fitted to the trains but they are being fitted as the rolling stock goes through its refurbishment programme.
He added: "We're working with suppliers to ensure the refurbishment of our fleet of high-speed InterCity trains is completed as soon as possible."
A spokesman for track operator Network Rail said: "We are committed to putting an end to trains emptying waste onto the tracks and we are working with all operators to make this happen.
"There are a few train companies that have been given a bit more time for a small number of their trains and we are tracking their action plans closely to make sure they comply."