Joystick Error In Debug But Not In Drive Station

When deploying our program and testing it on debug it shows a connection issue with the joystick that isn’t present on the drive station, our code is here:

We’d be thankful for any help

Please don’t create multiple threads for the same issue. It makes it harder to keep track and help.