affederaffe / Tmds.DBus.SourceGenerator

A roslyn source generator for creating proxies targeting the Tmds.DBus.Protocol API
MIT License
7 stars 5 forks source link

Connection closed by peer from a sourcgen'd Handler #19

Closed jmacato closed 3 months ago

jmacato commented 3 months ago

I'm trying on https://github.com/AvaloniaUI/Avalonia/tree/feature/linux-automation to see if the interfaces were working fine but upon using Accerciser or D-feet, getting the value of any properties from ("org.a11y.atspi.Accessible" "/org/a11y/atspi/accessible/root") had it close the connection entirely and show this on managed side:

System.IO.IOException: Connection closed by peer
   at Tmds.DBus.Protocol.MessageStream.ReadFromSocketIntoPipe() in /var/home/strix/RiderProjects/Avalonia/src/Linux/Tmds.DBus.Protocol/MessageStream.cs:line 62

and here on D-feet's side:

image

affederaffe commented 3 months ago

I think it uses its own Bus (which is why you get disconnected), which path you can get by calling org.a11y.Bus /org/a11y/bus/org.a11y.Bus/ GetAddress. See the documentation.

jmacato commented 3 months ago

Yup that i already handle, it's all on the bus that org.a11y.Bus specified

jmacato commented 3 months ago

Sorry folks, seems like i just needed to set the Parent prop of the Root Accessible from the value that Socket.Embed returned :) Wish it was obvious though haha :)