The problem was that I was using a outdated capacitor version, after upgrade to capacitor 3, it worked!