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

Error after logging in #51

Closed
ramnathv opened this issue Aug 5, 2013 · 35 comments
Closed

Error after logging in #51

ramnathv opened this issue Aug 5, 2013 · 35 comments
Labels

Comments

@ramnathv
Copy link

ramnathv commented Aug 5, 2013

I get the following message after I try to log in

Error in content(result)$access_token : 
  $ operator is invalid for atomic vectors

Any thoughts on what might be causing this?

@gordonwoodhull
Copy link
Contributor

I got that when I was using the wrong httr version. Don't use the one from github (0.2.99 that we used to require ;), use the vanilla 0.2 from install.packages.

You can check versions with sessionInfo().

On Aug 5, 2013, at 2:36 PM, Ramnath Vaidyanathan notifications@github.com wrote:

I get the following message after I try to log in

Error in content(result)$access_token :
$ operator is invalid for atomic vectors
Any thoughts on what might be causing this?


Reply to this email directly or view it on GitHub.

@ramnathv
Copy link
Author

ramnathv commented Aug 5, 2013

I did that and now I get a different error

Error in run(url, query, body, headers) : 
  could not find function "rgithub.context.from.token"

@s-u
Copy link
Collaborator

s-u commented Aug 5, 2013

make sure you have the github package installed. The best way to get started is

rcloud.support:::check.installation()

@ramnathv
Copy link
Author

ramnathv commented Aug 5, 2013

I checked and it reports TRUE

rcloud.support:::check.installation()
[1] TRUE

I started by running the script as instructed. I get the login screen for github and I even get the github interface for approval. But the final stage leads to the error.

$ scripts/fresh_start.sh

@cscheid
Copy link

cscheid commented Aug 6, 2013

Strange, that is a function from https://github.com/cscheid/rgithub/blob/master/R/github.R. Do you have the latest rgithub?

> require(devtools)
> install_github("rgithub", "cscheid")

Specifically, this function seems to be there since March 12:

cscheid/rgithub@061550b#R/github.R

@ramnathv
Copy link
Author

ramnathv commented Aug 6, 2013

Thanks. That resolved part of the issue, and now I get to the notebook screen. But now, I get a message that there was an unexpected response from RServe and the socket connection was closed. Inspecting my bash prompt, I see the following message there

Authentication attempt (login='undefined', pwd='undefined', pwdfile='(null)')
WS_send_resp: sending 4+ frame (ver 13), n = 18 / 18 (of total 16)

I checked my config in github_info.txt and it seems alright. I am unable to figure out what else could be going wrong.

@cscheid
Copy link

cscheid commented Aug 6, 2013

I believe I've been seeing something like this recently and haven't had
time to track it down. Have you tried accessing rcloud through /login.R
(which should redirect you to main.html) instead of /main.html directly?

cscheid pushed a commit that referenced this issue Aug 6, 2013
Updates to reflect comments on issue #51.
@ramnathv
Copy link
Author

ramnathv commented Aug 6, 2013

Nope. That doesn't work either. I will try afresh everything tomorrow and see if I am doing something silly that is causing these errors. Thanks for patiently helping me resolve this. RCloud looks like a great piece of tech, and I can't wait to get my hands on it :)

@cscheid
Copy link

cscheid commented Aug 6, 2013

No problem, sorry it's not working for you. Could you check that you have RServe's latest version as well? I'm sorry it's annoying that these packages are evolving concurrently, but that's where we are right now:

> install.packages("Rserve",,"http://rforge.net",type="source")

We've had reports that RStudio doesn't play nice with this style of invoking install.packages, so running it on the raw R shell is possibly a good idea too.

@amol-jore
Copy link
Contributor

Hi, I tried to install it again with latest version of rcloud.support and Rserve packages, but could not able to login into the rcloud. after successful login Rserv is automatically closing the socket.

@cscheid
Copy link

cscheid commented Aug 8, 2013

