Yii2 Google signin issue

i have created a webapp with google signin.But now i got an error

 $attributes = $client->getUserAttributes();

$attributes getting null