【问题标题】:Prerenderer IO: XMLHttpRequest cannot load http://::1:12301/dnode/info And NETWORK_ERR: XMLHttpRequest Exception 101:Prerenderer IO:XMLHttpRequest 无法加载 http://::1:12301/dnode/info 和 NETWORK_ERR:XMLHttpRequest 异常 101:
【发布时间】:2015-08-04 17:14:58
【问题描述】:

我已经在我的 Mac 机器(OS X Yosemite 10.10.3)上安装了Prerenderer IO。在安装结束后,我运行sudo npm install 并运行sudo node server.js 得到以下错误:

phantom stdout: XMLHttpRequest cannot load http://::1:12302/dnode/info. Cross origin requests are only supported for HTTP.

phantom stdout: XMLHttpRequest cannot load http://::1:12301/dnode/info. Cross origin requests are only supported for HTTP.

phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.

  .../node_modules/phantom/shim.js:1815
  .../node_modules/phantom/shim.js:1842

phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.

  .../node_modules/phantom/shim.js:1815
  .../node_modules/phantom/shim.js:1842

2015-08-04T13:45:47.307Z getting https://google.com
phantom stdout: XMLHttpRequest cannot load http://::1:12303/dnode/info. Cross origin requests are only supported for HTTP.
NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.

  .../node_modules/phantom/shim.js:1815
  .../node_modules/phantom/shim.js:1842

phantom stdout: XMLHttpRequest cannot load http://::1:12304/dnode/info. Cross origin requests are only supported for HTTP.

phantom stdout: NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.

  .../node_modules/phantom/shim.js:1815
  .../node_modules/phantom/shim.js:1842 

我尝试输入一个网址http://localhost:3000/https://google.com,但几分钟后就挂断了。

我已更改权限并尝试全局安装。两者都不起作用

【问题讨论】:

    标签: javascript node.js seo phantomjs


    【解决方案1】:

    我遇到了同样的问题,并在第 70 行更改了这个文件 lib/server.js,如下所示:

    var args = ["--load-images=false", "--ignore-ssl-errors=true", "--ssl-protocol=tlsv1"];

    到那个:

    var args = ["--load-images=false", "--ignore-ssl-errors=true", "--ssl-protocol=tlsv1", "--web-security=no"];

    现在您的 NETWORK_ERROR 应该消失了。

    查看stackgithub issue 了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-24
      • 1970-01-01
      相关资源
      最近更新 更多