Programing code failure or wrong GPIO pin?

westfw:
Do you have a common ground connection between the relay board and the esp board?

what will happen if the relay and esp have the same Ground connection pin?