Standalone ROS2_bridge fails to load

I had the same problem, but I solved it. I was using source /opt/ros/foxy/setup.bash in the ~/.profile. This seems to be a problem caused by a conflict. If you delete that part and restart, it will be solved. If it is the same problem, it is a ros2 problem, so I recommend reinstalling ros2.