What Greg said about WFO. The most common problem is a flooded condition. What Jeff said too, to prevent flooding.
Other things to try or check, hopefully to pinpoint the actual root cause:
- next time it won't start go through the work of pulling the plugs and see if they are wet
- pop open your tank and see if it vents
- if you are low on gas put your bike on the center stand
- make sure the bike is in neutral so there is less possible drag on the engine
- check diAG for stored codes
- use diAG to turn on the fuel pump relay
- use diAG to fire the individual injectors to confirm they are working
- use diAG to fire the coils to confirm they are working
- confirm that battery voltage is 10.4 volts or greater when cranking
- confirm the TPS is reading 16-17 with the throttle closed
- Once the engine finally starts, does it come up to normal fast idle?
There is at least one anecdotal report that when a person had a suspected flooded engine he fired the coils via diAG, heard a POP and then in the run mode the engine started right up.
If you pulled the plugs and they are wet, dry or swap them out. If the engine fires right up that confirms the flooding and points you to troubleshooting the flooding.
If the gas tank either inhales or exhales then starts up you are looking at venting.
As the cranking voltage goes down, the coils have less energy as they fire the plugs. Weak spark makes for a hard start. The coils should fire even down as low as 9 volts, but couple the weak spark with a slow crank and you will have a no-start.
If the engine doesn't come up to a normal fast idle speed the high idle circuit on the fuel rail may not be working or the ECU is reading an erroneous sensor such as the coolant temperature.
There have been reports of carbon holding valves open and sticking rings creating low compression. The dealer messes with things related to the low compression and the engine finally starts and runs. I dunno if they actually fixed something or the engine just started. If there is carbon floating around that is big and strong enough to hold a valve off the seat it may also find its way into a plug and create a weak or no fire condition. Four cylinder engines don't like to cold start with just three cylinders firing.