Unable to calibrate compass: unable to fit mag 0

Build:
Pixhawk 6c
Holybro M8N GPS

I am trying to calibrate to compass and the 6 different positions all turn green however on the 6th one once it finishes it I get the following error.

Retry calibration (unable to fit mag 0)
[cal] calibration failed: mag

I am not sure what is causing this. Any help is appreciated.

It could be that the magnetic field near the internal magnetometer is too much distorted by nearby components.
Since you have an external mag in the GNSS module, you could disable the internal one.