2

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.

sloppypasta
  • 1,068
  • 9
  • 15
uyasd
  • 21
  • 2

3 Answers3

1

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.

Zalán Meggyesi
  • 624
  • 5
  • 19
1

Just go to Google cloud and inside API navigate to service details and enable People Api It's work for me.

Aziz_1
  • 21
  • 3
0
Ali Bagheri
  • 3,068
  • 27
  • 28