This is strange. I can reproduce it in a fresh Ubuntu 12.04 virtualbox but things work on my host Ubuntu 12.04, or on my Mac. I'm looking into it.

@cscheid
Copy link

cscheid commented Aug 8, 2013

@s-u, something's weird is happening with Rserve. Let's fix this when you're back from JSM.

Everyone else, here's a workaround, for now. Something's happening on the rserve-js <-> rserve handshake, and extra messages are being sent. In addition, when you run rserve in debug mode, a whole lot of printing is getting sent to stderr. Eventually things settle and you get something like this:

This is a bug!

The workaround is to edit ./scripts/fresh_start.sh and switch the last line, from ./conf/start -d to ./conf/start

You'll still get that single "Unexpected response" error message in RCloud for now, but the notebooks run. We'll get this fixed as soon as Simon is back. (my apologies!)

@ramnathv
Copy link
Author

ramnathv commented Aug 8, 2013

I modified the script, but am still getting the same error message, and the notebook does not start. I am on a Mac running OS 10.8.4

@cscheid
Copy link

cscheid commented Aug 8, 2013

More information:

At some point during the initialization process, RServe is sending an error message with status code 16. This is strange, because 16 is not one of the status codes in RServe. I've added a workaround to mask this error.

But! @gordonwoodhull and I just noticed another problem in public Github deployments (our primary deployment is on a Github Enterprise) that is likely causing your problem. We'll fix it asap.

@s-u
Copy link
Collaborator

s-u commented Aug 8, 2013

Thanks, this is now fixed in Rserve 1.7-2. The status code is spurious as it comes from an uninitialized variable.

@cscheid
Copy link

cscheid commented Aug 8, 2013

Great, I'll remove the workaround. @ramnathv, this probably still won't solve your problem. That's the enterprise github vs public github issue that we're figuring out right now.

@cscheid
Copy link

cscheid commented Aug 8, 2013

@ramnathv, commit d213e13 from @gordonwoodhull fixes the issue you might have been experiencing.

(We were getting the list of users via the github API. That's great for small deployments like our internal one, but it wouldn't work on public Github ;))

Can you try again?

@ramnathv
Copy link
Author

ramnathv commented Aug 9, 2013

I am still having trouble. Here is what I did to update my installed packages from the R GUI. I used install_github to install rcloud.support from the commit you referenced here, and then also Rserve, which updated to 1.7.2. But, I still get the same error. Am I doing something wrong?

install_github('rcloud', 'cscheid', ref = 'd213e13', subdir = 'rcloud.support')
install.packages("Rserve",,"http://rforge.net",type="source")

@cscheid
Copy link

cscheid commented Aug 9, 2013

If you're going to install the rcloud.support package separately, I don't know why you're not using

install.packages("rcloud.support",,c("http://RForge.net","http://R.research.att.com"), type="source")

Can you check one more thing for me? What's the output of

$ ls -lrt /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rserve/libs

And, when you start RCloud via ./scripts/fresh_start.sh, there is a line right after Starting Rserve: that on my machine looks like:

/Library/Frameworks/R.framework/Resoruces/bin/R CMD /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rserve/libs//Rserve.dbg '--RS-conf' ...

What does this line look like for you?

At this point, I don't know what else could be causing this. Have you tried following the installation instructions exactly? (That is: do a fresh checkout of the source, etc.) You mentioned "R GUI". Just to be 100% clear: you're not using RStudio, right? the syntax for install.packages in RStudio is different. In any case, if you want to try following what I do on my mac 100% precisely, I actually never use the R.app GUI. Try it from the shell, maybe?

@ramnathv
Copy link
Author

ramnathv commented Aug 9, 2013

I was referring to the R GUI that ships with R. I tried a fresh install of rcloud and followed the instructions in the README exactly as is. This time around I get a different error. I checked github_info.txt and it seems to be right.

