griffithlab / civic-client

Web client for CIViC: Clinical Interpretations of Variants in Cancer
MIT License
50 stars 28 forks source link

[ERRORS and no Content] #336

Closed christopherwelsh closed 8 years ago

christopherwelsh commented 8 years ago

Hi, I have just installed civic-server and civic-client on my Centos 07 server.

I believe I have followed the install doco but will re-install on another host to be sure.

Here is what I get when I run "gulp serve:dist" I run the civic-server and civic-client as a non privileged user and try connect via lynx which is installed on the local host. I have the build from today. Can anyone suggest where to look to resolve this? ps. The pots seem to be listening but no content from lynx browser.

[pathos-test] ~/civic-client > gulp serve:dist [16:16:33] Using gulpfile ~/civic-client/gulpfile.js [16:16:33] Starting 'wiredep'... [16:16:33] Starting 'scripts'... [16:16:34] Starting 'partials'... [16:16:35] Starting 'images'... [16:16:35] Starting 'fonts'... [16:16:36] Starting 'misc'... [16:16:36] Finished 'wiredep' after 3.13 s [16:16:36] Starting 'styles'... [16:16:36] all files 1.15 kB [16:16:36] Finished 'misc' after 534 ms

src/components/filters.js line 90 col 9 Bad line breaking before '?'. line 92 col 9 Bad line breaking before '?'. line 94 col 9 Bad line breaking before '?'. line 96 col 9 Bad line breaking before '?'.

✖ 4 problems

src/app/pages/AboutCtrl.js line 12 col 11 Strings must use singlequote. line 13 col 14 Strings must use singlequote. line 13 col 36 Strings must use singlequote. line 14 col 13 Strings must use singlequote. line 15 col 21 Strings must use singlequote. line 16 col 17 Strings must use singlequote. line 16 col 27 Strings must use singlequote. line 17 col 13 Strings must use singlequote. line 17 col 24 Strings must use singlequote. line 18 col 19 Strings must use singlequote. line 18 col 116 Strings must use singlequote. line 19 col 16 Strings must use singlequote. line 20 col 15 Strings must use singlequote. line 20 col 113 Strings must use singlequote. line 21 col 14 Strings must use singlequote. line 21 col 111 Strings must use singlequote. line 22 col 14 Strings must use singlequote. line 22 col 111 Strings must use singlequote. line 23 col 14 Strings must use singlequote. line 23 col 111 Strings must use singlequote. line 25 col 26 Strings must use singlequote. line 26 col 14 Strings must use singlequote. line 27 col 21 Strings must use singlequote. line 27 col 31 Strings must use singlequote. line 28 col 25 Strings must use singlequote. line 29 col 39 Strings must use singlequote. line 30 col 23 Strings must use singlequote. line 34 col 13 Strings must use singlequote. line 35 col 16 Strings must use singlequote. line 35 col 38 Strings must use singlequote. line 36 col 15 Strings must use singlequote. line 37 col 23 Strings must use singlequote. line 38 col 19 Strings must use singlequote. line 38 col 29 Strings must use singlequote. line 39 col 15 Strings must use singlequote. line 39 col 26 Strings must use singlequote. line 40 col 21 Strings must use singlequote. line 40 col 118 Strings must use singlequote. line 41 col 18 Strings must use singlequote. line 42 col 17 Strings must use singlequote. line 42 col 115 Strings must use singlequote. line 43 col 16 Strings must use singlequote. line 43 col 113 Strings must use singlequote. line 44 col 16 Strings must use singlequote. line 44 col 113 Strings must use singlequote. line 45 col 16 Strings must use singlequote. line 45 col 113 Strings must use singlequote. line 47 col 28 Strings must use singlequote. line 48 col 16 Strings must use singlequote. line 49 col 23 Strings must use singlequote. line 49 col 23 Too many errors. (39% scanned).

✖ 51 problems

src/app/pages/CollaborateCtrl.js line 21 col 9 Missing semicolon.

✖ 1 problem

src/app/pages/HelpView.js line 75 col 9 Missing semicolon. line 8 col 43 '$urlRouterProvider' is defined but never used. line 91 col 9 Comma warnings can be turned off with 'laxcomma'. line 90 col 9 Bad line breaking before ','. line 207 col 9 Missing semicolon.

✖ 5 problems

src/components/directives/userCard.js line 26 col 10 '' is not defined. line 30 col 11 '' is not defined. line 33 col 11 '' is not defined. line 36 col 11 '' is not defined. line 40 col 23 '_' is not defined.

