-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
Description
Describe the problem
When navigating to the Peers page (http://localhost:3000/peers
), an unhandled runtime error occurs due to an undefined permission
object being accessed inside the GroupsProvider.tsx
file.
To Reproduce
Steps to reproduce the behavior:
- Start the NetBird dashboard locally.
- Navigate to
http://localhost:3000/peers
. - Wait for the page to render.
- Observe the runtime error in the browser console or screen.
Expected behavior
The Peers page should load normally without throwing any runtime error. The permission.groups.read
access should be safely handled or verified for presence before use.
Are you using NetBird Cloud?
Self-hosted instance of NetBird
NetBird version
v2.14.0
(latest release)
Error Stack
Unhandled Runtime Error
TypeError: permission is undefined
Source: src/contexts/GroupsProvider.tsx (line 49)
47 | mutate,
48 | isLoading,
> 49 | } = useFetchApi<Group[]>("/groups", false, true, permission.groups.read);
| ^
50 | const groupRequest = useApiCall<Group>("/groups", true);
51 | const [dropdownOptions, setDropdownOptions] = useState<Group[]>([]);