Cannot upload sketch. Upload port found on /dev/ttyACM0

Pop!OS 22 (=Ubuntu 22).
Adafruit M0. (SAMD21)
Adafruit SAMD Boards installed: 1.7.13

Error messages:
Sketch uses 10644 bytes (4%) of program storage space. Maximum is 262144 bytes.
Performing 1200-bps touch reset on serial port /dev/ttyACM0
Waiting for upload port...
No upload port found, using /dev/ttyACM0 as fallback
No device found on ttyACM0
"/home/william/.arduino15/packages/adafruit/tools/bossac/1.8.0-48-gb176eee/bossac" -i -d --port=ttyACM0 -U -i --offset=0x2000 -w -v "/tmp/arduino/sketches/4B8A6F256AAF33DC7DD1F2DEBAFB75F5/samdtest.ino.bin" -R
Failed uploading: uploading error: exit status 1

How to fix?

Looks like It's not seeing your device on any serial port.

can you see it if you look manually?

Are you sure you're using a good cable - and not just a charging cable?

Type 'groups' in a terminal. Do you see the 'dialout' group ?

In a terminal, type:
cat /etc/group| grep dialout [ENTER]
Is your user name there?

type:
dmesg |grep "ACM0" [ENTER]
Do you see anything?

My first question would be if /dev/ttyACM0 is indeed the Adafruit board. Does it disappear when you disconnect the board?

The possible workaround is to upload an innocent sketch (like blink). When you see Performing 1200-bps touch reset on serial port /dev/ttyACM0, double tap the reset button on the board. If your board does not have a reset button, wire one up or simulate with a piece of wire.

After that, the normal upload process of an innocent sketch should work consistently; try a few times. After that you can upload your sketch; if the problem surfaces again, your sketch has bugs that prevent it from reacting on the software reset.

Most boards with native USB will have a visual indication (after a double-tap reset ) that the bootloader is waiting for the code; on e.g. a Leonardo the onboard LED will fade in and out for approximately 8 seconds.

Yes there is such a group

i am in dialout group. dmesg shows nothing today

Up loaded IDE 2.2.0. Plugged in board. Clicked the magic button. Magic happened: port shows, sketch uploads and works. Many, many thanks to you and the others responding!