without any code changes it stopped working after I soldered the arduino to a protoboard.
am I using any pins that should be reserved for the WiFi chip? I am using pins 0 to 11 and the 5v, vcc and ground.
The metal on the proto board might be interfering with reception of the antenna. What happens if you move the MKR WiFi 1010 + protoboard close to your WiFi router with the top of the MKR WiFi 1010 pointed toward the router's antenna?
Luckily, the ATSAMDG21 microcontroller on the MKR WiFi 1010 has enough pins that it can have dedicated pins for communication with the WiFi module, which are not broken out as standard IO pins on the board. However, the crypto chip on the board is connected to the I2C bus and the crypto chip is used for authentication of network communication. It's attached to pins 11 and 12. The battery charger chip is also connected to pins 11 and 12. You can share the I2C bus with multiple I2C devices, but you should avoid using those pins for any non-I2C uses unless you are certain you won't have problems from it interfering with the use of the crypto and battery charger chips.
I'm glad you found the culprit at least. That's a good start!You say you're using pins 0-11. What about pins 13, 14, and A0-A6? Unlike boards such as the Uno, which use the RX and TX pins for communication with the computer, the MKR WiFi 1010 doesn't use those pins for anything and so you're free to use them for whatever purpose you like. They do have serial capabilities (Serial1), but you aren't required to use them for that purpose. In addition to allowing use with analogRead(), the analog pins can all be used as regular digital pins instead if you like.