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

Missing avatar information causes internal server errors #575

Closed
denis-yuen opened this Issue Jan 18, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@denis-yuen
Member

denis-yuen commented Jan 18, 2017

Bug Report

Expected behaviour

Migration and web service start-up should result in usable webservice

Actual behaviour

On start-up, even though the enduser table is up-to-date

                                                      Table "public.enduser"
  Column   |          Type          |                      Modifiers                       | Storage  | Stats target | Description 
-----------+------------------------+------------------------------------------------------+----------+--------------+-------------
 id        | bigint                 | not null default nextval('enduser_id_seq'::regclass) | plain    |              | 
 isadmin   | boolean                |                                                      | plain    |              | 
 username  | character varying(255) | not null                                             | extended |              | 
 company   | character varying(255) |                                                      | extended |              | 
 bio       | character varying(255) |                                                      | extended |              | 
 location  | character varying(255) |                                                      | extended |              | 
 email     | character varying(255) |                                                      | extended |              | 
 avatarUrl | character varying(255) |                                                      | extended |              | 
Indexes:
    "enduser_pkey" PRIMARY KEY, btree (id)
    "uk_9vcoeu4nuu2ql7fh05mn20ydd" UNIQUE CONSTRAINT, btree (username)
Referenced by:
    TABLE "endusergroup" CONSTRAINT "fk_3jcx0mydiowhkbyi2j7jv3x4f" FOREIGN KEY (userid) REFERENCES enduser(id)
    TABLE "user_entry" CONSTRAINT "fk_userid" FOREIGN KEY (userid) REFERENCES enduser(id)
    TABLE "starred" CONSTRAINT "fk_userid" FOREIGN KEY (userid) REFERENCES enduser(id)
    TABLE "user_entry" CONSTRAINT "fkhdtovkjeuj2u4adc073nh02w" FOREIGN KEY (userid) REFERENCES enduser(id)
    TABLE "endusergroup" CONSTRAINT "fkrxn6hh2max4sk4ceehyv7mt2e" FOREIGN KEY (userid) REFERENCES enduser(id)
Has OIDs: no

It looks like null values for existing users cause stack traces and the landing page to fail loading

INFO  [2017-01-18 16:50:50,484] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@ba5d504{/,null,
AVAILABLE}
INFO  [2017-01-18 16:50:50,489] io.dropwizard.setup.AdminEnvironment: tasks = 

    POST    /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask)
    POST    /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask)

INFO  [2017-01-18 16:50:50,495] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@cccaab6{/,null,AVAILABLE}
INFO  [2017-01-18 16:50:50,522] org.eclipse.jetty.server.AbstractConnector: Started application@6109e544{SSL,[ssl, http/1.1]}{0.0.0.0:8443}
INFO  [2017-01-18 16:50:50,522] org.eclipse.jetty.server.AbstractConnector: Started admin@37df592b{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
INFO  [2017-01-18 16:50:50,523] org.eclipse.jetty.server.Server: Started @15290ms
206.108.127.16 - - [18/Jan/2017:16:50:50 +0000] "OPTIONS /containers/published HTTP/1.1" 200 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" 128
206.108.127.16 - - [18/Jan/2017:16:50:50 +0000] "OPTIONS /workflows/published HTTP/1.1" 200 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0" 127
ERROR [2017-01-18 16:50:51,195] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: fe775cc82cb4a1fb
! org.postgresql.util.PSQLException: ERROR: column user1_.avatarurl does not exist
!   Position: 107
! at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
! at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
! at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
! at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
! at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
! at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:305)
! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
! ... 87 common frames omitted
! Causing: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
! at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)

Steps to reproduce the behaviour

Take a 1.1.2 webservice. Login.
Take a 1.2-alpha.1 webservice
Migrate the database java -jar dockstore-webservice-1.2-alpha.1.jar db migrate ~/.dockstore/dockstore.yml

Start the website

Environment (Browser or OS and Dockstore version)

1.2-alpha.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment