I have trouble using arduinoCloud

I'm having the same problem with the sketch that Arduino Cloud generates for my MKR1000.

The board seems to work ok and can connect to wireless network (WiFi101 sample sketch WiFiPing works fine). I've tried uninstalling / reinstalling the IDE, deleting the "thing" from the cloud / recreating it / downloading new sketch with new THING_ID and THING_PASSWORD, but still no luck.

I'm using:
MKR1000
Arduino IDE 1.8.1
WiFi101 library version 0.12.1 (installed using IDE library manager)
Arduino SAMD Boards library version 1.6.11
Wifi firmware V19.4.4, verified by CheckWifi101FirmwareVersion sketch

Any suggestions of other things to try?