SNAP GUI not starting in Ubuntu

SNAP is accessible via gpt command line, but trying to start the SNAP user interface does not work. Starting at command line typing “snap” I get the message:

bash: /home/max/snap/bin/snap: /bin/sh^M: bad interpreter: No such file or directory

Any advice? The folder exists and snap is executable at this location

Have you edited the snap script? It looks like the file is corrupted.
Please have a look at he following Stackoverflow thread: http://stackoverflow.com/questions/2920416/configure-bin-shm-bad-interpreter

thanks! That advice helped, from stackoverflow

Looks like you have a dos line ending file. The clue is the ^M

You need to re-save the file using Unix line endings.

I just saved the snap file chosing Unix endings. Now it works.

This is an installed beta version (since I have trouble with the final just now), but it almost seems that beta version had supplied the snap file with windows endings? Had just installed, not changed anything …

If the file would contain the wrong line ending right after installation I would think more people would have complained about this problem.
However, I’ve checked our code base and there it has the unix line ending.
Maybe some mysterious problem.