Password not working for OTA upload to Arduino Uno R4 Wifi

I used the sample code to set up OTA for an Arduino R4 WiFi.

#include <SPI.h>
#include <WiFiS3.h>
#include <ArduinoOTA.h>

#include "arduino_secrets.h" 
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
/////// Wifi Settings ///////
char ssid[] = SECRET_SSID;      // your network SSID (name)
char pass[] = SECRET_PASS;   // your network password

int status = WL_IDLE_STATUS;

void setup() {
  //Initialize serial:
  Serial.begin(9600);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }

  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);
  }

  // start the WiFi OTA library with internal (flash) based storage
  ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);

  // you're connected now, so print out the status:
  printWifiStatus();
}

void loop() {
  // check for WiFi OTA updates
  ArduinoOTA.poll();

  // add your normal loop code below ...
}

void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

I am using the Arduino 1.8.13 IDE and can see the arduino under ports. I select it and when I upload a pop up window appears saying "Type board password to upload a new sketch".
I thought this should be password (the third parameter in the ArduinoOTA.begin() command. I have tried two different boards and every time I enter the password the pop up window just re-appears. There is a No Device found on in the console each time I enter the password. The arduino is powered up and connected to another computer with the serial window open to verify that I have the correct IP address. My laptop and the arduino R4 are both connected to the same wifi network. I have tried two different networks(the school I work at, which may have a firewall issue and my cell phone hotspot.)
What am I doing wrong?

New sketch is just to test that it works and turns an LED on and off:

#include <SPI.h>
#include <WiFiS3.h>
#include <ArduinoOTA.h>

#include "arduino_secrets.h" 
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
/////// Wifi Settings ///////
char ssid[] = SECRET_SSID;      // your network SSID (name)
char pass[] = SECRET_PASS;   // your network password

int status = WL_IDLE_STATUS;

const int ledPin = 8;

void setup() {
  //Initialize serial:
  Serial.begin(9600);

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }

  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);
  }

  // start the WiFi OTA library with internal (flash) based storage
  ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);

  // you're connected now, so print out the status:
  printWifiStatus();
  pinMode(ledPin,OUTPUT);
}

void loop() {
  // check for WiFi OTA updates
  ArduinoOTA.poll();

  // add your normal loop code below ...
  digitalWrite(ledPin,HIGH);
  delay(1000);
  digitalWrite(ledPin,LOW);
  delay(1000);
}

void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}



The more I work at trying to get this to work the more I suspect the issue is that the board is not found and not a password issue. I was able to get a response in the command prompt when I pinged the ip address of the arduino.

Use at least 1.8.19, that bug was fixed.

It may have been fixed in IDE 2.x. If you are unable to switch to IDE 2 then use this workaround https://github.com/arduino/arduino-ide/issues/2230#user-content-workaround

Also try changing the board then change back.

I upgraded to 1.8.19 Arduino IDE and now no OTA devices show up. I tried with two Arduino Uno R4 Wifi and they both connect to the network, show up on my hotspot connected device list. I installed Arduino IDE 2.3.5 and still do not have any network devices showing up.
I read a thread talking about using Bonjour Browser. I connected by android tablet to the network, installed BounjourBrowser1.14 and it just has a spinning wheel and a stop button.

The Arduino's have the above mentioned code on them.

I have rebooted my computer, I have open and closed the IDE and still not OTA devices showing under the ports.

Not sure what to do next.

I have tried all of these things. Tried on my personal MacBook thinking maybe there was a firewall issue with the school laptop. Used IDE 2.3.4 and 1.8.19. Both found my Arduino R4 Wifi temporarily and then lost it. I tried another board and it cannot find it. The 2.3.4 IDE says Arduino UNO R$ WiFi on 192.168.###.##[not connected].
Why does the other board not show up. I can see it on my hotspot so it is definitely connected. Why does the one show up with the IP address but is not available?"

Sorry, I can't follow you. You should start with the simplest sketch and slowly add to it.
Keep in mind that school-based systems are the most difficult to resolve due to self-administered rules that make some things impossible. If you can get what you want to work at home in a 'normal' environment and then see it fail at school, you know who to talk to.

https://github.com/JAndrassy/ArduinoOTA?tab=readme-ov-file#ota-upload-from-ide-without-network-port