Thanks for your response. The printer is almost 3 years old and the 3rd party cartridges have worked perfectly until now. But I won't be buying HP ever again after this.
I've tried the methods you suggest. Power down doesn't change anything. The printer accepts the 3rd party cartridges when inserted one by one, but when the final HP black cartridge is inserted, all the 3rd party cartridges are flagged as needing replacement.