✖ 5 problems

src/components/services/CommentPreviewService.js line 23 col 21 Strings must use singlequote.

✖ 1 problem

src/components/services/ConfigService.js line 48 col 29 Strings must use singlequote. line 49 col 30 Strings must use singlequote. line 50 col 34 Strings must use singlequote. line 51 col 20 Strings must use singlequote. line 52 col 16 Strings must use singlequote.

✖ 5 problems

[16:16:39] all files 1.17 MB [16:16:39] Finished 'images' after 3.85 s

src/components/services/VariantGroupRevisionsService.js line 215 col 11 '_' is not defined.

✖ 1 problem

src/app/views/add/evidence/addEvidenceBasic.js line 182 col 33 Strings must use singlequote. line 183 col 34 Strings must use singlequote. line 184 col 38 Strings must use singlequote. line 185 col 24 Strings must use singlequote. line 186 col 20 Strings must use singlequote. line 48 col 14 'toUpperCase' is defined but never used.

✖ 6 problems

src/app/views/community/main/communityMain.js line 69 col 64 'stopWatching' is defined but never used. line 69 col 57 'scope' is defined but never used. line 69 col 47 'oldValue' is defined but never used. line 69 col 37 'newValue' is defined but never used. line 69 col 30 'field' is defined but never used. line 92 col 64 'stopWatching' is defined but never used. line 92 col 57 'scope' is defined but never used. line 92 col 47 'oldValue' is defined but never used. line 92 col 37 'newValue' is defined but never used. line 92 col 30 'field' is defined but never used. line 116 col 64 'stopWatching' is defined but never used. line 116 col 57 'scope' is defined but never used. line 116 col 47 'oldValue' is defined but never used. line 140 col 64 'stopWatching' is defined but never used. line 140 col 57 'scope' is defined but never used. line 140 col 47 'oldValue' is defined but never used. line 140 col 37 'newValue' is defined but never used. line 140 col 30 'field' is defined but never used.

✖ 18 problems

src/app/views/events/common/actionBlock.js line 20 col 34 '$scope' is defined but never used.

✖ 1 problem

src/app/views/events/common/entityCommentForm.js line 33 col 24 Strings must use singlequote. line 35 col 27 Strings must use singlequote. line 43 col 33 Strings must use singlequote. line 52 col 57 Strings must use singlequote. line 52 col 57 Missing semicolon. line 50 col 25 'error' is defined but never used. line 53 col 15 Missing semicolon. line 55 col 71 Strings must use singlequote. line 100 col 19 'error' is defined but never used. line 92 col 35 'resetModel' is defined but never used.

✖ 10 problems

[16:16:41] all files 14.08 MB [16:16:41] Finished 'fonts' after 5.3 s

src/app/views/events/common/entityTabs.js line 153 col 91 Missing semicolon.

✖ 1 problem

src/app/views/events/evidence/edit/evidenceEditBasic.js line 88 col 33 Strings must use singlequote. line 89 col 34 Strings must use singlequote. line 90 col 38 Strings must use singlequote. line 91 col 24 Strings must use singlequote. line 92 col 20 Strings must use singlequote.

✖ 5 problems

src/app/views/events/variants/summary/evidenceGrid.js line 336 col 43 'event' is defined but never used.

✖ 1 problem

src/app/views/events/variants/summary/variantSummary.js line 42 col 6 Missing semicolon.

✖ 1 problem

[16:16:43] all files 549.22 kB [16:16:43] Finished 'scripts' after 9.88 s [16:16:44] all files 249.31 kB [16:16:44] Finished 'styles' after 8.14 s [16:16:44] all files 230.22 kB [16:16:44] Finished 'partials' after 9.85 s [16:16:44] Starting 'html'... [16:16:48] gulp-inject 144 files into 404.html. [16:16:48] gulp-inject 144 files into index.html. [16:16:48] all files 4.4 kB [16:16:48] Finished 'html' after 4.45 s [16:16:48] Starting 'build'... [16:16:48] Finished 'build' after 5.7 μs [16:16:48] Starting 'serve:dist'... [16:16:48] Finished 'serve:dist' after 20 ms [16:16:48] Server started http://127.0.0.1:3001

malachig commented 8 years ago

I see the same thing with gulp serve:dist but gulp serve seems to work fine. Are you trying to simulate a production build? FYI, we do most of our local testing on Mac and deploy on Ubuntu.

