I can workaround this by setting the useiframe property on the aemform component to false.
useiframe="false"
Error seems to only occur when useiframe is true (default).
This is enough to get around my problem so I will mark this as answered, if you want the form in an iframe then that looks to not work out of the box in AEM 6.3