That usually means that your main firmware and wifi firmware are incompatible. For example, you may have upgraded the main firmware to 1.19 but not the wifi firmware. If that's what you have done, copy the new DuetWiFiServer.bin file into /sys on your SD card (renaming it to remove any version numbers from the filename after you copy it), and send M997 S1 to install it.