FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
01-23-2024 08:04 AM
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.
Solved! Go to Solution.
01-23-2024 08:09 AM
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
01-23-2024 08:15 AM
thanks @nickH
01-23-2024 10:31 AM
any link to download ctrlX SDK v2.x ?
@nickH
01-23-2024 10:59 AM
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.
01-23-2024 02:13 PM
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
01-23-2024 02:50 PM
The issue seems to be in the part called "mairobot". I would recommend to try the "recommended resolution":
I just searched the web for the error message "gzip: stdin: unexpected end of file". This is what I found in a public forum.
01-23-2024 02:52 PM
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.
01-24-2024 11:31 AM - edited 01-24-2024 11:33 AM
I tried by ping google.com , internet connection is fine.
but now when I try to build the snap got this issue
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.
01-24-2024 02:49 PM
What are the network settings on your app build environment? I believe the wget test I suggested above would have also failed.
If you have a host proxy, make sure you have configured the proxy in the app build environment. See documentation.
01-25-2024 06:17 AM
i have tested wget google.com it works and downloaded index file
and px.exe is running in background.
01-25-2024 03:04 PM - edited 01-25-2024 03:11 PM
@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.