instructure/canvas-lms · error · PlagiarismSubscriptionError
Live events subscriptions service is not configured
Error message
Live events subscriptions service is not configured
What it means
create_subscription first checks Services::LiveEventsSubscriptionService.available?. If the LiveEvents subscriptions service is not configured (missing URL or credentials in dynamic settings), the helper short-circuits and raises PlagiarismSubscriptionError with 'Live events subscriptions service is not configured' instead of attempting the HTTP call.
Solutions
- Add the live events subscription service config (URL, app_key, app_secret) to config/dynamic_settings.yml under the correct environment prefix.
- Restart/reload after changing dynamic settings so the service picks up configuration.
- If plagiarism subscriptions are not needed, guard the caller so create_subscription is only invoked when the service is available.
Example fix
// before (config/dynamic_settings.yml)
config:
# no live events entry
// after
config:
live_events_subscription_service:
url: 'https://subscriptions.example.com'
app_key: 'key'
app_secret: 'secret' Defensive patterns
Strategy: validation
Validate before calling
unless Services::LiveEventsSubscriptionService.available? skip_plagiarism_subscription 'service not configured' end
Type guard
null
Try / catch
begin helper.create_subscription(tp, pf) rescue Lti::PlagiarismSubscriptionsHelper::PlagiarismSubscriptionError => e Rails.logger.warn(e.message) # includes 'not configured' case end
Prevention
- Add live_events_subscription_service settings to config/dynamic_settings.yml for each environment.
- Gate plagiarism subscription code paths behind a service-availability check.
- Validate dynamic settings on boot/deploy.
When it happens
Trigger: Any call to Lti::PlagiarismSubscriptionsHelper#create_subscription in an environment where the LiveEvents subscription service settings (subscription service URL / key/secret in config/dynamic_settings.yml) are absent.
Common situations: Local development or self-hosted installs without the LiveEvents service configured; production environments where the subscriptions service block was omitted or keys were rotated out of dynamic settings; mispinned environment prefix in dynamic_settings.yml.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- #
- A partner ID is required to use Academic Benchmarks
- A partner key is required to use Academic Benchmarks
- an object with an interface for loading settings must be…
- an object with an interface for loading settings must be…
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/cfb3c58bd3338999.
Report an issue: GitHub.
Appendix: source
Thrown at lib/lti/plagiarism_subscriptions_helper.rb:53
@tool_proxy = tool_proxy
@product_family = tool_proxy.product_family
end
def create_subscription
Rails.logger.info { "in: PlagiarismSubscriptionsHelper::create_subscription, tool_proxy_id: #{tool_proxy.id}" }
if Services::LiveEventsSubscriptionService.disabled?
Rails.logger.info { "Live Event Subscription Service disabled. No subscription created." }
return
end
if Services::LiveEventsSubscriptionService.available?
subscription = plagiarism_subscription(tool_proxy, product_family)
result = Services::LiveEventsSubscriptionService.create_tool_proxy_subscription(tool_proxy, subscription)
raise PlagiarismSubscriptionError, error_message unless result.ok?
result.parsed_response["Id"]
else
raise PlagiarismSubscriptionError, I18n.t("Live events subscriptions service is not configured")
end
end
def plagiarism_subscription(tool_proxy, _product_family)
{
SystemEventTypes: EVENT_TYPES,
UserEventTypes: EVENT_TYPES,
ContextType: "root_account",
ContextId: tool_proxy.context.root_account.uuid,
Format: format,
TransportType: transport_type,
TransportMetadata: transport_metadata,
AssociatedIntegrationId: tool_proxy.guid
}.with_indifferent_access
end
def destroy_subscription(subscription_id)
Rails.logger.info { "in: PlagiarismSubscriptionsHelper::destroy_subscription, subscription_id: #{subscription_id}" }View on GitHub (pinned to 1c9f0bb801)