Yes in Arduino iot cloud the code takes input from the button widget whereas in IDE it takes it from a io pin, thats the little difference when I just use the example code of CameraWebServer in the web editor it works fine but as soon as thingsproperties.h and arduino_secrets.h is added this starts giving the camera error.