I'm getting the same error as OP so using the custom tag as suggested but now getting Error (java.nio.channels.ClosedByInterruptException) .
Theres about 1500 emails in the folder I'm trying to access if that has any bearing?