I have such instances running right now on two machines, with all the latest code.

The docs assume you are trying to set up a local environment to experiment with changing the code. To deploy an instance that you can remotely login to may not be documented as completely. I suspect that @acoffman and @jmcmichael may have additional thoughts.

jmcmichael commented 8 years ago

CIViC is a single-page app that relies on Javascript to render the user interface. Lynx doesn't have Javascript support, so the CIViC app will not execute. What you're seeing when you load the page in Lynx is the base index.html page which bootstraps the application.

Are you able to load the site using a graphical browser that supports Javascript? We use Chrome, Firefox, and Safari with success, and it should work in Internet Explorer versions > 10 (maybe > 9).

There exist console browsers that support Javascript, such as ELinks but I doubt that the app will run very well in those either, as the application is quite complex, containing drop-down menus, popups, etc. that seem unlikely to be well-rendered in a text-only environment.

For reference, this is what I'm seeing when I hit http://127.0.0.1:3001/ using Lynx, are you seeing something similar?

screen shot 2016-02-11 at 11 03 21 am

jmcmichael commented 8 years ago

I've created an issue (#337) to show a notice on browsers that cannot run CIViC.

jmcmichael commented 8 years ago

(Also cleaned up all those jshint warnings)

christopherwelsh commented 8 years ago

Malachi,

Thanks for the response. At this stage we are evaluating, but yes a snapshot of a working prod version would be our aim for now. Good news is that I “think” we have the interface / landing page running on centOS. The client seems to call the database and the DB logs as I can see in the DB logs queries being executed. What I need next is some sample data to play with. So I guess this is where “gulp serve:dist” is required? Or do I need to import some data some other way? :-)

Ps. Is there a way around the authentication? What to I see and can I do when I authenticate?

Regards,

Christopher Welsh Systems Administrator, Research Support Services Cancer Research Division Peter MacCallum Cancer Centre http://www.petermac.orghttp://www.petermac.org/

Phone +61 3 9656 1512 Fax +61 3 9656 1411 E-mail Christopher.Welsh@petemac.org

[unknown.png]

[unknown_1.png]

From: Malachi Griffith notifications@github.com<mailto:notifications@github.com> Reply-To: genome/civic-client reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, 12 February 2016 at 3:23 AM To: genome/civic-client civic-client@noreply.github.com<mailto:civic-client@noreply.github.com> Cc: test Christopher.Welsh@petermac.org<mailto:Christopher.Welsh@petermac.org> Subject: Re: [civic-client] ERRORS and no Content

I see the same thing with gulp serve:dist but gulp serve seems to work fine. Are you trying to simulate a production build? FYI, we do most of our local testing on Mac and deploy on Ubuntu.

I have such instances running right now on two machines, with all the latest code.

The docs assume you are trying to set up a local environment to experiment with changing the code. To deploy an instance that you can remotely login to may not be documented as completely. I suspect that @acoffmanhttps://github.com/acoffman and @jmcmichaelhttps://github.com/jmcmichael may have additional thoughts.

— Reply to this email directly or view it on GitHubhttps://github.com/genome/civic-client/issues/336#issuecomment-182942041.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

christopherwelsh commented 8 years ago

Hi Joshua,

I have installed KDE and can now view the page. (127.0.0.1:3001) Seems to be no data to play with though.

Regards,

Christopher Welsh Systems Administrator, Research Support Services Cancer Research Division Peter MacCallum Cancer Centre http://www.petermac.orghttp://www.petermac.org/

Phone +61 3 9656 1512 Fax +61 3 9656 1411 E-mail Christopher.Welsh@petemac.org

[unknown.png]

[unknown_1.png]

From: Joshua McMichael notifications@github.com<mailto:notifications@github.com> Reply-To: genome/civic-client reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, 12 February 2016 at 3:54 AM To: genome/civic-client civic-client@noreply.github.com<mailto:civic-client@noreply.github.com> Cc: test Christopher.Welsh@petermac.org<mailto:Christopher.Welsh@petermac.org> Subject: Re: [civic-client] ERRORS and no Content

CIViC is a single-page app that relies on Javascript to render the user interface. Lynx doesn't have Javascript support, so the CIViC app will not execute. What you're seeing when you load the page in Lynx is the base index.html page which bootstraps the application.

Are you able to load the site using a graphical browser that supports Javascript? We use Chrome, Firefox, and Safari with success, and it should work in Internet Explorer versions >8.

