0
我的Chrome應用程序無法加載我的脫機緩存清單,而常規的Chrome選項卡沒有問題。出於某種原因,只有少數項目被下載後纔會停止。爲什麼Chrome應用程序無法加載我的脫機緩存清單
原因「資源下載失敗」未指定(讀取錯誤本身「未知」,見圖片)
是否有可能是內存限制到緩存的資源在Chrome應用程序?我已經用Google搜索了一下,但是發現關於Chrome應用程序的這些事情的概述很少。
如果您發現資源概述這些事情請鏈接到它。
我已經嘗試添加權限「unlimitedStorage」(https://developer.chrome.com/apps/declare_permissions),但它沒有區別。
quickstore1:1 Creating Application Cache with manifest http://localhost/cloudsign/web/manifests/24/quickstore1.appcache
quickstore1:1 Application Cache Checking event
quickstore1:1 Application Cache Downloading event
quickstore1:1 Application Cache Progress event (0 of 111) http://localhost/cloudsign/web/uploads/images/6/e69ac4205935739701697ea1c0bf1d7e62a1dc0c.png
quickstore1:1 Application Cache Progress event (1 of 111) http://localhost/cloudsign/web/uploads/images/6/88881d8511deeb99eb542c147d45ab507c445e5e.png
quickstore1:1 Application Cache Progress event (2 of 111) http://localhost/cloudsign/web/uploads/images/6/646215b8d3c74f84e19b4d3a853bf24ae75d94d8.png
quickstore1:1 Application Cache Progress event (3 of 111) http://localhost/cloudsign/web/uploads/images/6/51737da269f814a34d362dcf90ba5d5f07a23529.png
quickstore1:1 Application Cache Progress event (4 of 111) http://localhost/cloudsign/web/uploads/images/6/3cb1e1b34fcaa3176a7a2b40d3fa491d3460d356.png
quickstore1:1 Application Cache Progress event (5 of 111) http://localhost/cloudsign/web/uploads/images/24/eb451585360f63292c132013b2c1538a7874939e.png
quickstore1:1 Application Cache Progress event (6 of 111) http://localhost/cloudsign/web/uploads/images/24/eb0d6bb5f21f134a199c38e7ab15e129aef41e71.jpeg
quickstore1:1 Application Cache Progress event (7 of 111) http://localhost/cloudsign/web/uploads/images/24/dbeccb61e74710e35a05c9668e40a4b80a32e402.gif
quickstore1:1 Application Cache Progress event (8 of 111) http://localhost/cloudsign/web/fonts/Gruppo/Gruppo-Regular.ttf
quickstore1:1 Application Cache Progress event (9 of 111) http://localhost/cloudsign/web/uploads/images/24/dbd3746b08e371516b90b576103e5817e9d244f6.jpeg
quickstore1:1 Application Cache Progress event (10 of 111) http://localhost/cloudsign/web/uploads/images/6/979e98bd5f23f26f8d22d5d93840f81e3cbec62f.png
quickstore1:1 Application Cache Error event: Resource fetch failed (2) http://localhost/cloudsign/web/uploads/images/6/979e98bd5f23f26f8d22d5d93840f81e3cbec62f.png
appCacheHandlers.js:67 Cache error detected (MS)
cacheError @ appCacheHandlers.js:67
appCacheHandlers.js:68 error is:
appCacheHandlers.js:69 ApplicationCacheErrorEventbubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: ApplicationCache {status: 0, onchecking: null, onerror: null, onnoupdate: null, ondownloading: null, …}defaultPrevented: falseeventPhase: 0isTrusted: truemessage: "Resource fetch failed (2) http://localhost/cloudsign/web/uploads/images/6/979e98bd5f23f26f8d22d5d93840f81e3cbec62f.png"path: []length: 0__proto__: Array(0)concat: ƒ concat()constructor: ƒ Array()copyWithin: ƒ copyWithin()entries: ƒ entries()every: ƒ every()fill: ƒ fill()filter: ƒ filter()find: ƒ find()findIndex: ƒ findIndex()forEach: ƒ forEach()includes: ƒ includes()indexOf: ƒ indexOf()join: ƒ join()keys: ƒ keys()lastIndexOf: ƒ lastIndexOf()length: 0map: ƒ map()pop: ƒ pop()push: ƒ push()reduce: ƒ reduce()reduceRight: ƒ reduceRight()reverse: ƒ reverse()shift: ƒ shift()slice: ƒ slice()some: ƒ some()sort: ƒ sort()splice: ƒ splice()toLocaleString: ƒ toLocaleString()toString: ƒ toString()unshift: ƒ unshift()Symbol(Symbol.iterator): ƒ values()Symbol(Symbol.unscopables): {copyWithin: true, entries: true, fill: true, find: true, findIndex: true, …}__proto__: Objectreason: "unknown"returnValue: truesrcElement: ApplicationCache {status: 0, onchecking: null, onerror: null, onnoupdate: null, ondownloading: null, …}status: 0target: ApplicationCache {status: 0, onchecking: null, onerror: null, onnoupdate: null, ondownloading: null, …}timeStamp: 1501.0700000000002type: "error"url: ""__proto__: ApplicationCacheErrorEventbubbles: (...)cancelBubble: (...)cancelable: (...)composed: (...)currentTarget: (...)defaultPrevented: (...)eventPhase: (...)message: (...)path: (...)reason: (...)returnValue: (...)srcElement: (...)status: (...)target: (...)timeStamp: (...)type: (...)url: (...)constructor: ƒ ApplicationCacheErrorEvent()Symbol(Symbol.toStringTag): "ApplicationCacheErrorEvent"get message: ƒ()get reason: ƒ()get status: ƒ()get url: ƒ()__proto__: Event
所有的代碼是由Chrome應用程式製作所以它的標準generatd,但我把它給下面的情況下,我錯過了一些設置或這樣......
Chrome應用程式清單:
{
"name":"Cloudsign-dev",
"version":"0.1",
"manifest_version":2,
"minimum_chrome_version":"37.0.0.0",
"permissions":[
"webview",
"power",
"storage",
"unlimitedStorage",
"videoCapture",
"geolocation",
"pointerLock",
"system.display",
{
"fileSystem":[
"write",
"retainEntries",
"directory"
]
},
"accessibilityFeatures.read",
"accessibilityFeatures.modify"
],
"app":{
"background":{
"scripts":[
"js/foam.js",
"js/cab.js",
"config.js",
"background_main.js"
]
}
},
"kiosk_enabled":true,
"default_locale":"en",
"icons":{
"128":"img/128.png"
}
}
配置文件:
window.config = {
"model_": "AppConfig",
"id": 1,
"appName": "Cloudsign-dev",
"homepage": "http://localhost/cloudsign/web/app_dev.php/mp/quickstore1",
"enableNavBttns": false,
"enableHomeBttn": false,
"enableReloadBttn": false,
"enableLogoutBttn": false,
"kioskEnabled": true
};
012 (5 MB?)我不能以任何方式對一個Web應用改變個
background_main.js
/**
* Creates the window for the application.
*
* @see http://developer.chrome.com/trunk/apps/app.window.html
*/
var runApp = function() {
if (chrome.power) {
chrome.power.requestKeepAwake('display');
}
console.log(config);
chrome.app.window.create(
config ?
'exported_app_view.html' :
'designer_view.html',
{
id: 'KioskDesignerWindow',
width: 1100,
height: 720,
minWidth: 800,
minHeight: 600
},
function(win) {
if (!this.X) { return; }
var window = win.contentWindow;
window.onload = function() {
this.$addWindow(window);
var Y = this.X.subWindow(window, 'Kiosk Designer Window');
this.DOM.init(Y);
}.bind(this);
win.onClosed.addListener(function() {
this.$removeWindow(window);
}.bind(this));
}.bind(this));
}.bind(this);
/**
* Listens for the app launching then creates the window
*
* @see http://developer.chrome.com/trunk/apps/app.runtime.html
* @see http://developer.chrome.com/trunk/apps/app.window.html
*/
chrome.app.runtime.onLaunched.addListener(function() {
runApp();
});
/**
* Listens for the app restarting then re-creates the window.
*
* @see http://developer.chrome.com/trunk/apps/app.runtime.html
*/
chrome.app.runtime.onRestarted.addListener(function() {
runApp();
});
請問您可以如何顯示所有與Chrome應用程序有關的信息?如何加載此頁面? – Xan
出於興趣,您的Chrome應用程序的用途是什麼? – Xan
幻燈片(數字標牌)可用於Kiosk模式的Kiosk模式 –