screen shot 2013-08-09 at 11 25 58 am

I will do a thorough check of everything to make sure that I am doing everything right, before posting back again here. Thanks for your patience in helping me resolve this.

@cscheid
Copy link

cscheid commented Aug 9, 2013

No problem! In the course of tracking your problem down we uncovered about half a dozen RCloud bugs and inconsistencies. Thank you for your patience :) The good news is that if you got to this message, it means that your websocket and Rserve communication is working.

The Authentication failed message could be coming from a mismatch between the address you're using to access RCloud and the FQDN you set on conf/rcloud.conf. This causes the session cookie not to be found. Make sure they match exactly (some browsers will store localhost and 127.0.0.1 cookies separately from one another, I think!), and that they match the URL you used for your Github API registration.

@cscheid
Copy link

cscheid commented Aug 19, 2013

Any updates on this, @amol-jore and @ramnathv?

@ramnathv
Copy link
Author

I am still having the same issues. I am traveling, but plan to take a crack at setting up things from scratch to get to the bottom of it. @cscheid if you have any pointers on log files that may help me diagnose the issue better, please let me know. Once again, I appreciate your patience in helping me with this.

@amol-jore
Copy link
Contributor

Hi Carlos, I am able to login successfully to RCloud after downloading new versions of the code from git and following the steps start to end given on Github. - Thanks

@amol-jore
Copy link
Contributor

One proble I faced during the installation is that, [~/rcloud/data] folder was locked for some reason, so I copy-pasted the entire RCloud folder to other location and created the subfolders[histroy, userfiles & home] manually under "data", and it started working.

Also make sure that you have write access to [~/rcloud/conf] folder, as per my knowladge Oauth.RData file is getting written into this folder after successfull login.

@cscheid
Copy link

cscheid commented Aug 20, 2013

@amol-jore, great! Happy to hear it.

@ramnathv, don't worry about it. When you have time to try it from scratch, please let us know here.

@ramnathv
Copy link
Author

ramnathv commented Nov 1, 2013

I finally succeeded in getting the notebook to authenticate correctly.

But now, I am facing a different issue. When I type any R code in the notebook, nothing happens. I get a message that says computing.... but nothing happens. Am I doing something wrong?

@cscheid
Copy link

cscheid commented Nov 1, 2013

Do you get any message in the console where you started rcloud? If "computing..." is all you see what's happening is that the javascript side is not receiving any answer from the R side.

@ramnathv
Copy link
Author

ramnathv commented Nov 1, 2013

I am getting the following message in my console

Uncaught ReferenceError: rcloud is not defined 

@cscheid
Copy link

cscheid commented Nov 1, 2013

Are you running master or develop?

@ramnathv
Copy link
Author

ramnathv commented Nov 1, 2013

I followed the instructions in the README and freshly cloned the repo and installed the package from the ATT repo. How do I check what version I am running?

@cscheid
Copy link

cscheid commented Nov 1, 2013

$ git branch

But it seems that you're running the develop branch (that's the default branch). Investigating..

@ramnathv
Copy link
Author

ramnathv commented Nov 1, 2013

Yes, I am on the develop branch.

@cscheid
Copy link

cscheid commented Nov 1, 2013

I really don't know what you could be doing wrong, but I just installed a fresh copy of ubuntu 12.04 on a VM, followed the instructions on README.md, and things worked fine for me.

Can you give me as much detail as you can about your environment?

cscheid pushed a commit that referenced this issue Nov 3, 2013
Updates to reflect comments on issue #51.
@ramnathv
Copy link
Author

ramnathv commented Jan 8, 2014

I finally got everything to work!!! RCloud seriously rocks. I was able to quickly put together a tutorial notebook for my data viz package rCharts and it worked beautifully https://gist.github.com/ramnathv/e6644959fef062638cee. Hoping to push out a blog post soon!

@ramnathv ramnathv closed this as completed Jan 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants