Why search box value for Geolocation is different from Inspector?

Hi every one,
Would someone please help me with this issue that drives me nut.

I am struggling to get users location using IP Geo and Ipipph. I am saving user’s current location on page load. I also use a search box to display user’s current location.

For some reasons, search box displays a location in USA. But the location is correct in Debugger.


Please note, I get correct Geolocation when I am using a text box instead of search box.
And I see this in debugger:


Looks like ipiphy pulls out the server IP (= Bubble’s IP), not user’s.
Double check that you have installed the proper ipiphy plugin (the first one pulls out user’s IP, the second one - server’s)

Thanks @agilityinusa
I did double check that plugin. I have installed the right plugin to pull user’s current location.
Please see below:

That’s weird, indeed.
I would probably try Dynamic choices instead of Geographic places

Is the user logged in? That address is a generic address loaded. I get some generic address in NJ when I first load a page that is set up to capture user IP address and uses the iphy plugin for IP address and the Geo location plugin to get the address details.

It also matters how your database is set up. Your current location field on User; is it a geographic address? Have you confirmed in your database this change is occurring and the field is being saved properly as a complete geographic address?

From you screen shot it looks like you are saving a text field with a value of the City and it might not be a geographic address.

How do you have the dynamic expression set up for making the changes? Is that using the users IP address? You should expand the screen shot of the workflow that is using the plugins to show your complete set up.

Hi @boston85719
Yes, user is logged in and database “Current Location” is set up as geographic address. this field gets populated in database with this address >>> Newmarket, NH 03857, USA".

Here is my workflow
1- page is loaded and current user is logged in
2- make a change to current user

also, if I look by “Country” instead of “City” it returns >>>> California, USA.
I am not sure, is there a default value somewhere in Bubble or Google API key that causes this?

Show the full dynamic expression…to use that plugin correctly you need to feed it an IP address and I don’t see any IP address being fed to it with this dynamic expression…click on it to show the entire dynamic expression.

My first reaction is that on page load, the users IP address has not been obtained yet from the iphy plugin, and the users IP address is not being fed to the IP Info - Get Geo plugin

Thanks for looking at this.

Try setting the current location with a workflow trigger that is when page is loaded entire is yes…I have a feeling the current setup for page is loaded is not giving it enough time to capture the current users ip address.

Thanks for your advise,
I did that already, it gives me wrong address, a place somewhere in USA. :weary:

Are you using a VPN?

No, I am not using VPN.

If you want to make it so I can view and edit your app, feel free to send me the link to the editor in a PM and I’ll take a look at what is wrong.

Very kind of you. But I never done this before. How do i do that?

In your editor go to settings and at the top choose the general tab…then just below that there is a section “Application Rights” with a dropdown on the far right with three choices. You would choose anyone can view and edit…then just go to the page in your editor with the problem, copy the URL and send me a PM with the link.

To send a PM just click on my profile image then press the blue message button.

Sorry for delay, got busy at work. I have send you a PM message.

I think I found the issue, somehow is related to my ISP/ Internet provider. I am using a third party internet provider and every time I am on Wi-Fi or connected to home internet the geo-location gives me a place in USA. I need to give them a call and find out why?

So, I used my cell phone to check the location and boom! the right geo-location was pop up.

Many thanks to @boston85719 @agilityinusa :pray:

1 Like