1
votes

I am facing 429 error code in google map places api while every thing is ok.I have billing account and also restricted my api but i get the following error.

{ "error": { "code": 429, "message": "Resource has been exhausted (e.g. check quota).", "errors": [ "message": "Resource has been exhausted (e.g. check quota).", "domain": "global", "reason": "rateLimitExceeded", "debugInfo": "detail: "[ORIGINAL ERROR] generic::resource_exhausted: com.google.api.server.core.Fault: ImmutableErrorDefinition{base=TOO_MANY_REQUESTS, category=QUOTA_ERROR, cause=null, debugInfo=null, domain=usageLimits, extendedHelp=null, httpHeaders={}, httpStatus=tooManyRequests, internalReason=Reason{arguments={}, cause=null, code=canonicalResourceExhaustedFromBackend, createdByBackend=false, debugMessage=null, errorProtoCode=null, errorProtoDomain=null, filteredMessage=null, location=null, message=null, unnamedArguments=[]}, location=null, message=Rate Limit Exceeded, reason=rateLimitExceeded, rpcCode=429} Rate Limit Exceeded"\n" ], "status": "RESOURCE_EXHAUSTED" }


08-02 16:37:37.188 194-3188/? E/BufferQueueProducer: [InputMethod](this:0xb39bdc00,id:67,api:1,p:1263,c:194) allocateBuffers: slot 0 without buffer is not FREE
08-02 16:37:37.200 1580-3279/? E/art: invalid stream - problem with parameter iterator in /data/app/com.google.android.gms-2/base.apk:classes3.dex for method void com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(int)
08-02 16:37:37.285 1580-3279/? E/art: invalid stream - problem with parameter iterator in /data/app/com.google.android.gms-2/base.apk:classes3.dex for method void com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(int)
08-02 16:37:37.925 1580-3279/? E/Volley: [168] BasicNetwork.performRequest: Unexpected response code 429 for https://www.googleapis.com/placesandroid/v1/autocompleteWidget?key=AIzaSyCyJ-q6antCvgUAeYmix_5caFVwHhPiUgE
08-02 16:37:37.949 1580-6776/? E/ErrorUtils: Received generic error from server: 429
08-02 16:37:37.965 1580-6776/? E/AsyncOperation: serviceID=65, operation=AutocompleteWidgetQuota [CONTEXT service_id=259 ]
    OperationException[Status{statusCode=ERROR, resolution=null}]
        at bjnt.a(:com.google.android.gms@[email protected] (040306-320008519):2)
        at bjnf.a(:com.google.android.gms@[email protected] (040306-320008519):4)
        at zwo.run(:com.google.android.gms@[email protected] (040306-320008519):9)
        at bmvl.run(:com.google.android.gms@[email protected] (040306-320008519):2)
        at skp.b(:com.google.android.gms@[email protected] (040306-320008519):12)
        at skp.run(:com.google.android.gms@[email protected] (040306-320008519):7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at sql.run(:com.google.android.gms@[email protected] (040306-320008519):0)
        at java.lang.Thread.run(Thread.java:818)
08-02 16:37:37.996 6264-6264/? E/Places: Autocomplete widget closing due to ERROR

08-02 16:37:39.505 6264-6264/? E/Places: Unknown PlaceAutocompleteAdapter state change.
08-02 16:37:39.556 1580-8916/? E/AsyncOperation: serviceID=65, operation=AutocompleteWidgetQuota [CONTEXT service_id=259 ]

My build.gradle have the following dependencies

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc01"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:18.1.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.12.1'
    implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    implementation 'com.splunk.mint:mint:5.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.stripe:stripe-android:2.1.0'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.squareup.okio:okio:1.6.0'
    implementation group: 'com.pubnub', name: 'pubnub-gson', version: '4.6.4'
    implementation 'com.google.firebase:firebase-messaging:20.2.3'
    implementation('com.twitter.sdk.android:twitter:3.0.0@aar') {
        transitive = true;
    }
    apply plugin: 'com.google.gms.google-services'
    implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
    implementation 'com.firebase:firebase-client-android:2.4.1+'
    implementation 'com.google.firebase:firebase-database:19.3.1'
    implementation 'com.firebaseui:firebase-ui:0.4.4'
    implementation 'com.google.firebase:firebase-core:17.4.4'
    implementation 'com.google.firebase:firebase-auth:19.3.2'
    implementation 'com.google.firebase:firebase-messaging:20.2.3'```  

What may be a cause of error?
2

2 Answers

0
votes

The error clearly mentions "Quota Exhausted" so you might need to upgrade your plan in google console.

0
votes

Make sure you update your implementation as shown here: https://developers.google.com/places/android-sdk/client-migration

Places SDK for Android has been deprecated. Just enable Places API and follow the Migration Guide.