title: How to fix Expo push notifications error: "Couldn't get GCM token for device"?
body: <p>I created a new Expo project and I tried to get push notifications token but it fails. I got an error: "[Unhandled promise rejection: Error: Couldn't get GCM token for device]". How I can fix this? Thanks!
  My device: Samsung Galaxy A5 (2017), android 8.0.0</p>
  
  <p>I read about this and it should work with "expo start", but for me this don't work. "expo start" is default in package.json .</p>
  
  <p>package.json:</p>
  
  <pre><code>{
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
      "start": "expo start",
      "android": "expo start --android",
      "ios": "expo start --ios",
      "eject": "expo eject"
    },
    "dependencies": {
      "expo": "^31.0.2",
      "react": "16.5.0",
      "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz"
    },
    "devDependencies": {
      "babel-preset-expo": "^5.0.0"
    },
    "private": true
  }
  </code></pre>
  
  <p>App.js:</p>
  
  <pre><code>componentDidMount() {
      this.registerForPushNotifications();
  }
  
  registerForPushNotifications = async () =&gt; {
      const { status: existingStatus } = await Permissions.getAsync(
          Permissions.NOTIFICATIONS
      );
      let finalStatus = existingStatus;
      if (existingStatus !== 'granted'){
          const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
          finalStatus = status;
      }
      if (finalStatus !== 'granted') {return;}
      let token = await Notifications.getExpoPushTokenAsync();
      console.log("token: ",token);
  };
  </code></pre>