The TKL Canvas VM is working great so far.  The one issue I have is not getting the document preview to work in Canvas via the canvadocs plugin by setting up the Box View API.  I can view jpgs fine which seems to be rendered w/o the Box View API, but pdfs and pptx files show the following error in Canvas.  I have my vm running currently with only an ip address and no domain yet.  I posted this issue over in the Canvas Github and not sure if folks in TKL could help.  Of note, I have tried the Bitnami Canvas VM and also buildtmy own, and all three show the same problem.  Is it my host/VM setup?  I would really appreciate getting this to work.

Thanks,

Long

 

HTTP Error 400: {"message": "Bad request", "type": "error", "details": [{"field": "document_id", "message": "The document cannot be retrieved. The GET operation on the URL returned an error."}]}

account: TurnKey Canvas
category: Canvadocs::Error
created at: 2016-01-30 14:58:27 -0500
user: Long Phi Le
request context id: 622c457b-dda6-4960-a8af-c483ddec47a4 
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch 
HTTP_HOST: 172.20.174.90 
HTTP_REFERER: http://172.20.174.90/courses/1/files/?preview=3 
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 
PATH_INFO: /api/v1/canvadoc_session 
QUERY_STRING: ?blob=%7B%22user_id%22:10000000000001,%22attachment_id%22:3,%22type%22:%22canvadoc%22%7D&hmac=7f96411be791a659f44373f96a62809ee5b36946 
REMOTE_ADDR: 172.20.174.86 
REQUEST_METHOD: GET 
REQUEST_URI: http://172.20.174.90/api/v1/canvadoc_session?blob=%7B%22user_id%22:10000...
SERVER_NAME: 172.20.174.90 
SERVER_PORT: 80 
SERVER_PROTOCOL: HTTP/1.1 
format: application/json 
hostname: canvas 
path_parameters: {:controller=>"canvadoc_sessions", :action=>"show", :format=>"json"} 
pid: 1232 
query_parameters: {"blob"=>"{\"user_id\":10000000000001,\"attachment_id\":3,\"type\":\"canvadoc\"}", "hmac"=>"7f96411be791a659f44373f96a62809ee5b36946"} 
request_parameters: {} 
response_code: 500 
type: 
        HTTP Error 400: {"message": "Bad request", "type": "error", "details": [{"field": "document_id", "message": "The document cannot be retrieved. The GET operation on the URL returned an error."}]}

        /var/www/canvas/lib/canvadocs.rb:123:in `api_call'
/var/www/canvas/lib/canvadocs.rb:79:in `session'
/var/www/canvas/app/models/canvadoc.rb:44:in `block in session_url'
/usr/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
/usr/lib/ruby/2.1.0/timeout.rb:35:in `block in catch'
/usr/lib/ruby/2.1.0/timeout.rb:35:in `catch'
/usr/lib/ruby/2.1.0/timeout.rb:35:in `catch'
/usr/lib/ruby/2.1.0/timeout.rb:106:in `timeout'
/var/www/canvas/lib/canvas.rb:207:in `short_circuit_timeout'
/var/www/canvas/lib/canvas.rb:186:in `timeout_protection'
/var/www/canvas/app/models/canvadoc.rb:43:in `session_url'
/var/www/canvas/app/controllers/canvadoc_sessions_controller.rb:34:in `show'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/abstract_controller/base.rb:167:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:592:in `block (2 levels) in _run__974470200720891977__process_action__2109219735135739156__callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11543'
/var/www/canvas/app/controllers/application_controller.rb:265:in `block in enable_request_cache'
/var/www/canvas/lib/temp_cache.rb:7:in `enable'
/var/www/canvas/app/controllers/application_controller.rb:264:in `enable_request_cache'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_11543'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:459:in `block in _run__974470200720891977__process_action__2109219735135739156__callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_11542'
/var/www/canvas/app/controllers/application_controller.rb:258:in `set_locale'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_11542'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:458:in `_run__974470200720891977__process_action__2109219735135739156__callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/abstract_controller/callbacks.rb:17:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `block in instrument'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/notifications.rb:123:in `instrument'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/abstract_controller/base.rb:121:in `process'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/abstract_controller/rendering.rb:45:in `process'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-mini-profiler-0.9.2/lib/mini_profiler/profiling_methods.rb:79:in `block in profile_method'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal.rb:203:in `dispatch'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_controller/metal.rb:246:in `block in action'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:73:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:36:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/routing/route_set.rb:608:in `call'
/var/www/canvas/gems/plugins/respondus_soap_endpoint/lib/respondus_soap_endpoint/middleware.rb:61:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/head.rb:14:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/var/www/canvas/lib/canvas/request_throttle.rb:60:in `block in call'
/var/www/canvas/lib/canvas/request_throttle.rb:258:in `reserve_capacity'
/var/www/canvas/lib/canvas/request_throttle.rb:55:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/flash.rb:242:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/encrypted_cookie_store-instructure-1.1.11/lib/encrypted_cookie_store.rb:47:in `call'
/var/www/canvas/app/middleware/sessions_timeout.rb:22:in `call'
/var/www/canvas/app/middleware/load_account.rb:12:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/query_cache.rb:64:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `_run__2145107495423686412__call__2832431429682319957__callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:405:in `__run_callback'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/callbacks.rb:81:in `run_callbacks'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.22/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/rack/logger.rb:32:in `call_app'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/rack/logger.rb:18:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/request_store-1.2.0/lib/request_store/middleware.rb:8:in `call'
/var/www/canvas/app/middleware/request_context_generator.rb:36:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/var/www/canvas/app/middleware/prevent_non_multipart_parse.rb:32:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/rack-mini-profiler-0.9.2/lib/mini_profiler/profiler.rb:193:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/engine.rb:484:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:231:in `call'
/var/www/canvas/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/lib/gems/2.1.0/gems/passenger-5.0.17/lib/phusion_passenger/rack/thread_handler_extension.rb:94:in `process_request'
/var/lib/gems/2.1.0/gems/passenger-5.0.17/lib/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
/var/lib/gems/2.1.0/gems/passenger-5.0.17/lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
/var/lib/gems/2.1.0/gems/passenger-5.0.17/lib/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
/var/lib/gems/2.1.0/gems/passenger-5.0.17/lib/phusion_passenger/utils.rb:112:in `block in create_thread_and_abort_on_exception'

Forum: 
Tags: 
Jeremy Davis's picture

However I'm not 100% sure whether it is an issue with a missing dependency, or whether it is actually a Canvas bug?

And the fact that all 3 of your test servers had the same issue doesn't actually help diagnose the problem I don't think. I find it highly unlikely that this would be caused by your VM environment.

Can you please post a link to the bug you posted on GitHub so I can watch it myself? Regardless it'd be great if you post back if/when you make any progress or get any good info. Thanks.

Add new comment