The first automated aircraft would probably be data-linked to the ground with "pilots" monitoring several at once, able to step in and assume remote control if necessary. This would remove the "can it deal with any hypothetical situation?". All the automation would need to do would be to flag up "something" as wrong and ground could take over. Similarly flight attendants could communicate medical emergencies etc.
The problem this creates is the loss of data-link scenario. Programming the software to land at the nearest airport in this situation could be done, but this would require every diversion airport to be ILS and auto-land equipped. The costs would soon mount up.....
Finally, hardware/software is expensive. The level of redundancy and function required to remove pilots would take years and many millions/billions of dollars. Money which the manufacturers have to gamble on there being enough people willing to fly on these new drones. Only a fool would say fully automated planes will never happen (think president of IBM 1940s - "there will only be a market for maybe 5 computers") but it's a long way off.