谷歌选择器[gapi.load('picker')]加载抛出以前没有丢失的错误

时间:2017-06-17 18:26:34

标签: javascript google-api google-picker google-api-js-client

我们以与their documentation

上提供的示例类似的方式加载Google API和选择器

我们在html中包含脚本,如:

<script id="scripty" type="text/javascript" src="https://apis.google.com/js/api.js"></script>

然后在我们的js:

$('#scripty').load(function () {
  console.log('loaded');
  window.gapi && gapi.load('picker', { callback: () => {
    console.log('loaded picker');
    // excluded logic here.
  }});
});

我们已经将这段代码现场直播并且已经生产了6个多月,但直到最近(过去几天)它才开始在控制台上抛出以下错误:

api.js:11 Uncaught TypeError: _.Rp is not a function
    at https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.npUTEjvGP7I.O/m…=1/ed=1/am=AQ/rs=AGLTcCO-cN8Rg66fl-34jwiyTEAP1SGPAA/cb=gapi.loaded_1:8:501
    at https://apis.google.com/js/api.js:8:214
    at X (https://apis.google.com/js/api.js:11:220)
    at qa (https://apis.google.com/js/api.js:8:154)
    at W (https://apis.google.com/js/api.js:10:155)
    at b (https://apis.google.com/js/api.js:10:381)
    at Array.Y.r.(anonymous function) (https://apis.google.com/js/api.js:10:485)
    at Object.Y.x.(anonymous function) [as loaded_1] (https://apis.google.com/js/api.js:11:38)
    at https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.npUTEjvGP7I.O/m…d=1/ed=1/am=AQ/rs=AGLTcCO-cN8Rg66fl-34jwiyTEAP1SGPAA/cb=gapi.loaded_1:1:15

全局google(window.google)变量不再加载到位。我们检查了极其陈旧的代码,以确保它不会被我们改变,并且可以使用Google API确认更改的内容。有没有人遇到过这个问题?

(有关完整错误的详细信息,请参阅附件)enter image description here

0 个答案:

没有答案