Giter Site home page Giter Site logo

Comments (15)

A6GibKm avatar A6GibKm commented on August 24, 2024

This is probably related to #37.

from libportal.

grulja avatar grulja commented on August 24, 2024

This should be fixed with #45. Isn't it?

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

I tried to do this near the date the issue was opened, so probably not.

from libportal.

grulja avatar grulja commented on August 24, 2024

I tried to do this near the date the issue was opened, so probably not.

And do you use latest git or official releases? Because there was a release made after you opened this bug.

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

Directly from master, unless GNOME Builder played some trick on me where it used an older cache (I don't think so, but it happens from time to time).

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

I can confirm that it is not working on master.

from libportal.

grulja avatar grulja commented on August 24, 2024

Works for me.

I just added a simple code to Qt demo/test we have as part of libportal and I can see it sends the location-updated signal. Can you check this on DBus? I don't know Python so maybe you have a bug in your code? Also try to restart xdg-desktop-portal and start it with G_MESSAGES_DEBUG=all to see if there are some errors.

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

I tried with vala, python, and the libportal demo (after adding a quick test), the code is executed and returns a success from the start_monitoring operation but the LocationUpdated signal is never emitted on the other side of the DBus.

At least on my laptop, it works fine on the first try of each login session, but then never again. On my desktop it fails randomly.

from libportal.

grulja avatar grulja commented on August 24, 2024

Try to use better precision and smaller threshold. Anyway, if you properly receive the signal at least one time, it means that the code in libportal does its job and there is no issue to be solved. If you have issues with location reporting then you probably need to report an issue in geoclue.

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

Just for the record, unlike the test code above, all the local test are run with time_threshold = 0.

On the other hand ASHPD, a rust library to talk with portals, works all the time without any difficulty, so it is neither an issue in xdg-desktop-portals nor in geoclue.

from libportal.

grulja avatar grulja commented on August 24, 2024

Can you share output from dbus-monitor --session for both tests (ASHPD and libportal)?

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

Here are the logs:

ashpd.txt
libportal.txt

The test was made with distance_threshold=60, time_threshold=0, and LocationAccuracy.CITY.

from libportal.

A6GibKm avatar A6GibKm commented on August 24, 2024

Note that setting distance_threshold = 0 on libportal side will also make it work "reliably", but setting it to 1 will make it fail reliably on my machine after the first use on a session.

  1. Reliable on my machine^tm.

from libportal.

grulja avatar grulja commented on August 24, 2024

I think I see the issue. I'll open a PR.

from libportal.

grulja avatar grulja commented on August 24, 2024

For the record, it's a bug in ASHPD and I already talked to @bilelmoussaoui about it. Basically there is a typo in both options so when you set distance_threshold and time_threshold it gets ignored and fallbacks to default (which is 0). Both options are actually distance-threshold and time-threshold → dash vs underscore.

Fixed with bilelmoussaoui/ashpd@817d1b7.

from libportal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.