AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

ERROR: appimage_register_in_system : Unexpected char '_' at 0 #111

Closed probonopd closed 5 years ago

probonopd commented 5 years ago

What does this mean?

ERROR: appimage_register_in_system : Unexpected char '_' at 0

appimaged, continuous build (commit 96e1994), build 121 built on 2019-05-07 22:17:31 UTC
azubieta commented 5 years ago

No idea, can you provide more logs? Maybe a suspicious AppImage?

probonopd commented 5 years ago

Unfortunately appimaged does not show any more which Appimage is being processed (separated by ___, in case you remember those times). It used to be that way but someone must have changed that behavior. So I have no chance to know which AppImage causes this...

azubieta commented 5 years ago

I guess we will have to bring back that debug information.

probonopd commented 5 years ago

Yes please. (Someone had complained, but we now have -v.)

probonopd commented 5 years ago

Actually, the debug information still is kinda there when invoking with --verbose. However, the individual AppImages being worked on are not always cleanly separated by "_____" any more, and there is partial output even when invoked without --verbose (which should not be; only grave errors should be reported there).

probonopd commented 5 years ago

Can reproduce ERROR: appimage_register_in_system : Unexpected char '_' at 0 with https://github.com/aferrero2707/PhotoFlow/releases/download/v0.2.8/photoflow-0.2.8.glibc2.14-x86_64.AppImage:

_________________________
thread_appimage_register_in_system (/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage)
appimage_register_in_system call skipped. is_appimage_result: 0 appimage_is_registered_in_system_result: 0
/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part CLOSE_WRITE,CLOSE
_________________________
thread_appimage_register_in_system (/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part)
ERROR: appimage_register_in_system : Unexpected char '_' at 0
appimage_register_in_system result: 1
/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part CLOSE_WRITE,CLOSE
_________________________
thread_appimage_register_in_system (/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part)
ERROR: appimage_register_in_system : Failed to open '/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part'
appimage_register_in_system result: 1
/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part MOVED_FROM
_________________________
thread_appimage_unregister_in_system (/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage.part)
appimage_unregister_in_system (thread_appimage_unregister_in_system): $d
/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage MOVED_TO
_________________________
thread_appimage_register_in_system (/home/me/Downloads/photoflow-0.2.8.glibc2.14-x86_64.AppImage)
ERROR: appimage_register_in_system : Unexpected char '_' at 0
appimage_register_in_system result: 1
Updating desktop...
Directory '/home/me/.local/share/mime/packages' does not exist!
Warning: update-mime-database retuned non-zero exit code:
Finished updating desktop in 27 milliseconds.
azubieta commented 5 years ago

Just had a look into the AppImage, the desktop file has an invalid char '_' at position 0 line 3. That's way it fails.

Here is the desktop file

[Desktop Entry]
Name=PhotoFlow
_GenericName=RAW and bitmap photo editing
_Comment=Edit images from digital cameras

X-GNOME-FullName=PhotoFlow Photo Editing Software

Version=1.0

Type=Application
Categories=Graphics;Photography;GTK;
# TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
_Keywords=graphics;photography;raw;

Exec=photoflow.wrapper %U
TryExec=photoflow
Terminal=false
StartupNotify=true

MimeType=application/x-photoflow;image/x-dcraw;image/jpeg;image/jpg;image/png;image/tiff;

Icon=photoflow

X-Unity-IconBackgroundColor=#252525

You can check the standard here, '_' chars are not allowed in key names (only a-zA-Z-)

So there is not too much to do here besides printing a better error message. PR here #115

probonopd commented 5 years ago

I see. Is this an ERROR though? If we can catch and handle this, then it should imho be a NOTICE: Ignoring entry _... in desktop file only.

azubieta commented 5 years ago

It's not our error. AppImage makers should validate their desktop files. We could do add the option to ignore malformed entries but I guess that this will lead to more issues in the end.

azubieta commented 5 years ago

Error message improved on #115 closing this issue, please reopen if required