Sending `Expo.locationChanged` with no listeners registered.

Please provide the following:

  1. SDK Version: 46
  2. Platforms(Android/iOS/web/all): Android/iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

When I debug the app via “Debug Remote JS” on Expo Go, I notice this warning Sending `Expo.locationChanged` with no listeners registered. And the Location.watchPositionAsync
from expo-location never fires the callback. I first check if location permission is granted before subscribing to watchPositionAsync. And made sure the app has permissions access. What is odd is that once I go back to non-debug mode, it works fine and the callback triggers as expected.

Any ideas what could be happening? Using "expo-location": "~14.3.0"

As far as I know your code runs in your Chrome browser when you’re debugging like this.

oh really? is that like some new thing related to SDK 45-46? because it was for sure working fine in older versions when I was able to run the app exactly the same in/out of debug…
If that’s the case, how would we even debug native stuff or run the actual app in debug to match production state?

No, it’s always been that way.

e.g. if I go to the “debugging” page of the archived React Native docs for RN version 0.30 (which is pretty ancient), it says:

Chrome Developer Tools

To debug the JavaScript code in Chrome, select “Debug JS Remotely” from the Developer Menu. This will open a new tab at http://localhost:8081/debugger-ui.

In fact if I check the page for RN version 0.5, which is the oldest version they still have docs available for, it says the same thing. Version 0.5 was released in June 2015.

interesting… I think I will have to dig more as to why when I upgraded to SDK 45 this seems to have started to happen. It also doesn’t ask Chrome for location permission… Was thinking maybe I can let it do that so that expo-location works as expected…
Still struggling to understand how to be able to fully develop and debug what you’d get on a real device… Like if my app is completely based on location permission and I can’t get that to work in debug, I can’t do much. Starting to think about mocking location but that can get tricky…

so I tried it on an Android device (also in Expo Go v2.25.X and also pointing to the same expo and Chrome instance) and works fine there both in debug and non-debug mode… So the issue is only on my iOS device in debug remote JS mode :eyes:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.