Thank you for asking your question on JustAnswer.
The common problem you are describing in most cases is caused by a bad (dirty and or sticking ) door ajar switch mounted to the bottom of the inside latch . In most cases its the drivers door as it is the most used door. In some cases you can use a can of W D 40 and try spraying a liberal amount of lube on the latch and correct it momentarily. In most cases you will need to replace it.