What were you trying to do when that popped up?

The general meaning is that you tried to access or do something that you aren't allowed to do.