PhantomJS来自gstatic的JavaScript错误,但不在浏览器中 [英] PhantomJS JavaScript errors from gstatic, but not in browser

查看:167
本文介绍了PhantomJS来自gstatic的JavaScript错误,但不在浏览器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我通过我们的PhantomJS测试套件运行了我们的网站,并且遇到了JavaScript无法手动在浏览器中重现的错误。这些错误可以在谷歌地图API中找到,而Capybara返回的文本如下所示:

  TypeError:无法删除属性。 
TypeError:无法删除属性。
at:215
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https: //maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https://maps.gstatic.com/maps-api-v3/ api / js / 19/3 / main.js:19
at:214
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main .js:20位于cf
,位于https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20,位于cf
位于https:/ /maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:21
at:176
at:31
https:// maps .gstatic.com / maps-api-v3 / api / js / 19/3 / main.js:26 in yf
at:178

这是与Capybara,PhantomJS或Google maps API有关的已知错误吗?问题可能是由PhantomJS中的用户代理字符串引起的?

使用最新的谷歌地图实验版(v3.19)解决方案

),其中包括一个解决方法,为我解决了这个问题: https://code.google.com/p/gmaps-api-issues/issues/detail?id=7475#c20



Google Maps v3.19的作为2015年2月17日的制作版发布。另外,PhantomJS版本2于2015年1月23日发布,其中包含一个更新的WebKit模块, code>无法删除属性问题。


I recently ran our website through our PhantomJS testing suite and ran into JavaScript errors that I can't reproduce in my browser manually. These errors are found in the Google maps api and the text returned by Capybara is as follows:

TypeError: Unable to delete property.
TypeError: Unable to delete property.
   at :215
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:19
   at :214
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:21
   at :176
   at :31
   at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:26 in Yf
   at :178

Is this a known bug with Capybara, PhantomJS, or the Google maps API? Could the problem be caused by the user agent string in PhantomJS?

解决方案

Using the latest experimental version of Google Maps (v3.19), which includes a workaround, fixed this problem for me: https://code.google.com/p/gmaps-api-issues/issues/detail?id=7475#c20

[Edit] Google Maps v3.19 was released as the production version on 17 Feb 2015. Also, PhantomJS version 2 was released on 23 Jan 2015 incorporating an updated WebKit module which doesn't exhibit the Unable to delete property problem.

这篇关于PhantomJS来自gstatic的JavaScript错误,但不在浏览器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