<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>412665</bug_id>
          
          <creation_ts>2019-10-06 11:38:12 +0000</creation_ts>
          <short_desc>kdeconnect-cli cannot start kdeconnectd.exe on Windows in Chinese</short_desc>
          <delta_ts>2020-11-13 18:08:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kdeconnect</product>
          <component>common</component>
          <version>unspecified</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="jingyu9575">qw2g64</reporter>
          <assigned_to name="Albert Vaca Cintora">albertvaka</assigned_to>
          <cc>dianlujitao</cc>
    
    <cc>KDE</cc>
    
    <cc>piyushaggarwal002</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1883877</commentid>
    <comment_count>0</comment_count>
    <who name="jingyu9575">qw2g64</who>
    <bug_when>2019-10-06 11:38:12 +0000</bug_when>
    <thetext>SUMMARY

With latest kdeconnect nightly on Windows (in Chinese), starting kdeconnect-indicator.exe will not start kdeconnectd.exe, leaving the program nonfunctional.

STEPS TO REPRODUCE
1. Install kdeconnect from https://binary-factory.kde.org/job/kdeconnect-kde_Nightly_win64/
2. Launch kdeconnect-indicator.exe

OBSERVED RESULT
kdeconnect-indicator.exe hangs with no tray icon. kdeconnectd.exe is not running.

EXPECTED RESULT
kdeconnectd.exe is running and kdeconnect-indicator can be used.

SOFTWARE/OS VERSIONS
Windows: Windows 10 1903 18362.10022 zh-CN
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Process Monitor showed that kdeconnectd.exe and dbus-daemon.exe were started but dbus-daemon immediately crashed. If `dbus-daemon --session` is started manually, launching kdeconnect-indicator will crash dbus-daemon with the following message:

&gt; dbus-daemon[7444]: info: [session pid=7444 sid=S-1-5-21-**********-**********-**********-1001] Activating service name=&apos;org.kde.kdeconnect&apos; requested by &apos;:1.0&apos; (pid=8172 comm=&quot;&quot; sid=&quot;S-1-5-21-**********-**********-**********-1001&quot;)
&gt; dbus-daemon[7444]: info: [session pid=7444 sid=S-1-5-21-**********-**********-**********-1001] Activated service &gt; &apos;org.kde.kdeconnect&apos; failed: Failed to execute program org.kde.kdeconnect: 系统找不到指定的文件。
&gt; dbus-daemon[7444]: error: arguments to dbus_message_iter_append_basic() were incorrect, assertion &quot;_dbus_check_is_valid_utf8 (*string_p)&quot; failed in file C:\_\db7b4da\dbus-1.12.12\dbus\dbus-message.c line 2754.
&gt; This is normally a bug in some application using the D-Bus library.

From the 2nd line, it was trying to start the &apos;org.kde.kdeconnect&apos; service but failed with &quot;file not found&quot; message. The message was in the Chinese encoding and not valid UTF-8, which triggered the assertion in the 3rd line and crashed the daemon.

Suggested fix: comment out the `Exec=` line in bin/data/dbus-1/services/org.kde.kdeconnect.service. This avoids the error and allows kdeconnectd to run.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906312</commentid>
    <comment_count>1</comment_count>
    <who name="">dianlujitao</who>
    <bug_when>2020-01-29 11:49:28 +0000</bug_when>
    <thetext>Changing to `Exec=kdeconnectd` fixes the problem as well.

The absolute path is generated at build time https://github.com/KDE/kdeconnect-kde/blob/master/daemon/org.kde.kdeconnect.service.in#L3 and won&apos;t work on MS Windows because the build and install directory are usually different on Win.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906317</commentid>
    <comment_count>2</comment_count>
    <who name="jingyu9575">qw2g64</who>
    <bug_when>2020-01-29 12:27:03 +0000</bug_when>
    <thetext>(In reply to dianlujitao from comment #1)
&gt; Changing to `Exec=kdeconnectd` fixes the problem as well.

Yes, I&apos;m also using this value now. I remember when I simply commented it out there will be a &quot;cannot find file&quot; error after running a long time. With `Exec=kdeconnectd` I have not seen this error yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973418</commentid>
    <comment_count>3</comment_count>
    <who name="brute4s99">piyushaggarwal002</who>
    <bug_when>2020-11-09 20:18:11 +0000</bug_when>
    <thetext>Hi! Can you please try out the latest build from https://binary-factory.kde.org/job/kdeconnect-kde_Nightly_win64/ and let us know how it went? The dbus-daemon crash has been fixed. Since I could not reproduce the `Exec=kdeconnectd` issue on my system anymore, I am not sure if it has been automatically fixed or not. Please try it out and let me know if you find it again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973421</commentid>
    <comment_count>4</comment_count>
    <who name="brute4s99">piyushaggarwal002</who>
    <bug_when>2020-11-09 20:25:15 +0000</bug_when>
    <thetext>update: I just tried again. Looks like the Exec=kdeconnectd.exe issue is still around. I&apos;ll let you all know when there is progress on the status of this bug!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973813</commentid>
    <comment_count>5</comment_count>
    <who name="brute4s99">piyushaggarwal002</who>
    <bug_when>2020-11-10 23:16:05 +0000</bug_when>
    <thetext>Hi everyone, I have incorporated the suggested &quot;Exec=kdeconnectd&quot; fix into the code now. It works as expected. Expect no &quot;Failed to spawn child&quot; errors following build #577 at https://binary-factory.kde.org/job/kdeconnect-kde_Nightly_win64/ 🎉</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975042</commentid>
    <comment_count>6</comment_count>
    <who name="">dianlujitao</who>
    <bug_when>2020-11-13 18:08:28 +0000</bug_when>
    <thetext>Can confirm that the issue is fixed with the latest build</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>