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

building snap with base:core22 issue

building snap with base:core22 issue

jawad
Long-established Member

Hi. I am building snap for my application.
In snapcraft.yaml

I used base:core20 ,it works fine.

but when i change it to base:core22 it gives me error:

Initializing parts lifecycle Traceback (most recent call last):
File "/snap/snapcraft/10279/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/cli.py", line 258, in run
_run_dispatcher(dispatcher, global_args)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/cli.py", line 230, in _run_dispatcher
dispatcher.run()
File "/snap/snapcraft/10279/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/commands/lifecycle.py", line 138, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 104, in run
_run_command(
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 163, in _run_command
lifecycle = PartsLifecycle(
File "/snap/snapcraft/10279/lib/python3.10/site-packages/snapcraft/parts/parts.py", line 95, in __init__
self._lcm = craft_parts.LifecycleManager(
File "/snap/snapcraft/10279/lib/python3.10/site-packages/craft_parts/lifecycle_manager.py", line 181, in __init__
self._sequencer = sequencer.Sequencer(
File "/snap/snapcraft/10279/lib/python3.10/site-packages/craft_parts/sequencer.py", line 58, in __init__
self._sm = StateManager(
File "/snap/snapcraft/10279/lib/python3.10/site-packages/craft_parts/state_manager/state_manager.py", line 191, in __init__
state = load_step_state(part, step)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/craft_parts/state_manager/states.py", line 56, in load_step_state
state_data = yaml.safe_load(yaml_file)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/snap/snapcraft/10279/lib/python3.10/site-packages/yaml/constructor.py", line 427, in construct_undefined
raise ConstructorError(None, None,
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!PullState'
in "/home/boschrexroth/projects/22-01-24/parts/configs/state/pull", line 1, column 1

* The terminal process "/bin/bash '-c', 'bash build-snap-amd64.sh'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

jawad_0-1705993453716.png

 

11 REPLIES 11

nickH
Community Moderator
Community Moderator

Hi

If you want to update to core22 please use a Build Environment created with ctrlX Works V2.x and the ctrlX SDK V2.x. 

Regards, 

Nick

jawad
Long-established Member

thanks @nickH 

jawad
Long-established Member

any link to download  ctrlX SDK v2.x ?
@nickH 

nickH
Community Moderator
Community Moderator

If you run the install-sdk.sh script it will automatically search for the newest version of the SDK on GitHub and download it. But you can find the SDK releases here on GitHub

jawad
Long-established Member

@nickH 

I have installed new ctrlx works v2.4.1 and then build new App enviorement and when I try to build snap with core22 got this issue now

jawad_0-1706015537103.png

 

nickH
Community Moderator
Community Moderator

The issue seems to be in the part called "mairobot". I would recommend to try the "recommended resolution": 

  • Check the build logs (search in the web for the error messages you got)
  • Check the part mairobot configuration in the snapcraft.yaml
  • Check if the sources configured there are correct and available

I just searched the web for the error message "gzip: stdin: unexpected end of file". This is what I found in a public forum

Sgilk
Frequent Contributor

Hi @jawad ,

Are you sure you have an internet connection within your app build environment? I'm thinking this error might be due to an incomplete download of nodeJS tar.gz during the build.

You could verify internet connection with wget google.com, and then try and build again. Another option would be to download the package on your host PC and move it into this project inside your app build environment. Then you would target the local file in your build script instead of the download.

jawad
Long-established Member

I tried by ping google.com , internet connection is fine. 

jawad_0-1706092185669.png

 

but now when I try to build the snap got this issue 

jawad_1-1706092372605.png

 

npm WARN EBADENGINE }
npm ERR! code ECONNRESET
npm ERR! network Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/boschrexroth/.npm/_logs/2024-01-23T14_00_45_252Z-debug.log
Failed to build 'mairobot'.

Recommended resolution:
Check the build logs and ensure the part's configuration and sources are correct.

 

Sgilk
Frequent Contributor

What are the network settings on your app build environment? I believe the wget test I suggested above would have also failed.

Sgilk_0-1706103777785.png

If you have a host proxy, make sure you have configured the proxy in the app build environment. See documentation.

jawad
Long-established Member

@Sgilk 

i have tested wget google.com it works and downloaded index file

jawad_0-1706159838094.png

and px.exe is running in background.

Sgilk
Frequent Contributor

@jawad ,

Ok great, you have the correct network settings in the app build environment, but you may also need to configure npm proxy settings. Reading a little further up in the error messages, I think there also may be a mismatch in NodeJS versions. The Mairobot package requires NodeJS v14 or NodeJS >=v16.14, you currently have v16.7 installed. You can either update the package requirements, or install a compatible version of NodeJS.

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