Can't connet my app to network (Error: "Secure connection setup failed.")

I can finally got my snap to work (Thank you @James-Carrol) but it seems that I can’t connect to the internet. the terminal shows this error

Error: "Secure connection setup failed."

Here is my snapcraft.yaml

name: textreader # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Read text using online/offline services # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots


parts:
  textreader:
    # See 'snapcraft plugins'
    source: .
    stage-packages:
    - libasyncns0
    - libdouble-conversion3
    - libflac8
    - libfreetype6
    - libgl1
    - libglvnd0
    - libglx0
    - libgraphite2-3
    - libharfbuzz0b
    - libicu66
    - libogg0
    - libpcre2-16-0
    - libpng16-16
    - libpulse0
    - libsndfile1
    - libvorbis0a
    - libvorbisenc2
    - libx11-6
    - libxau6
    - libxcb1
    - libxdmcp6
    - curl
    plugin: cmake
    cmake-parameters:
    - -DCMAKE_BUILD_TYPE=RELEASE
    - -DCMAKE_INSTALL_PREFIX=/usr/
    - -DCMAKE_PREFIX_PATH="${SNAPCRAFT_STAGE}/usr"


apps:
  textreader:
    command: usr/bin/textreader
    extensions: [kde-neon]

the kde-neon extension only provides the following plugs:

  • desktop
  • desktop-legacy
  • opengl
  • wayland
  • x11

As can be seen when you investigate the supported interfaces document this means your snap has not been given permission to access the network. To provide that permission you need to specify network and possibly also network-bind if you need to listen for incoming connections as well as making outbound connections:

apps:
  textreader:
    command: usr/bin/textreader
    extensions: [kde-neon]
    plugs:
      - network

thank you for the response I’m not an expert when it comes to communicate with networks. In my app i use QMediaPlayer to stream a sound from the internet. I added

    plugs:
    - network
    - network-bind
    - network-manager
    - network-manager-observe
    - network-status
    - network-observe
    - network-setup
    - network-setup-observe
    - network-control
    - network-setup-control

but unfortunately It didn’t work for me. I still get that error.

Do you have any idea?

I think it is a snapcraft problem i simply switched to core18 and it was simply fixed!