if you are trying to get out of the cave, the ender perl won't teleport you out since you don't have line of sight of where it is landing. i tried this out couple of times and it didn't work, i could teleport , but only when the landing area of the ender pearl was in sight.
Hope this helps.
It is fixed now after I relaunched the game.