FRC web camera doesn't work with CameraServer.getInstance().startAutomaticCapture() anymore

My team’s trying to use a web camera on our frc robot. We only need to see through the camera on the smart dashboard, no coding with the input is needed. We used it before with just one line of code: CameraServer.getInstance().startAutomaticCapture() from edu.wpi.first.cameraserver.CameraServer and it works perfectly fine. However, it just doesn’t work anymore now and it causes the robot to quit(error: the robot should not quit, buy yours did!). Has anyone had the same problem?

What is the text above and below that error message?

Here is a picture of the error output

For anyone in the future seeing this issue, some vendor libraries have an incorrect configuration which causes forced updates of only some of the libraries in WPILib. If this happens, the Java libraries would be updated, but the JNI libraries would not, which causes this issue. We’re working on making sure this isn’t an issue in 2022, but for now the solution is to just fully update your wpilib to the latest 2021 release.

3 Likes

Thank you very much!