There exist console browsers that support Javascript, such as ELinks but I doubt that the app will run very well in those either, as the application is quite complex, containing drop-down menus, popups, etc. that seem unlikely to be well-rendered in a text-only environment.

— Reply to this email directly or view it on GitHubhttps://github.com/genome/civic-client/issues/336#issuecomment-182956575.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

malachig commented 8 years ago

Hi Christopher,

Before going further, we would like to say that we would love to have people from Peter MacCallum Cancer Centre contribute to the canonical live site at www.civicdb.org. All content there is public and can be viewed without even logging in. An account is needed only to contribute/edit. That being said, we understand that there are use cases where creating a local/private installation is needed and that is fine too.

As for your specific questions. We provide a snapshot of some test data in a few forms, right in the repo to allow for testing. It is a future plan to create periodic dumps of our live data at civicdb.org that could be loaded into a test instance (but this will require first scrubbing authentication and personal user data since it would be shared publicly).

To populate the database with the test data you can follow the instructions near the bottom of the install instructions: https://github.com/genome/civic-server

There are two methods (from the civic-server repo): 1.) rake civic:import['import/GeneSummaries.txt','import/VariantSummaries.txt','import/ClinActionEvidence.txt','import/VariantGroupSummaries.txt']

2.) rake civic:load

Historically, the former has been a bit more reliable than the latter. To blow away the database and start from scratch you can do this:

rake db:drop
rake db:create
rake db:schema:load

You need your postgres service running for all of this to work.

On your second question, in order for the login system to work you will need authentication.

Otherwise it works just like the public site. You can see everything, you just can't edit until you log in. We use Oauth for authentication. For security reasons we obviously can not share our authentication keys with you. You will need to obtain a key/token for Google, GitHub, and OrcID. For local testing you will set these in some environment variables (e.g. in .bashrc) and then you can login and create accounts on your local test instance just as you would on the publicly deployed site.

christopherwelsh commented 8 years ago

Hi Malachi,

I believe contributing would be the intention as this is where the true value for everyone is. How updates/contributions are done at this stage, I am not sure. Perhaps via pushing updates via an API? I will speak with the team and find out. For now, we are in eval mode. For my part, I am happy to push any install doc I do your way.

As for populating the DB, I thought I did that, just to be sure I did the following from the civic-server folder..

The postgres server is running “rail s' is running "gulp serve" is running

rake db:drop rake db:create rake db:schema load

Should I be running these rake commands as the progres user?

Regards,

Christopher Welsh Systems Administrator, Research Support Services Cancer Research Division Peter MacCallum Cancer Centre http://www.petermac.orghttp://www.petermac.org/

Phone +61 3 9656 1512 Fax +61 3 9656 1411 E-mail Christopher.Welsh@petemac.org

[unknown.png]

[unknown_1.png]

From: Malachi Griffith notifications@github.com<mailto:notifications@github.com> Reply-To: genome/civic-client reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, 12 February 2016 at 12:14 PM To: genome/civic-client civic-client@noreply.github.com<mailto:civic-client@noreply.github.com> Cc: test Christopher.Welsh@petermac.org<mailto:Christopher.Welsh@petermac.org> Subject: Re: [civic-client] ERRORS and no Content

Hi Christopher,

Before going further, we would like to say that we would love to have people from Peter MacCallum Cancer Centre contribute to the canonical live site at www.civicdb.orghttp://www.civicdb.org. All content there is public and can be viewed without even logging in. An account is needed only to contribute/edit. That being said, we understand that there are use cases where creating a local/private installation is needed and that is fine too.

As for your specific questions. We provide a snapshot of some test data in a few forms, right in the repo to allow for testing. It is a future plan to create periodic dumps of our live data at civicdb.org that could be loaded into a test instance (but this will require first scrubbing authentication and personal user data since it would be shared publicly).

To populate the database with the test data you can follow the instructions near the bottom of the install instructions: https://github.com/genome/civic-server

There are two methods (from the civic-server repo): 1.) rake civic:import['import/GeneSummaries.txt','import/VariantSummaries.txt','import/ClinActionEvidence.txt','import/VariantGroupSummaries.txt']

2.) rake civic:load

Historically, the former has been a bit more reliable than the latter. To blow away the database and start from scratch you can do this:

rake db:drop rake db:create rake db:schema:load

You need your postgres service running for all of this to work.

On your second question, in order for the login system to work you will need authentication.

