If the contacts on the lens become soiled this may cause communication issues with the camera body.
Solution
If the lens contacts get soiled, scratched, or have fingerprints on then, corrosion or faulty connections can result. This can cause the camera and lens to not operate properly.
If the contacts get soiled or have fingerprints on them, clean them with a soft cloth.