Unable t0 create a token using Notifications.getExponentPushTokenAsync()

I am trying out push notifications on my iphone (6s)
My code gets stuck at Notifications.getExponentPushTokenAsync
The status shows as granted but the rest of the code doesnot execute.
I do not see any errors either.

I am not sure how to resolve this issue.

Code Snippet:

export default async () => {
  let previousToken = await AsyncStorage.getItem('pushtoken');
  if (previousToken) {
  } else {
    let { status } = await Permissions.askAsync(Permissions.REMOTE_NOTIFICATIONS);
    console.log("status", status);
    if (status !== 'granted') {
    let token = await Notifications.getExponentPushTokenAsync().catch((error) => console.log(error));
    console.log("token", token)
    await axios.post(PUSH_ENDPOINT, { token: { token } });
    AsyncStorage.setItem('pushtoken', token);

Hi, what does Permissions.getAsync() return? This code will try to ask for permissions every time even if the user has already denied permissions.