Error using Search Box with Geographic Address

I’m currently developing an app and need to implement a search box with geographic address functionality. Initially, I successfully integrated this feature into the admin panel by setting up the API key. However, when I attempted to use it in other parts of the app, I encountered issues.

Despite trying various approaches, such as copying the element and logging in with a different account, I consistently received the error message: “Geocoding Service: cannot connect to the service, please check the Geocode API key.” This error appears in the Inspect errors tab.

What perplexes me is that the search box works flawlessly in the admin panel, but fails elsewhere within the app. As you can see in the provided screenshots:

  1. The error message related to the API key:

  2. The search box functioning correctly:
    image

If anyone has insights into why this discrepancy exists, I would greatly appreciate your assistance. Thank you!

I don’t sure I understand your problem but the search box will work even if you don’t have API key, so you may didn’t set the key correctly.