In 1947 a moth was found in a relay switch on the Mark II electromechanical computer, a true computer “bug.”[1] What’s most interesting here isn’t that an insect was found in the machine, but that the computer operator taped the moth into the logbook. It’s almost as if the moth was trapped in a thin sheet of amber, preserved as the pre-digital ancestor of the tricksters within our own modern devices.
"Log book with computer bug," NMAH

The insect was found by Grace Hopper, a computer scientist and rear admiral in the US Navy. Google recently paid homage to Hopper with a “doodle” showing her working on an early mainframe computer. Not only does the computer display an answer on a paper printout, but a moth also flies out at the end of the sequence.

Google "doodle" commemorating Hopper's 107th birthday last December

[1] It’s most likely 1947, but the Computer History Museum lists the date as 1945, before the completion of the Mark II and its delivery to the Navy.