AtlasOfLivingAustralia / appd-hub

Australian Plant Pest Database Hub
https://appd.ala.org.au
0 stars 2 forks source link

You are not authorised to access this site error message when using facets #34

Open ansell opened 6 years ago

ansell commented 6 years ago

A user reported the following unexpected and misleading/incorrect error message and I was able to replicate it myself.

Replicating it involves:

  1. Logging into APPD (if you don't have permission ask me or another admin)
  2. Searching with an empty search string (or a search term, which still seems to trigger the message)
  3. Click on "choose more" on any facet
  4. Select any item in the list using the checkbox and click "INCLUDE selected items"
  5. Observe the results page that looks correct other than the unexpected error message

The HTML code is:

<div id="errorAlert" class="alert alert-danger alert-dismissible" role="alert">
    <button type="button" class="close" onclick="$(this).parent().hide()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h4>You are not authorised to access this site.</h4>
    <p>Please contact <a href="mailto:support&#64;ala.org.au?subject=biocache error" style="text-decoration: underline;">support</a> if this error continues</p>
</div>
ansell commented 6 years ago

Another user has reported this issue in ticket 14450

ansell commented 6 years ago

Ticket 13604 also refers to this issue

ansell commented 6 years ago

The apache log file has recorded a strange error as part of the sequence above which may or may not be related:

XXX.YYY.ZZZ.AAA - - [29/May/2018:14:56:51 +1000] "GET /appd-hub/undefined/search/auto.json?callback=jQuery1111006052041046479106_1527569805766&q=test&limit=100&timestamp=1527569811165&_=1527569805767 HTTP/1.1" 404 1659 "https://appd.ala.org.au/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0"
ansell commented 6 years ago

Ticket 17427 also refers to this issue

ansell commented 6 years ago

The /undefined/ above may be related to https://github.com/AtlasOfLivingAustralia/biocache-hubs/issues/128

ansell commented 6 years ago

The BIE URL bieService.baseUrl that may be relevant defaults to the empty string in ansible templates, which can be interpreted as undefined depending on the codepaths involved. This makes it invisible as an error when deploying using Ansible:

https://github.com/AtlasOfLivingAustralia/ala-install/blame/be0b2fa77f71530a040d97af134900990b5e4c3a/ansible/roles/biocache-hub/templates/config/config.properties#L49

The time between that and the error being found early this year can be explained by the delay between APPD deployments

ansell commented 6 years ago

Ticket 22008 may refer to this issue

ansell commented 5 years ago

Ticket 30613 also refers to this issue.

ansell commented 5 years ago

Ticket 34934 in help desk also refers to this issue.

ansell commented 5 years ago

Another user reported this to me today