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: 

snap app on ctrlx works real (hardware) not working but works on ctrlx works virtual.

snap app on ctrlx works real (hardware) not working but works on ctrlx works virtual.

jawad
Long-established Member

I have build an snap app of architecture amd64 for ctrlx works virtual it works fine. but when I build arm64 for real hardware it doesnot works on real device.

 

Note: one possible issue is in tasks.json file in .vscode directory.
IP of virtual device is assigned here in this file.

jawad_1-1706093870754.png

 

jawad_0-1706093806521.png

jawad_2-1706093895685.png

 

I tried to run app on real device by using its IP for example real device ip is  111.11.15.2:3005 (not real) still application is not running. but when i run it on virtual envoriment it works.

 

 

13 REPLIES 13

MauroRiboniMX
Contributor

Hello,

What is your codebase? Can be that you are cross compiling something that cannot be cross compiled 🙂

nickH
Community Moderator
Community Moderator

Hi @jawad 

The task you are refering to builds the snap and uploads it afterwards directly to a ctrlX CORE. Can you first try to just build it for arm architecture? 
Does this work? If not, what is the error message?

jawad
Long-established Member

Hi @nickH,

I have build the snap for arm64 successfully. and installed on ctrlX core but it doesnot works. before it, I have build amd64 for ctrlx Core virtual  and that works.  
project is in nodejs

nickH
Community Moderator
Community Moderator

Can you give some more information? What your snap does, what is not working? Do you get some error messages? 

AndreasL
New Contributor

I've had problems with certain npm packages that doesnt work on arm. For instance the nodejs better-sqlite only has x86 binaries. So it might be a depencency that doesnt work.

Exactly, that is why i was asking! Possibility are 2:
- you built with the node plugin which doesn't support cross compiling (see our examples)
- you used some modules wich cannot be used on arm64

Moved to corresponding sub forum SDK.

jawad
Long-established Member

 

Hi @MauroRiboniMX @AndreasL @nickH 

Upon initiating my Snap application, an interface featuring a login page is displayed during startup. The application relies on various dependencies such as sqlite3, sockets.io, etc.

List of dependencies are as under:-  

"dependencies": {
    "async-mutex": "^0.4.0",
    "axios": "^1.4.0",
    "bcrypt": "^5.1.1",
    "compression": "^1.7.4",
    "crypto-js": "^4.1.1",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "jsonwebtoken": "^9.0.2",
    "node-opcua": "^2.113.0",
    "nodemon": "^3.0.1",
    "path": "^0.12.7",
    "sequelize": "^6.33.0",
    "socket.io": "^4.7.1",
    "socket.io-client": "^4.7.1",
    "sqlite3": "^5.1.6"
  }

All these dependencies are JavaScript libraries installed with npm. I don't anticipate any incompatibility issues with the arm64 architecture. If there were, errors should have been evident during the arm64 build creation. However, the build proceeds without issues.

I've previously worked on CtrlX Core Virtual, building multiple snaps (amd64) that run seamlessly on the CtrlX Core Virtual environment. Nevertheless, when I attempt to use the same snap (arm64) on CtrlX Core (hardware) without altering any configurations, the snap builds successfully and installs on the real device. However, upon attempting to open it from the sidebar of CtrlX Core, a new tab is launched with no interface. Please refer to the screenshot below for more details.

 

jawad_1-1706180545523.png

 

 

Hello,

You don't anticipate because you're getting them for AMD64.

Please attach the log of the app 😁.

jawad
Long-established Member

Hi @MauroRiboniMX 
In logs i am getting this error.

jawad_0-1706243574001.png

 

 

/snap//x1/bin/node: 1: ELF: not found
snap.service
01/25/2024 2:18:39 PM.946ddresss: 111.11.1.150 - address 111.11.1.150: missing port in addresserror on resolving tcp addresss: 111.11.1.150 - address 111.11.1.150: missing port in addresserror on resolving tcp addresss: 111.11.1.150 -

Note: I have shared a screenshot in which I have hidden the name of the application, and the real IP has not been mentioned.

Hello,

This is a classical problem with architecture incompatibility:
https://stackoverflow.com/questions/57446579/executable-says-line-1-elf-not-found-when-starts

Probably if you make a remote-build for arm64 can be tha the same code is working.
https://snapcraft.io/docs/remote-build

Because you are not cross compiling but just compiling.

Are you using the node plugin?

jawad
Long-established Member

Hi @MauroRiboniMX 
i am using npm plugin 

CodeShepherd
Community Moderator
Community Moderator

Are there any news? Could this issue been solved?

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