Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

After installating app is not showing in sidebar menu

After installating app is not showing in sidebar menu

jawad
Long-established Member

Hi, 
After installating snap application of hello world basic application (from examples) , it is not showing in side bar menu. 
while other are showing

jawad_0-1700131034533.png

 

8 REPLIES 8

CodeShepherd
Community Moderator
Community Moderator

Moved to corresponding sub forum SDK.

Apps only show up in the bar on the left side in the ctrlX CORE web UI if you entered the necessary information in your package manifest. Please see documentation of the SDK for ctrlX AUTOMATION on GitHub.

 

jawad
Long-established Member

I go through it, here is my hello-world-new.package-manifest.json file located in hello-world-new/configs/hello-world-new.package-manifest.json

{
    "version": "1.0.0",
    "id": "hello-world-new",
    "menus": {
      "sidebar": [
        {
          "id": "hello-world-new",
          "title": "Hello Multilanguage",
          "icon": "bosch-ic-translate",
          "link": "/hello-world-new",
          "target": "_blank"
        }
      ]
    },
    "services": {
      "proxyMapping": [
        {
          "binding": "unix://{$PACKAGE_WWW_SOCKET}",
          "name": "hello-world-new",
          "url": "/hello-world-new"
        }
      ]
    }
}

and this is my snapcraft.yaml
 

name: hello-world-new
version: "1.0.0"
summary: hello-world-new
description: |
  Programm is prompting "Hello World" to standard output. Enter 'sudo snap logs ctrlx-node-hello-world.app -f | more' to see the output.
confinement: strict
grade: stable
base: core20
type: app

apps:
  hello-world-new:
    command: bin/app
    daemon: simple
    plugs:
      - network
      - network-bind
      - network-status
      - active-operation
      - datalayer
    slots:
      - package-assets
      - package-run
    restart-condition: always
    passthrough:
      restart-delay: 10s

parts:
  hello-world-new:
    plugin: npm
    source: .
    npm-node-version: "10.19.0"
  configs:
    plugin: dump
    source: ./configs
    organize:
      'package-assets/*': package-assets/${SNAPCRAFT_PROJECT_NAME}/

slots:
  package-assets:
    interface: content
    content: package-assets
    source:
      read:
        - $SNAP/package-assets/${SNAPCRAFT_PROJECT_NAME}
  package-run:
    interface: content
    content: package-run
    source:
      write:
      - $SNAP_DATA/package-run/${SNAPCRAFT_PROJECT_NAME}

  plugs:
    active-solution:
      interface: content
      content: solutions
      target: $SNAP_COMMON/solutions
    datalayer:
      interface: content
      content: datalayer
      target: $SNAP_DATA/.datalayer
    build-environment:
      - NODE_VERSION: "10.19.0"
 
    override-build: |
      if [ $SNAPCRAFT_TARGET_ARCH == "arm64" ]; then
          arch="arm64"
      else
          arch="x64"
      fi    

      # fetch node
      echo fetching: $node_uri

      if [ ! -f "${SNAPCRAFT_PART_INSTALL}/bin/node" ]; then
          curl $node_uri | tar xzf - -C $SNAPCRAFT_PART_INSTALL/ --no-same-owner --strip-components=1
      fi
      # clean cache
      npm cache clean --force

      # install production dependencies
      npm install --production --ignore-scripts --no-fund --unsafe-perm

      # install nodemon as a development dependency
      npm install --save-dev nodemon

      # pack and install the app (only production)
      npm install -g --prefix $SNAPCRAFT_PART_INSTALL $(npm pack . | tail -1) --ignore-scripts --omit=dev --no-fund --unsafe-perm

      # remove unused node_modules
      rm -rf ${SNAPCRAFT_PART_INSTALL}/lib/node_modules/npm
      rm -rf ${SNAPCRAFT_PART_INSTALL}/lib/node_modules/corepack
But still it is not showing the app in sidebar

nickH
Community Moderator
Community Moderator

Can you unzip the .snap file and check if the package-manifest file is inside the snap? If not please check if the package-manifest is inside the folder configs (source./configs). 

 

You can also look into our SDK sample hello.webserver (a simple go webserver) how its done here: samples-go/hello-weberserver on GitHub

jawad
Long-established Member

Actually I copy all of content from samples-go/hello-webserver
and secondly I unzip the snap file and its shows manifest file exists in it, have an look to it
@nickH 

jawad_0-1700139940325.png

 

nickH
Community Moderator
Community Moderator

Here seems to be the problem. I unpacked the hello-webserver example and it looks like this (the package-manifest has to be inside the folder "package-assets/${SNAPCRAFT_PROJECT_NAME}/ ")

nickH_0-1700142265525.png

 

As @nickH stated, you have to check that:

- You are copying the file in the same folder you are providing as a slot. $SNAPCRAFT_PROJECT_NAME helps to do it automatically 🙂
- the file is named correctly as snapname.pachage-manifest.json
- the file is well written 😄

 

nickH
Community Moderator
Community Moderator

Hi @jawad 
Any news? Were we able to help you?

jawad
Long-established Member

Yes issue resolved.
You were right, I found issue in path, actually, manifest file was not in package-assets folder.
Thanks to you both 
@nickH @MauroRiboniMX 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist