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

Diagnose error during start of app

Diagnose error during start of app

therusch
Established Member

Hello, 

I created a snap with the realtime SDK 1.18 and tried to install it on my virtual ctrlX Core. 
The snapping process runs without errors but during the installation I get the following errors in the logbook: 

Trace error app.automationframeworkBundle exception [70001]: Could not start bundle: (null) [21]
Trace error app.automationframeworkBundle exception [70001]: "Could not load all bundle libraries"
Trace error app.automationframeworkBundle exception [70001]: "Could not load all libraries"
Trace error app.automationframeworkBundle exception [70001]: "Could not load library: /var/snap/rexroth-automationcore/1010/framework/.cache/bundle21/version0.0/libdummy_cpp_state_machine_lib.so"; Cause: /var/snap/rexroth-automationcore/1010/framework/.cache/bundle21/version0.0/libdummy_c

Sadly the rest of the message is truncated. 

So I obviously made a mistake, but I don't know how to find out what I did wrong. 
I looked into the HowTo article for debugging, but this debugging always starts after installing the snap or is for non- realtime snaps.
Is there a possibility to get the complete message? Or is there a way to check the snap befor installing it? Am I missing something in a HowTo? 

Thank you and best regards

2 REPLIES 2

nickH
Community Moderator
Community Moderator

Hi @therusch 

The error message shows you that a share object "libdummy_cpp_state_machine_lib.so" could not be loaded. Can you check if this library is available in your bundle (inside your snap)? And here you should also check if all the dependencies for this library are also available (for example with ldd). 

I would recommend to reverse engineer a little bit in our bundles and see what you are doing different. Here you can see the unziped datalayer.bundle and its celix-bundle-manifest. This bundle and more bundles are also included in the SDK (ctrlx-automation-sdk/bundle). 

2023-08-11_06h55_49.png

 

To explain the mainfest a little bit I can recommend this introduction into the OSGi bundle manifest from IBM (link). 

Best regards, 

Nick

nickH
Community Moderator
Community Moderator

You can also debug your RT-Bundles directly in the App Build Environment. This is already configured in our RT-samples (automation.scheduler, automation.scheduler.thread, rtdatalayer.owner and rtdatalayer.user). 

Prerequisite to do this is, you got install the C++ Extension in Visual Studio Code. Then you can run the script "build-debug.sh" and when this is finished, start the debugging (F5). Then the framework, which is located in the SDK (at bin/framework) is started. It will then load all the bundles it can find in the folder bundles and your own self-created bundle. 

For this I would recommend you to use the V1.20 of RT-SDK because the framework in V1.20 will need two environment variables to start in the App Build Environment, which were not necessary for 1.18 framework. You can see this in the .vscode/launch.json. 

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