" "[error] Port refinement, process abc3d : Port "WavePort2" is incorrectly set up. A port must have a non-existent material on one side. Both "Box1" and "cover2" exist. "
"
you cannot place a waveport inside your geometry, unless it is backed with PEC. therefore, waveports are usually placed at the outer boundary of the model (which is backed with PEC by HFSS automatically).
if two different materials will be on both sides of the port (e.g., air/dielectric or dielectric/dielectric) you should use lumped ports. or, you should use some PEC surface to the back side of the waveport.