Kapple14 / KiddyGuide

Childish city guides
0 stars 1 forks source link

Location Undetectable #1

Open Kapple14 opened 3 months ago

Kapple14 commented 3 months ago

GitHub Issue: Inconsistent Location Detection in KiddyGuide App

Problem: Location detection sporadically fails or gets stuck during app use, possibly related to Google Geoservices integration.

Symptoms:

Steps to Reproduce:

  1. Open KiddyGuide App.
  2. Use location-based features.
  3. Observe failures/stuck behavior.

Expected Behavior:

Proposed Solution:

  1. Thorough testing of Google Geoservices integration.
  2. Implement robust error handling.
  3. Consider alternative location services providers.
algora-pbc[bot] commented 3 months ago

💎 $10 bounty created by Kapple140 🙋 If you start working on this, comment /attempt #1 along with your implementation plan 👉 To claim this bounty, submit a pull request that includes the text /claim #1 somewhere in its body 📝 Before proceeding, please make sure you can receive payouts in your country 💵 Payment arrives in your account 2-5 days after the bounty is rewarded 💯 You keep 100% of the bounty award 🙏 Thank you for contributing to Kapple14/KiddyGuide!

👉 Add a bountyShare on socials

Attempt Started (GMT+3) Solution
🟢 @abhishek818 #3
Bhavyajain21 commented 3 months ago

Can I be assigned? @Kapple14

Bhavyajain21 commented 3 months ago

/attempt #1

Kapple14 commented 3 months ago

implementation plan, please

abhishek818 commented 3 months ago

@Kapple14 Tried repro, fetching location gets stuck infinitely in Firefox, works fine in GChrome for me. (Both browsers asks for location permissions).

Tested with npm packages like current-location-geo, others and tried popular package like react-geolocated (didnt tested with it since it uses hook and older versions supporting need React<18.0), But to no avail.

Seems navigator apis have this known issue for a long time now, Refer this stackoverflow link and you will find several other threads related : link, Also tried every possible way defined in Firefox official support site

I feel we can go ahead with fixed values for request timeout and optional cache expiry (arguments of navigator.geolocation.getCurrentPosition , Refer link ), and throw a proper Error on timeout expiry, Pushing a PR for it, up to you.

Also, Found some active high rated repos still are using navigator apis similarly. (though i saw some github issues talking about this issue but no solution in the end conversation). Overall, its about issues with older versions of browsers/location permission settings.

abhishek818 commented 3 months ago

Also, If Firefox failure is the same issue for you as well, you can once try with enabling Geolocation API in about:config by toggling geo.enabled. (We might have diff Firefox versions, so the ask)

Kapple14 commented 3 months ago

I see! Thanks for pointing out the issue so precisely, but I can not see how we could fix that issue in the short term without access to a modern browser. Will close the issue as it does not seem solvable from my perspective.

abhishek818 commented 3 months ago

@Kapple14 Overall, its about issues with older versions of browsers/location permission settings. But shouldnt we atleast have some timeout (and then throw error suggesting users to update browser or enable location permissions) for location fetch call ?, Else it gets stuck infinitely sometimes. If agreed, you can review or suggest alternatives (if any) on my PR

Kapple14 commented 3 months ago

Will have a look at it, but the features do not seem for this repository. Thank you