When you use version 1.4 on the spark max controllers there is an error with the config that every time your code builds the motor controller Sensor Type resets to No Sensor and the controller won’t drive the motor and will blink ORANGE/MAGENTA which according to the API means encoder error.
The FIX that works is to create an encoder object and get the encoder.
EX.
CANSparkMax m_motor = new CANSparkMax(1, MotorType.kBrushless);
CANEncoder m_motorEnc = m_motor.getEncoder();