When locking a bike there are five steps to go through to make sure the bike gets locked:
Check if the light next to the lock is blinking red before delivering the bike. If it is, it won't lock the bike correctly
If the light next to the lock aren't blinking red, you can use the lock
Put the bike in the lock, and wait for up to 10 seconds.
Wait until the the light next to the lock stops blinking, then try to pull the bike out of the lock
How will I know if the lock is defect?
A defected lock will have a blinking red X next to it. Do not park a bike in a red lock.