I have a similar issue. I run 3 seperate Pi3 boxes and I have always in the past built one how i want, then image it and use that image for the other 2. After making an image and putting it on the second card. I can't connect to my wifi. However it was all set up and connected when I shut down to make the image.
I get the "Network Error Invalid Argument" as well.
I have plugged into a wired connection for now but any help would be wnderful.