I have been struggling with this problem for the last couple of days, and i want to share my “solution” or at least a workaround, that works for me.
I’m using Ubuntu 20.04 and due to my requirements, any of the browsers which oficially supports the XModules(Chrome, Edge, Firefox) work for me. To install XModules in a chromium-based browser, Brave in my case,(I suppose this solution work for the rest of browsers) just modify the path on the .sh module installation file.
For instance, if you only need XFileAccess module, change the path in fileaccess_install_chrome.sh from chrome/NativeMessagingHosts to BraveSoftware/BraveBrowser/NativeMessagingHosts and reinstall the modules.
I don’t know if there is a topic similar to this in the forum, but i didn’t found it, so i just wanted to share this to everyone to save you time.