Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'loginUrl' of undefined #179

Closed
corinnekunze opened this issue May 23, 2016 · 7 comments
Closed

TypeError: Cannot read property 'loginUrl' of undefined #179

corinnekunze opened this issue May 23, 2016 · 7 comments

Comments

@corinnekunze
Copy link

I saw this issue brought up before but 'sqs buster' does not seem to help resolve our issue.

Having this happen across multiple machines now for the same repo.

sqs server
> sqs-log Squarespace server running localhost:5050
> sqs-log Logging into Squarespace...
/usr/local/lib/node_modules/node-squarespace-server/node_modules/node-squarespace-middleware/squarespace-middleware.js:120
            url: json.targetWebsite.loginUrl,
                                   ^

TypeError: Cannot read property 'loginUrl' of undefined
    at Request._callback (/usr/local/lib/node_modules/node-squarespace-server/node_modules/node-squarespace-middleware/squarespace-middleware.js:120:36)
    at Request.self.callback (/usr/local/lib/node_modules/node-squarespace-server/node_modules/request/request.js:199:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/node-squarespace-server/node_modules/request/request.js:1036:10)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/node-squarespace-server/node_modules/request/request.js:963:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)

We recently changed our squarespace password and have updated the template.conf to reflect this new password.

We were all using a git config credential.helper cache so we wouldn't have to enter credentials on each pull push. I have unset them... still nothing and unable to run the server.

Any ideas?

@corinnekunze
Copy link
Author

corinnekunze commented May 24, 2016

I was able to get the server to run finally by uninstalling node-squarespace-server and reinstalling it on my machine with:

npm uninstall -g node-squarespace-server
and
npm install -g node-squarespace-server

For whatever reason it was rushing into logging in with an undefined login. Reinstalling allowed me to get the login screen back and enter my credentials.

@kitajchuk
Copy link
Owner

Glad it worked. It uses keychain to store login creds so possibly there are some weird hiccups that can happen there. Always using the latest version is recommended as well :)

@lulato
Copy link

lulato commented Jun 18, 2016

I'm stilling getting this error, @corinnekunze , could you go into a little bit more detail in how did you solve this problem?

@lulato
Copy link

lulato commented Jun 18, 2016

Right now, I am not able to get the prompt back after unstailling. Is there another way to clear the cache or my old credentials?

@corinnekunze
Copy link
Author

@lulato Not sure I can be much extra help other than running those npm uninstall commands as well as attempting to bust the cache with sqs buster.

One reason that this happened was because we changed our password for our account for squarespace. I was using the git config credential.helper cache to store the old password. I think I used a command like this to unset them (not sure that made a difference or not):
git config --global --unset credential.helper

I also tried updating to the most recent version of node-squrespace-server.

You'll also want to make sure that the password is accurate in your template.conf.

Hope that helps.

@kitajchuk
Copy link
Owner

@lulato @corinnekunze you can open keychain access and delete the entries for SquarespaceEmail and SquarespacePassword to clear that out :)

@lulato
Copy link

lulato commented Jun 20, 2016

That keychain access tip worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants