Inheriting from both AccesControl and BaseRelayRecipient leads to TypeError

I have a contract that is inheriting from both these contracts but there is a conflict given by this error:
" TypeError: Derived contract must override function “_msgData”. Two or more base classes define function with same name and parameter types. contract Course is AccessControl, BaseRelayRecipient { ^ (Relevant source part starts here and spans across multiple lines). github/OpenZeppelin/openzeppelin-contracts/contracts/GSN/Context.sol:20:5: Definition in “Context”: function _msgData() internal view virtual returns (bytes memory) { ^ (Relevant source part starts here and spans across multiple lines). github/opengsn/gsn/packages/contracts/src/BaseRelayRecipient.sol:49:5: Definition in “BaseRelayRecipient”: function _msgData() internal override virtual view returns (bytes memory ret) { ^ (Relevant source part starts here and spans across multiple lines). "
Same error for _msgSender() as well. What should I override in this case?

There is an answer in our FAQ: Troubleshooting | Documentation

1 Like

Thanks for saving me, have a pleasant day! ^^