Teams-for-linux: Could not parse file "/usr/share/applications/teams-for-linux.desktop": Key file contains line ? and wraps it as a standalone application using Electron.

Created on 5 Aug 2019  ·  16Comments  ·  Source: IsmaelMartinez/teams-for-linux

Describe the bug
Installing the deb of v0.5 caused me not to be able to launch the teams-for-linux.desktop application. with this error:

Could not parse file "/usr/share/applications/teams-for-linux.desktop": Key file contains line ? and wraps it as a standalone application using Electron.? which is not a key-value pair, group, or comment

To Reproduce
Install v0.5 over v0.4.

Expected behavior
Application should launch.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Installation package: deb
  • Version: 0.5

Additional context
It seems for me the Comment line in the .desktop file had a line break. I remove that to put it on one line and it launched just fine after.

bug known issuworkaround

Most helpful comment

I had the same error.
I fixed the problem as explained, by removed the extra line break for the Comment line.

All 16 comments

have you tried doing a "clean" install? we have upgraded the version of electron-builder so maybe is playing a bit with the desktop file.

I had the same error.
I fixed the problem as explained, by removed the extra line break for the Comment line.

have you tried doing a "clean" install? we have upgraded the version of electron-builder so maybe is playing a bit with the desktop file.

After it initially failed to launch I uninstalled the teams deb and purged files, and reinstalled the deb. Same behavior for me.

Well, at least there is a workaround. I just manage to create a build with electron 6 so I will see if I can release with that version, but I always like to wait a wee bit for issues to surface not to get lost in between versions. I leave it open until that is out the door, it must be electron-builder issue as is the one that does the .desktop app generation auto-magicaly.

If still not working by then, I can remove the new line in the description, but that use to work fine.

I can't install AppImage for this version. On Console i get this output:

(AppImageLauncher:18798): GLib-GIO-CRITICAL **: 07:59:24.678: g_converter_convert: assertion 'outbuf_size > 0' failed

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: Unable to load resource for composite template for type 'GtkDialog': The resource at “/org/gtk/libgtk/ui/gtkdialog.ui” failed to decompress

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed

(AppImageLauncher:18798): Gtk-CRITICAL **: 07:59:24.678: gtk_widget_class_bind_template_callback_full: assertion 'widget_class->priv->template != NULL' failed
AppImageLauncher error: appimage_shall_not_be_integrated() failed (returned -1)
AppImageLauncher error: appimage_is_terminal_app() failed (returned -1)

(AppImageLauncher:18798): GLib-CRITICAL **: 07:59:24.757: g_file_test: assertion 'filename != NULL' failed

* (AppImageLauncher:18798): WARNING *: 07:59:41.503: Key file contains line “ and wraps it as a standalone application using Electron.” which is not a key-value pair, group, or comment

(AppImageLauncher:18798): GLib-CRITICAL **: 07:59:41.503: g_key_file_has_key_full: assertion 'key_file != NULL' failed

(AppImageLauncher:18798): GLib-CRITICAL **: 07:59:41.503: g_propagate_error: assertion 'src != NULL' failed

* (AppImageLauncher:18798): CRITICAL *: 07:59:41.503: Desktop file has no Exec key

Seems also to relate to the .desktop file problem.

Hi @alfsch , have you tried the workaround suggested in this thread?

I fixed that problem by two things. I don't know wich one fixed it...
In the file /usr/share/applications/teams-for-linux.desktop

  1. I wrapped all value in quotes
  2. I removed the line-break in the comment line

@IsmaelMartinez Still failed to launch the .desktop file from the deb.

Preparing to unpack .../teams-for-linux_0.5.1_amd64.deb ...
Unpacking teams-for-linux (0.5.1-457) over (0.5.0-451) ...
Setting up teams-for-linux (0.5.1-457) ...
Could not parse file "/usr/share/applications/teams-for-linux.desktop": Key file contains line ? and wraps it as a standalone application using Electron.? which is not a key-value pair, group, or comment
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...

Contents of my /usr/share/applications/teams-for-linux.desktop

[Desktop Entry]
Name=Microsoft Teams for Linux
Exec=/opt/teams-for-linux/teams-for-linux %U
Terminal=false
Type=Application
Icon=teams-for-linux
StartupWMClass=teams-for-linux
Comment=Unofficial Microsoft Teams client for Linux using Electron. It uses the Web App
 and wraps it as a standalone application using Electron.
MimeType=x-scheme-handler/msteams;
Categories=Chat;Network;Office;

Yeah, I suspect something have changed in electron-builder that haven't
been fixed in the latest version. I don't have time now to look at it. The
fix will be to remove the new line in the package json description that I
mentioned in this thread. Apologies but use the workaround in the meantime

On Tue, 6 Aug 2019, 12:51 Chris Carpenter, notifications@github.com wrote:

@IsmaelMartinez https://github.com/IsmaelMartinez Still failed to
launch the .desktop file from the deb.

Preparing to unpack .../teams-for-linux_0.5.1_amd64.deb ...
Unpacking teams-for-linux (0.5.1-457) over (0.5.0-451) ...
Setting up teams-for-linux (0.5.1-457) ...
Could not parse file "/usr/share/applications/teams-for-linux.desktop": Key file contains line ? and wraps it as a standalone application using Electron.? which is not a key-value pair, group, or comment
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...

Contents of my /usr/share/applications/teams-for-linux.desktop

[Desktop Entry]
Name=Microsoft Teams for Linux
Exec=/opt/teams-for-linux/teams-for-linux %U
Terminal=false
Type=Application
Icon=teams-for-linux
StartupWMClass=teams-for-linux
Comment=Unofficial Microsoft Teams client for Linux using Electron. It uses the Web App
and wraps it as a standalone application using Electron.
MimeType=x-scheme-handler/msteams;
Categories=Chat;Network;Office;


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/IsmaelMartinez/teams-for-linux/issues/197?email_source=notifications&email_token=AADJHEFNNA3M4762JEO6TL3QDFQTDA5CNFSM4IJKLND2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3U4GTQ#issuecomment-518636366,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADJHEE5TQYPKH73USWTBWTQDFQTDANCNFSM4IJKLNDQ
.

Here's the relevant description line in package.json (it hasn't changed in 2 years according to git blame):

"description": "Unofficial Microsoft Teams client for Linux using Electron. It uses the Web App\n and wraps it as a standalone application using Electron.",

The newline is invalid (or not recommended, at least), but I'm guessing this issue didn't surface earlier because electron-builder previously used the relevant Comment property rather than this description. Removing the newline should be sufficient until the electron-builder issue is sorted (NB: I couldn't find an obvious bug report). PR incoming ...

Yes still the same with 5.1.
Screenshot from 2019-08-07 07-28-55

BR,

Alfred

The line break in the Comment line also affects the RPM-build. Manually removing the \n helped.

I hope to merge that once I get to work and have a laptop. Tuesday's normally I don't work (and try not to take my laptop home). @lkrms , thanks for your PR, I do suspect it will fix both issues (#197 and #199)

You might feel this is a dejavu.. but can you try version 0.5.1? https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v0.5.1 That now has the #201

Git auto stuff decided to close this issue... reopening now. Apologies.

close, release 0.6.0 coming soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tulanian picture tulanian  ·  6Comments

jpiautinity picture jpiautinity  ·  8Comments

IsmaelMartinez picture IsmaelMartinez  ·  7Comments

Bican007 picture Bican007  ·  8Comments

adithyank picture adithyank  ·  6Comments