I'd change that role to listbox and see what happens.
The aria-haspopup spec wants the value you choose for the attribute to match the role for the element you've added it to. Not sure if addressing the discrepancy would resolve the error, but I think it's worth a shot
More broadly, it might be helpful to consider using a instead, but one crisis at a time here :)