Open rl15 opened 3 years ago
Exception email, with sensitive data anonymised: An URI::InvalidURIError occurred in location_reports#create:
bad URI(is not URI?): "http://labwhere_host/api/locations/AAA DDD EEE FFF"
lib/lab_where_client.rb:26:in `get'
Request:
HTTP Method: POST
IP address : xxx
Parameters : {"utf8"=>"✓", "location_report"=>{"name"=>"report_name", "location_barcode"=>"AAA DDD EEE FFF", "report_type"=>"type_labwhere"}, "commit"=>"Create report from labwhere", "controller"=>"location_reports", "action"=>"create"}
Timestamp : 2020-10-28 10:33:37 +0000
Server : prod-host-server
Process: 25961
Session:
session id: "2d372ca9d34beb86a8c724ba3a97e634"
data: {"session_id"=>"2d372ca9d34beb86a8c724ba3a97e634", "user"=>1009}
Environment:
CONTENT_LENGTH : 219
CONTENT_TYPE : application/x-www-form-urlencoded
GATEWAY_INTERFACE : CGI/1.2
HTTP_ACCEPT : text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_ENCODING : gzip, deflate
HTTP_ACCEPT_LANGUAGE : en-US,en;q=0.5
HTTP_CONNECTION : close
HTTP_COOKIE : _ga=GA1.3.991229387.1579096283; ajs_user_id=%222786462f3efdc789870b7e1b35479233006137ab%22; ajs_anonymous_id=%22a7d04ed3-80ad-4e5e-8a89-97c9a2610601%22; _sequencescape_session=cWNJdG1Yb2tUWGZUUTRRMC8wUkxGUUw3bHE2eGFOcDZzNXBSOFN2UlIrc3B0VnF1VGZzR0FsclRoakljNTNSR2hoT0ZWSjh6blVIQnliU3ZkREdxR1E9PS0tWUFCNVBSSTZlc2ZuN1ZhR0pJdEJjZz09--456cd4839fbb758b875c7725a9da45687cd3ef1c
HTTP_HOST : sequencescape_host_name
HTTP_ORIGIN : http://sequencescape_host_name
HTTP_REFERER : http://sequencescape_host_name/location_reports
HTTP_UPGRADE_INSECURE_REQUESTS : 1
HTTP_USER_AGENT : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0
HTTP_VERSION : HTTP/1.0
HTTP_X_FORWARDED_FOR : ,xxx
ORIGINAL_FULLPATH : /location_reports
ORIGINAL_SCRIPT_NAME :
PATH_INFO : /location_reports
QUERY_STRING :
REMOTE_ADDR : xxx
REQUEST_METHOD : POST
REQUEST_PATH : /location_reports
REQUEST_URI : /location_reports
ROUTES_46948902983420_SCRIPT_NAME :
SCRIPT_NAME :
SERVER_NAME : sequencescape_host_name
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : puma 4.3.5 Mysterious Traveller
action_controller.instance : #
action_dispatch.authenticated_encrypted_cookie_salt : authenticated encrypted cookie
action_dispatch.backtrace_cleaner : #
action_dispatch.content_security_policy : #
action_dispatch.content_security_policy_nonce_generator: #<Proc:0x000055664cc7bbb0@/var/www/sequencescape/releases/20201026231646/config/initializers/content_security_policy.rb:33 (lambda)>
action_dispatch.content_security_policy_report_only : true
action_dispatch.cookies : #
action_dispatch.cookies_digest :
action_dispatch.cookies_rotations : #
action_dispatch.cookies_serializer : hybrid
action_dispatch.encrypted_cookie_cipher :
action_dispatch.encrypted_cookie_salt : encrypted cookie
action_dispatch.encrypted_signed_cookie_salt : signed encrypted cookie
action_dispatch.http_auth_salt : http authentication
action_dispatch.key_generator : #
action_dispatch.logger : #
action_dispatch.parameter_filter : [:password, :password, :credential_1, :uploaded_data, :password]
action_dispatch.redirect_filter : []
action_dispatch.remote_ip : xxx
action_dispatch.request.content_type : application/x-www-form-urlencoded
action_dispatch.request.formats : [#<Mime::Type:0x000055664a3e9bc0 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=3650515312319772383>]
action_dispatch.request.parameters : {"utf8"=>"✓", "location_report"=>{"name"=>"report_name", "location_barcode"=>"AAA DDD EEE FFF", "report_type"=>"type_labwhere"}, "commit"=>"Create report from labwhere", "controller"=>"location_reports", "action"=>"create"}
action_dispatch.request.path_parameters : {:controller=>"location_reports", :action=>"create"}
action_dispatch.request.query_parameters : {}
action_dispatch.request.request_parameters : {"utf8"=>"✓", "location_report"=>{"name"=>"report_name", "location_barcode"=>"AAA DDD EEE FFF", "report_type"=>"type_labwhere"}, "commit"=>"Create report from labwhere"}
action_dispatch.request.unsigned_session_cookie : {"session_id"=>"2d372ca9d34beb86a8c724ba3a97e634", "user"=>1009}
action_dispatch.request_id : d07131e3-5567-46c9-a29f-cc1990980eac
action_dispatch.routes : #
action_dispatch.secret_key_base : Really?! we should definately NOT email out that!
action_dispatch.secret_token :
action_dispatch.show_detailed_exceptions : false
action_dispatch.show_exceptions : true
action_dispatch.signed_cookie_digest :
action_dispatch.signed_cookie_salt : signed cookie
action_dispatch.use_authenticated_cookie_encryption : false
puma.config : #
puma.request_body_wait : 0
puma.socket : #
rack.after_reply : []
rack.cors : #
rack.errors : #
rack.hijack : #
rack.hijack? : true
rack.input : #
rack.multiprocess : false
rack.multithread : true
rack.request.cookie_hash : ...
rack.request.cookie_string : ...
rack.request.form_hash : {"utf8"=>"✓", "location_report"=>{"name"=>"report_name", "location_barcode"=>"AAA DDD EEE FFF", "report_type"=>"type_labwhere"}, "commit"=>"Create report from labwhere"}
rack.request.form_input : #
rack.request.form_vars : [FILTERED]
rack.request.query_hash : {}
rack.request.query_string :
rack.run_once : false
rack.session : #
rack.session.options : #
rack.tempfiles : []
rack.url_scheme : http
rack.version : [1, 3]
Backtrace:
lib/lab_where_client.rb:26:in `get'
lib/lab_where_client.rb:165:in `find_by_barcode'
app/models/location_report/location_report_form.rb:121:in `find_labwhere_location'
app/models/location_report/location_report_form.rb:71:in `check_labwhere_location_exists'
app/models/location_report/location_report_form.rb:51:in `save'
app/controllers/location_reports_controller.rb:37:in `block in create'
app/controllers/location_reports_controller.rb:36:in `create'
Investigation so far:
@rl15 I couldn't access the Slack conversation from 28th Oct you mention in the issue description, because it's too far in the past. Is it possible you selected the wrong Study for the plate barcodes? Can you reproduce the issue now? Thanks!
Putting 'on hold' for now as couldn't reproduce - see previous comment.
Contacted James M & Danni on 2nd. James M wrote (Wednesday, 2 December 2020 at 09:20)
I tried using this again on 18/11 and I still had missing data so I reverted to the labwhere tableau report.
Figured out why this was not working for James M. This is how he was using it:
I was looking to get the locations to inform the team of where the plates are for destruction. As it turns out they don’t need the locations of all the individual plates just the box locations so I don’t think I will need to use this again for this purpose but it is good to check anyway I guess.
For a list of 1000 barcodes he sent me the report only returned 215. This turned out to be because the plates were not in Sequencescape. As this is a Sequencescape page, it will only retrieve the LabWhere location for a plate if it is also in Sequencescape. Response from James confirms this makes sense:
Ah that seems so simple yet never even crossed my mind. The majority of them would probably not be in sequencescape as I was trying to find samples for destruction from the reefers – many of which would not have been processed or uploaded via sentinel.
This would also explain why this page seemed to work fine once before when I was making a list of purely “cherrypicks done” boxes, as all those plates would have been uploaded. It seems so obvious now you mention it but just going by the crawler day in day out my brain was making the assumption that all the data would be there.
Describe the bug GPL-723 | BUG: Plate Location Reports in Sequancescape failing with 'Failed to create report: That selection returns no plates, no report generated.'
RT Ticket Number N/a
To Reproduce Steps to reproduce the behaviour:
Expected behaviour What was expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context See slack channel conversation in heron-ss on 28th October