google-api - 资源已使用链接预加载进行预加载,但在窗口加载事件后的几秒钟内未使用 - Wix 提取错误
问题描述
我正在使用 Google Analytics API 来查询用户帐户并查看这样做,我正在使用多个 WIX 提取函数(每个提取函数取决于前一个),这里是其中之一:
export function GetGAView (access_token, account_id,webPropertyId){
const url1 = "https://www.googleapis.com/analytics/v3/management/accounts/"
const url2 = account_id
const url3 = "/webproperties/"
const url4 = webPropertyId
const url5 = "/profiles?oauth_token="
const url6 = access_token
const url =url1.concat(url2,url3,url4,url5,url6).toString()
console.log(url, 'view url')
return fetch(url, {"method": "get"})
.then( (httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
} else {
return Promise.reject("Fetch did not succeed");
}
} )
.then(json => {//console.log(json)
return json
}
)
.catch(err => console.log(err));
}
11 个中的 4 个运行良好(由帐户 ID 和属性 ID 区分的相同函数)和 7 个函数返回控制台上显示的以下错误:
错误
/ga/oauth2callback?code=4%2XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&scope=email+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics&authuser=0&prompt=none:1 **The resource https://static.parastorage.com/services/editor-elements/dist/componentSdks.a8951fd0.bundle.min.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.**
这个错误是什么意思?如何解决这个问题?我发现相同错误的唯一地方是 https://www.wix.com/corvid/forum/community-discussion/parastorage-link-preload-failure
解决方案
推荐阅读
- vue.js - “Κ”后的 CSS 无效:预期为“{”,在代码框中为“”
- python-3.x - 如何修复python中的“查询”对象没有属性“to_dict”错误?
- html - 有没有办法使用同一套JSP中多个页面中要调用的元素
- android - 在 React Native for Appcenter 安装中,我在哪里可以找到 Android App 的这个 assets 文件夹
- python - 从大量 URL 中抓取信息
- sql - 基于多个外键的最佳匹配集合的连接表,每个外键都可以为空
- android - React Native - 如何在函数语句中设置状态?
- python - 这两种解决方案的时间复杂度是多少?
- go - Go vs Rust 垃圾收集器的性能和类型
- scala - 如何在两个objetcs scala列表中找到相同的值