Oauth / Uncaught TypeError: Cannot read property '1' of null

筅森魡賤 提交于 2019-12-11 15:06:52

问题


I'm trying out meteor oauth using google-accounts. I'm seeing it working fine locally, but when I deploy ( using this process http://bit.ly/1Hrp7Oz ), no oauth popup appears and I see this error: Uncaught TypeError: Cannot read property '1' of null which is occurring at line 3 packages/url/url_client.js

    URL._constructUrl = function (url, query, params) {  
    var query_match = /^(.*?)(\?.*)?$/.exec(url); 
    Url(query_match[1], query_match[2], query, params);                  // 3
  };     

Not sure how to debug this


回答1:


with jbangerter's help, found it... I had been doing some initial development on win7, and that included editing one of the upstart configuration files. That embedded a cr/lf at the end of the setting for ROOT_URL. Meteor was not stripping the cr/lf from the ROOT_URL variable so it wound up being used by the google oauth library.



来源:https://stackoverflow.com/questions/31351030/oauth-uncaught-typeerror-cannot-read-property-1-of-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!