The OP opened this thread asking what is wrong with his bike, and stating that the chain and cassette were new, leaving no other information.
Clean, Inspect, Lubricate, Adjust. For some reason when maintenance is properly done, many problems magically disappear. Without any further repair or replacement of parts. Funny how that happens...