I thought you said you took it off and the went for a drive then the truck died... .
If the truck is completely fine and runs perfect then it has to be the box or the harness. I would start at the box... maybe get some dielectric grease for all the connections on the box.
After that check the map plug for loose wires etc... . look close for kinks, crimps, or small slices or cuts or exposed wire anywhere. If that doesn't work get a whole new harness.
Start with the small things first and work your way up to the big things... .....