Tray switch/sensor my be defected.
Either the tray does not reach the switch or the switch is bad. They tray switch is the one that tells the device if the tray is opened or closed. The device won't read the disc if the switch/sensor detects the tray to be opened. If you are out of warranty disassemble the device, clean the tray rails and check if the if the switch button is not loose' if loose then you must replace it. its batter you let a repairman handle this.
Please comment below with your device model number for further assistance.