Otherwise it works just like the public site. You can see everything, you just can't edit until you log in. We use Oauth for authentication. For security reasons we obviously can not share our authentication keys with you. You will need to obtain a key/token for Google, GitHub, and OrcID. For local testing you will set these in some environment variables (e.g. in .bashrc) and then you can login and create accounts on your local test instance just as you would on the publicly deployed site.

— Reply to this email directly or view it on GitHubhttps://github.com/genome/civic-client/issues/336#issuecomment-183138976.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

malachig commented 8 years ago

We agree that contributing is where the true value for everyone is. :). To be clear, to contribute right now you don't need to do any of this... Simply go to www.civicdb.org, create an account, and start contributing.

Some have expressed an interest in having a mixed model where a local instance is used synchronized with the canonical public instance at www.civicdb.org but some additional private data (e.g. relating to individual patients, or results covered by an NDA, etc.) are kept only in the local instance. This is a really interesting idea but we haven't had time to pursue it seriously. Not sure how syncing/sharing data between multiple instances would work. For things like evidence items it might be tractable. For things like variant and gene summaries it might be harder to avoid merge conflicts. Right now we are focused on building the open/public content so this hasn't been a high development priority.

For now the local instance is really used to (A) help develop the code and (B) for demonstration purposes, where you can really kick the tires on how contributions work without polluting the public resource with example submissions, fake users, etc.

jmcmichael commented 8 years ago

Closing issue, as we've solved the original problem.

christopherwelsh commented 8 years ago

Hi Folks,

I have have had a chat with Ken Doig who had requested I install civic locally. The server is installed and returning results by listening on the servers hosts IP address at port 3000. Why install locally? I believe his requirement is that he would simply like to be able to login to a local running instance add and remove data and evaluate civic with some colleagues. Perhaps it is best if Ken discusses what he wants to do form this point of view rather than I.

Currently he is connecting to the civic-server directly rather than the civic-client. There was mention that this could be done without the need for the civic-client. Is there a specific need for ken to connect via the client?

The current issues we are having is authentication (Admin access) . We have tried github authentication (Ken has an account) but receive a 404 error. We use a firewall and perhaps that is where authentication is failing? Any pointers to Ken on how to work around this would be welcome. Anyway I will hand over to Ken for further discussion

Regards,

Christopher Welsh Systems Administrator, Research Support Services Cancer Research Division Peter MacCallum Cancer Centre http://www.petermac.orghttp://www.petermac.org/

Phone +61 3 9656 1512 Fax +61 3 9656 1411 E-mail Christopher.Welsh@petemac.org

[unknown.png]

[unknown_1.png]

From: Malachi Griffith notifications@github.com<mailto:notifications@github.com> Reply-To: genome/civic-client reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, 12 February 2016 at 3:23 AM To: genome/civic-client civic-client@noreply.github.com<mailto:civic-client@noreply.github.com> Cc: test Christopher.Welsh@petermac.org<mailto:Christopher.Welsh@petermac.org> Subject: Re: [civic-client] ERRORS and no Content

I see the same thing with gulp serve:dist but gulp serve seems to work fine. Are you trying to simulate a production build? FYI, we do most of our local testing on Mac and deploy on Ubuntu.

I have such instances running right now on two machines, with all the latest code.

The docs assume you are trying to set up a local environment to experiment with changing the code. To deploy an instance that you can remotely login to may not be documented as completely. I suspect that @acoffmanhttps://github.com/acoffman and @jmcmichaelhttps://github.com/jmcmichael may have additional thoughts.

— Reply to this email directly or view it on GitHubhttps://github.com/genome/civic-client/issues/336#issuecomment-182942041.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

acoffman commented 8 years ago

You are receiving a 404 when trying to log in with GitHub because you need to supply OAuth credentials to the server. This involves registering your copy of the application with GitHub (and Google and Orcid should you want to use those.) So that you can use their API. That can be done here: https://github.com/settings/applications/new and is documented here: https://developer.github.com/v3/oauth/#web-application-flow.

Registering your application with GitHub will provide you with a secret token and a key. These should be placed in the environment variables CIVIC_GITHUB_SECRET and CIVIC_GITHUB_KEY or in a secrets.yml config file. You can see this working here: https://github.com/genome/civic-server/blob/master/config/initializers/omniauth.rb. If you do opt to go with the secrets.yml file, make sure that you do not check it into the repo as that will allow anyone to use your GitHub credentials.