appimage-builder
appimage-builder copied to clipboard
Crash when using --generate
appimage-builder --generate
INFO:Generator:Searching AppDir
? Please select the application desktop entry /home/budd/code/switcheroo/AppDir/io.ebudd.Switcheroo.desktop
? ID [Eg: com.example.app]: io.ebudd.Switcheroo
? Application Name: Switcheroo
? Icon: io.ebudd.Switcheroo
? Executable path: usr/bin/switcheroo
Traceback (most recent call last):
File "/tmp/.mount_appimadook36//usr/bin/appimage-builder", line 8, in <module>
sys.exit(__main__())
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/__main__.py", line 30, in __main__
generator.generate()
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/command_generate.py", line 76, in generate
recipe = self.generator.generate(self.app_dir)
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/recipe_generator.py", line 50, in generate
bundle_info = self._bundle_info_gatherer.gather_info(app_dir)
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/bundle_info_gatherer.py", line 53, in gather_info
self._confirm_application_information(self._bundle_info)
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/bundle_info_gatherer.py", line 87, in _confirm_application_information
app_info.exec_args = self._confirm_application_exec_args(app_info.exec_args)
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/bundle_info_gatherer.py", line 111, in _confirm_application_exec_args
return self._ui.ask_text("Arguments [Default: $@]:", default=preset)
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/appimagebuilder/modules/generate/bundle_info_gatherer_cli.py", line 23, in ask_text
question = questionary.text(
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/questionary/prompts/text.py", line 98, in text
p.default_buffer.reset(Document(default))
File "/tmp/.mount_appimadook36/usr/lib/python3.8/site-packages/prompt_toolkit/document.py", line 128, in __init__
self._cache = _text_to_document_cache[self.text]
File "/tmp/.mount_appimadook36/usr/lib/python3.8/weakref.py", line 131, in __getitem__
o = self.data[key]()
TypeError: unhashable type: 'list'
Could you please share this file /home/budd/code/switcheroo/AppDir/io.ebudd.Switcheroo.desktop for inspection?
Hi, I get the same error. It happens when there is an argument in Exec:
OK : "Exec=linphone" NotOk: "Exec=linphone %u"
Desktop file example:
[Desktop Entry]
Name=Linphone
GenericName=SIP Phone
Comment=A libre SIP client
Type=Application
Exec=linphone %u
Icon=linphone
Terminal=false
Categories=Network;Telephony;
MimeType=x-scheme-handler/sip-linphone;x-scheme-handler/sip;x-scheme-handler/sips-linphone;x-scheme-handler/sips;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/linphone-config;
X-PulseAudio-Properties=media.role=phone
X-AppImage-Version=3fde215e
I guess the parser at https://github.com/AppImageCrafters/appimage-builder/blob/main/appimagebuilder/modules/generate/desktop_entry_parser.py should be check.
Using the latest CI pre-release version fixed this issue for me. (What version are you using?)
Ok, after rechecking, I know what was "wrong". The documentation is not updated at https://appimage-builder.readthedocs.io/en/latest/intro/install.html
It uses : wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.0-beta.1/appimage-builder-1.0.0-677acbd-x86_64.AppImage
I didn't change the version to the last
And I confirm that it doesn't crash on the latest version.