Yes they should work but 30A is high if you only need to measure a few amps.
Both are bad choices.
The INA219 is far better than those.
Try a new INA219 (12-bit) or INA226(16-bit).
Try a different I2C sensor too, to see if the problem lies with the ESP32 (pin choice).
Leo..