Build Error while using cordova-plugin-firebase

While building the ionic app the package name in google-service.json resets to com.github.cordova_plugin_firebase. Then I get the error

FAILURE: Build failed with an exception.
[cordova]
[cordova] * What went wrong:
[cordova] Execution failed for task ‘:app:processDebugGoogleServices’.
[cordova] > No matching client found for package name ‘com.xxx.yyy’