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

Authentication Failure in /list #22

Closed
regdoug opened this issue Nov 12, 2014 · 5 comments
Closed

Authentication Failure in /list #22

regdoug opened this issue Nov 12, 2014 · 5 comments
Labels

Comments

@regdoug
Copy link
Collaborator

regdoug commented Nov 12, 2014

I went to http://gimmeyourfilesplease.appspot.com/list?folderId=0BwyAT8fk8FVDTGpNbnlmQ09KTGM and was presented with an error 401 Invalid Credentials.

The line of code that caused the error is UserList.java:61

File file = service.files().get(folderId).execute();

The stack trace is below

edu.rit.honors.gyfp.util.Utils getClientSecrets: Setting the stuff.

edu.rit.honors.gyfp.util.Utils getClientSecrets: Setting the stuff.

Uncaught exception from servlet
com.google.api.client.googleapis.json.GoogleJsonResponseException: 401
{
  "code" : 401,
  "errors" : [ {
    "domain" : "global",
    "location" : "Authorization",
    "locationType" : "header",
    "message" : "Invalid Credentials",
    "reason" : "authError"
  } ],
  "message" : "Invalid Credentials"
}
    at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1049)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
    at edu.rit.honors.gyfp.servlets.UserList.doGet(UserList.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at com.google.api.client.extensions.servlet.auth.oauth2.AbstractAuthorizationCodeServlet.service(AbstractAuthorizationCodeServlet.java:130)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:60)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:254)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
    at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:480)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:438)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:445)
    at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:309)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:301)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:442)
    at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
    at java.lang.Thread.run(Thread.java:724)
@regdoug regdoug added the bug label Nov 12, 2014
@regdoug
Copy link
Collaborator Author

regdoug commented Nov 12, 2014

I think this must not be the extract-template branch because I uploaded that to version 3 and it gave a different error.

@grdaneault
Copy link
Collaborator

Sorry, I should have probably made this part more clear. Right now, the file id is hardcoded into the javascript for testing purposes. You need to modify gyfp.js and set it to a folder that you own (the api only allows you to list folders owned by you). To actually test the page you should hit https://gimmeyourfilesplease.appspot.com/list?template=table

@regdoug
Copy link
Collaborator Author

regdoug commented Nov 12, 2014

I'm still getting problems
https://gist.github.com/regdoug/2b4a71c05a2b52c93d05

On Tue, Nov 11, 2014 at 8:28 PM, Greg Daneault notifications@github.com
wrote:

Sorry, I should have probably made this part more clear. Right now, the
file id is hardcoded into the javascript for testing purposes. You need to
modify gyfp.js and set it to a folder that you own (the api only allows you
to list folders owned by you). To actually test the page you should hit
https://gimmeyourfilesplease.appspot.com/list?template=table


Reply to this email directly or view it on GitHub
#22 (comment)
.

@grdaneault
Copy link
Collaborator

Are you logged in to multiple accounts? Right now for testing I have to
open it in an incognito window so that my primary gmail account doesn't
interfere.

On Wed, Nov 12, 2014 at 1:06 PM, Reggie Pierce notifications@github.com
wrote:

I'm still getting problems
https://gist.github.com/regdoug/2b4a71c05a2b52c93d05

On Tue, Nov 11, 2014 at 8:28 PM, Greg Daneault notifications@github.com
wrote:

Sorry, I should have probably made this part more clear. Right now, the
file id is hardcoded into the javascript for testing purposes. You need
to
modify gyfp.js and set it to a folder that you own (the api only allows
you
to list folders owned by you). To actually test the page you should hit
https://gimmeyourfilesplease.appspot.com/list?template=table


Reply to this email directly or view it on GitHub
<
https://github.com/RITHonorsTechCommittee/gimme-your-files-please/issues/22#issuecomment-62655385>

.


Reply to this email directly or view it on GitHub
#22 (comment)
.

@grdaneault
Copy link
Collaborator

Fixed by #28

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

2 participants