Error message when trying to use Waveshare camera module with Nvidia Jetson Xavier

I am using the Nvidia Jetson Xavier NX and I am trying to attach a Waveshare IMX219-200 camera to it.

To get it working, I am following the instructions on the Waveshare webpage

DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e

When I run this command I get the following error:

Invalid MIT-MAGIC-COOKIE-1 keynvbuf_utils: Could not get EGL display connection
WARNING: erroneous pipeline: no element "nvarguscamerasrc"

Can anyone advise what I’m doing wrong?

Looks like your system lost the nvarguscamerasrc.

Have a confirm with gst-inspect-1.0 nvarguscamerasrc and may need to reinstall the image by sdkmanager again.