问题
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