When I run the command flutter run -d chrome --web-port 3000
There I always see an "XMLHttpRequest Error" in Chrome.
Error displayed in terminal
It says:
The OAuth token was not passed to gapi.client, since the gapi.client library is not loaded in your page.
I didn't find any answers here referring to this problem.
Has anybody encountered this problem and been able to solve it?
I attempted all of the methods outlined in another post, How to solve flutter web api cors error only with dart code, but none of them worked for me.
Apparently, the exception is misleading, and if you look at the network traffic, you should see a 403 response from GCP complaining about how the People API is not enabled on the project.
There's a link in the error message to do that, enable the API, wait five minute for the change to propagate, and you should be good.
Just go to Google cloud and inside API navigate to service details and enable People Api It's work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With