Not the person you were replying to, and don’t understand exactly what you mean with port and device id. But if it changes every time, -ish, you plug it in, do you mean like /dev/sdX device names? If so, then maybe look at /dev/disk/by-TYPE/ and use those instead? You have stuff there which is the same each time you plug in.
Installed ubuntu on an rpi and firefox there ran snap. Was not very usable. Everything was so slow. Forcing an install of the dep package was the only way to use it. Not very well thought through bu cannonical.