Micra cut out, starts buts stalls when you goto set off

The mighty Micra has died today :-( stopped at some lights and went to set off and cut out.

Took about 8 seconds of turning over to get going again and then cut out again.

Took a few attempts to get started but then died again after a few seconds.

After a few attempts got it started again and it was idling and reving perfectly but when I went to set off it just cut out straight away.

Anyway got towed by the AA and the computer said "crank shaft sensor" . does that sound like what it is before I spend £50 on one? :)

The wife's almera did this, the sensor is basically a magnet, I spent a £5 on electrical contact cleaner and cleaned off the road grime and grease . A year on so far so good. Should be a 10 mm bolt and clip off connection to remove
Thanks was hoping it would be that but tried a new crank sensor and still the same :-(

Done some more checks -

Removed the coils and I was getting No Sparks

Removed the fuel pipe and no fuel coming

Connected the fuel pump direct to 12 volt and it pumped through fine

What controls the fuel pump and coils? Is there a relay I need to look at or does it sound like the NAT immobiliser has failed?

Checked all the fuses with the multimeter and non are blown.

If I pull the main engine relay while the ignition is on I hear a humming noise from the engine bay stop and then start again when I reconnect the relay so I'm guessing the relay is doing something? But still no fuel coming through as I have the fuel pipe off and nothing's coming through (should fuel be coming through with ignition on to prime the injectors?)
One thing I noticed was when I touch the fuel relay I don't feel a click from it when turning ignition on. I've tried swapping it for a known working one but still nothing

There's 12v going to the fuel pump fuse

What tells the fuel pump and coils to activate / become live? The ECU?

When the car cut out it was like the engine was just instantly turned off / power cut from it
Had another look at this, the ECU isnt sending a signal to ground the FPR.

I grounded it myself and it worked and the fuel pump realy activated and the fuel pump kicked in

what can be causing this to happen? Faulty ECU?

it only signals for 5 secs, if there is no cam sensor signal
Thanks, I have the fuse / relay holder undone and sitting in the footwell area so see it clearly and I have the cover off the relay so I can see it operating and it does nothing from as soon as the key is turned. I also have the fuel pipe off the fuel filter so can visibly see if fuel is coming through when the key turned.

When I connect my own earth to the relay instead of the ECU's earth it activates fine
another thing I noticed before this happened was there was some crackling from the passenger side speaker when turning the radio on, dont know if that is related or not?
Today I removed the engine relay from the engine bay and used a jumper to like bypass the relay and nothing :(

I then removed the fuel pump relay and jumped that as well and again nothing :(

But I tried again and the second time it started :D I thought ok, must have been a dodgy relay but then I went to reverse and as soon as the car is put under load it cuts out like power is instantly cut.... You can sit revving it up and its smooth sounding but as soon as load was put onto it it was instant cut out and took 4 -5 attempts to start it again

But then after keep trying with it, for some reason its started to work and the ECU seems to have started to send its earth signal to the fuel pump relay as its now running with the relays fitted again

could the ecu have got damp and maybe finally dried out and sorted itself?
Ok got an update

I found that the connections inside the relay holder in the engine bay were extremely loose while the engine was running a slight touch of the wires going into the relay holder would cut the engine out

I took the holder apart and tried bending the connectors in but they were like weak tin that just bent back and went loose as soon as the relay was pushed back in so I snipped them off and crimped some new connectors and pushed them directly onto the relay, started the micra up, wobbled the wires and no cutting out

This was the same with the fuel pump relay so did the same for this

I also wired a bulb upto the fuel pump wiring so I know when its running

BUT I now have this problem... If I come to the Micra after its been left for half a day when I goto first start it the fuel pump relay wont activate (indicated by my test bulb) but on the 2nd starting attempt the relay activates and it will start right away every time unless its left for half a day or so.

What could that be if it wont start first attempt but it will start second attempt?