Awesomium无法加载具有ionic2应用程序的站点

时间:2017-02-15 06:15:37

标签: angularjs ionic-framework awesomium

我用

构建了一个空白ionic2标签应用程序
ionic start --v2 ionic2.blank tabs
ionic serve --nobrowser

将www文件夹复制到http://mumti.org/ionic2.blank/ 在Windows 7 Chrome浏览器版本56.x中加载正常

但是,当我尝试将相同的URL加载到Awesomium Web控件v1.7.5.1中时,我在捕获控制台中看到以下异常,并且浏览器控件保持空白。

EXCEPTION: Error in ./TabsPage class TabsPage - inline template:0:0 caused by: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
ORIGINAL EXCEPTION: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
ORIGINAL STACKTRACE:
TypeError: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
    at Platform.raf (http://mumti.org/ionic2.blank/build/main.js:1953:58)
    at MDTransition.play (http://mumti.org/ionic2.blank/build/main.js:6335:18)
    at Nav._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28497:28)
    at MDTransition._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28419:19)
    at MDTransition.start (http://mumti.org/ionic2.blank/build/main.js:13133:33)
    at MDTransition._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28421:35)
    at MDTransition.start (http://mumti.org/ionic2.blank/build/main.js:13133:33)
    at Tab._transition (http://mumti.org/ionic2.blank/build/main.js:28436:24)
    at Tab._postViewInit (http://mumti.org/ionic2.blank/build/main.js:28298:18)
    at Tab._viewTest (http://mumti.org/ionic2.blank/build/main.js:28385:25)
ERROR CONTEXT:
[object Object]
EXCEPTION: Error in ./TabsPage class TabsPage - inline template:0:0 caused by: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
ORIGINAL EXCEPTION: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
ORIGINAL STACKTRACE:
TypeError: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
    at Platform.raf (http://mumti.org/ionic2.blank/build/main.js:1953:58)
    at MDTransition.play (http://mumti.org/ionic2.blank/build/main.js:6335:18)
    at Nav._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28497:28)
    at MDTransition._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28419:19)
    at MDTransition.start (http://mumti.org/ionic2.blank/build/main.js:13133:33)
    at MDTransition._trnsStart (http://mumti.org/ionic2.blank/build/main.js:28421:35)
    at MDTransition.start (http://mumti.org/ionic2.blank/build/main.js:13133:33)
    at Tab._transition (http://mumti.org/ionic2.blank/build/main.js:28436:24)
    at Tab._postViewInit (http://mumti.org/ionic2.blank/build/main.js:28298:18)
    at Tab._viewTest (http://mumti.org/ionic2.blank/build/main.js:28385:25)
ERROR CONTEXT:
[object Object]
Unhandled Promise rejection:
Error: Uncaught (in promise): Error: Error in ./TabsPage class TabsPage - inline template:0:0 caused by: Object [object DOMWindow] has no method '__zone_symbol__requestAnimationFrame'
TypeError: Object [object DOMWindow] has no method 

这是package.json

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "ionic-angular": "2.0.1",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.1.0",
    "typescript": "2.0.9"
  },
  "cordovaPlugins": [
    "ionic-plugin-keyboard",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen"
  ],
  "cordovaPlatforms": [],
  "description": "ionic2.blank: An Ionic project"
}

离子信息

$ ionic info

Your system information:

 ordova CLI: 6.4.0
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v7.2.0
Xcode version: Not installed

以下是代理字符串的内容,虽然我不了解它的内容我将Chrome和Awesomium与我当前的版本相匹配。

 WebCore.Started += WebCore_Started;
                WebCore.Initialize(new WebConfig()
                {
                    LogLevel = LogLevel.Normal,           

                    UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/535.19 Awesomium/1.7.5.1  GMod/13"
                });

Awesomium似乎也存在引导网站的问题。

当然http://google.com加载OK :)尽管光标的工作光束行为很奇怪,但始终不可见。

让我知道我可以为您提供的其他信息。 谢谢。

1 个答案:

答案 0 :(得分:0)

您是否尝试过安装Crosswalk插件?

ionic plugin add cordova-plugin-crosswalk-webview

Android 4.4之前的webview未通过Play商店进行更新,因此他们依赖于操作系统提供的浏览器功能。

参考:

https://forum.ionicframework.com/t/ionic2-application-can-not-work-well-in-android-4-2/80836/3