Invisibility has been a topic of discussion (arguments) between players and DM's for years. I'm not going to get into the specifics of these various debates, but simply present my own ruling for my campaign.
Here is my take on Invisibility. The Invisibility Spell doesn't so much make a person or object invisible, so much as it make it unnoticeable by vision abilities. The observer can technically see the "invisible" character, but their mind doesn't register their presence. For instance a guard can look right at an "invisible" creature, but simply won't see it. The creature just doesn't register in the conscious mind of the observer.
This effect lasts only as long as nothing changes the circumstances of the observer's awareness, but is dispelled the moment the observer has reason to believe otherwise. For instance, the "invisible" creature attacks, or performs an action in sight of an observer that contradicts what they are observing, such as opening or moving an object in full sight. If an invisible character carries a light source into a darkened room, they will be revealed automatically because the presence of light out of nowhere would instantly uncloud the obersver's mind The moment this happens, the "invisible" character is revealed.
The spell also allows objects picked up by an invisible character to then also become invisible, as long as an observer is not looking at it when it disappears. This allows an invisible character to steal objects, or put them into place, as long as they do not tip off the observer.
Again, if the observer is tipped off to the presence of an "invisible" character, that character is no longer invisible. Failing a Pick Pocket roll, picking up or moving objects in direct line of sight by the observer, etc.
Invisibility doesn't work against mindless automatons, or the undead.
Greater Invisibility works as per normal because the observer's mind is overwhelmed by the influence upon their mind that the creature can not be seen, despite evidence to the contrary.
Of course, normal spell durations are still in effect.