Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's location as shown on map is incorrect #4881

Open
bengtan opened this issue Mar 6, 2020 · 4 comments
Open

User's location as shown on map is incorrect #4881

bengtan opened this issue Mar 6, 2020 · 4 comments

Comments

@bengtan
Copy link
Contributor

bengtan commented Mar 6, 2020

Reported at https://hippware.slack.com/archives/C2V6L53TQ/p1583441178063700 and spun out from #3802 (comment)

Staging Version: 4.40.2
User Scurry was sharing live location (When Nearby) with user Pixel. User Pixel was on the HS when scurry switched the setting from When Nearby to Always. The avatar Pixel was currently viewing changed to scurry's avatar and also noting that the card displayed scurry was in Mooreland. This did not correct itself during the user session and remains an issue after multiple kill/reloads. Also noting that I was seeing this across clients on 2 different devices/accounts. I'm not sure what remedied this but at some point after the bugsnag #4877 was generated everything was back to normal.

image

@bengtan
Copy link
Contributor Author

bengtan commented Mar 6, 2020

Ugh, it looks like scurry's phone uploaded a location data point which had the coordinates of the the place in Mooreland.

But it's not an RNBGL upload. It's an embedded location data point (ie. embedded within some other operation like subscribing to a bot or something). So I guess app got it's wires crossed and embedded the wrong data point somehow.

This is a preliminary finding. I'll continue to dig further.

@bengtan
Copy link
Contributor Author

bengtan commented Mar 6, 2020

Alright, found it.

  1. User scurry issued a friendShareUpdate operation (I guess by switching live location share between Always and Nearby?) to user pixel.
  2. The friendShareUpdate operation allows a location data point to be embedded. This data point refreshes, on the server side, the location of the issuer. In this case, the issuer is the location sharer. In this case, scurry.
  3. There is a bug, whereby, instead of embedding the location of the location sharer, the app is embedding the location of the location sharee/sharedWith/watcher (ie. pixel)

Specifically, in this code in Profile.ts:

        shareLocationUpdate: flow(function*(
          shareType?: FriendShareTypeEnum,
          shareConfig?: IFriendShareConfig
        ) {
          yield self.transport.friendShareUpdate(self.id, self.location, shareType, shareConfig)
          self.shareType = shareType
          self.shareConfig = shareConfig
        }),

self.location should be replaced by something like self.service.profile.location.

@bengtan
Copy link
Contributor Author

bengtan commented Mar 6, 2020

Notes to self:

  1. There is also an embedded location data point in updateBot

  2. If in hidden/invisible mode, ensure no location data points are embedded.

If not done as part of this ticket, should be it's own separate ticket.

@mstidham
Copy link

Verified on Staging Version: 4.41.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants