I get weird black spots whenever I load a material

It look like the cube has double vertices, try to apply the texture to a pallet mesh