Skip to content

How to trigger the system geolocation prompt in a MAS (Mac App Store) build on macOS? #45290

@mahnunchik

Description

@mahnunchik

Preflight Checklist

Electron Version

33.2.0

What operating system(s) are you using?

macOS

Operating System Version

15.2

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

Expected Behavior

navigator.geolocation.getCurrentPosition hangs indefinitely without returning either a success or an error.

I have already added com.apple.security.personal-information.location in the entitlements, and the system settings show that the application is suppert to access location services (off by default). However, when requesting the location, no system prompt appears to grant or toggle this permission.

A valid GOOGLE_API_KEY is included, and on all other platforms Electron’s geolocation works without issue.

A system prompt should appear asking the user to allow geolocation access, and getCurrentPosition should return position data (or an error if denied).

Actual Behavior

The system prompt never appears, and getCurrentPosition hangs indefinitely.

Testcase Gist URL

No response

Additional Information

  • The GOOGLE_API_KEY is correctly configured since geolocation works as expected on other platforms (Windows, Linux).
  • System preferences do list the app under Location Services, but no prompt is triggered when the app requests geolocation.

Any help or guidance on how to properly trigger the system geolocation prompt in a MAS build would be greatly appreciated

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions