This is supposed to happen, nothing is wrong with the game.
Psywave is a move that does not take weaknesses and resistances into account, even though it is a psychic type move.
The power it deals is random, varying between 0.5x to 1.5x the users level.
It still cannot hit dark types, despite not taking weaknesses and resistances into account.
You will also not receive a STAB boost from using this move.
>Though it is a Psychic move, Psywave deals typeless damage, taking neither weakness nor resistance into account, and not being affected by STAB, though it still cannot hit Dark-type Pokémon without using Miracle Eye.
So it is not a glitch, it is totally normal.
Source
Hope I helped. :]