{"record":{"id":"829bd2334bb0b484","repo":"instructure/canvas-lms","slug":"unsupported-content-package","errorCode":null,"errorMessage":"Unsupported content package","messagePattern":"Unsupported content package","errorType":"exception","errorClass":"Canvas::Migration::UnsupportedPackage","httpStatus":null,"severity":"error","filePath":"lib/canvas/migration/package_identifier.rb","lineNumber":125,"sourceCode":"      doc = create_xml_doc(File.read(@archive.file))\n      if get_node_val(doc, \"metadata schema\") =~ COMMON_CARTRIDGE_REGEX &&\n         get_node_val(doc, \"metadata schemaversion\") == \"1.3.0\"\n        :common_cartridge_1_3\n      else\n        :unknown\n      end\n    end\n\n    def has_namespace(node, namespace)\n      node.namespaces.values.any? { |ns| ns =~ /#{namespace}/i }\n    end\n\n    def find_converter\n      if (plugin = Canvas::Plugin.all_for_tag(:export_system).find { |p| p.settings[:provides] && p.settings[:provides][@type] })\n        return plugin.settings[:provides][@type]\n      end\n\n      raise Canvas::Migration::UnsupportedPackage, I18n.t(:unsupported_package, \"Unsupported content package\")\n    end\n  end\nend\n","sourceCodeStart":107,"sourceCodeEnd":129,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/lib/canvas/migration/package_identifier.rb#L107-L129","documentation":"Canvas::Migration::PackageIdentifier#find_converter searches registered :export_system plugins for one whose settings[:provides] maps the identified package @type to a converter class. If no plugin provides a converter for that type, Canvas::Migration::UnsupportedPackage is raised.","triggerScenarios":"Identify_package returned a type (or :unknown) for which no enabled export_system plugin (e.g. canvas_cartridge, qti, moodle, blackboard) provides a converter — e.g. an unsupported LMS export or unknown file.","commonSituations":"Importing a package from an unsupported LMS, plugin disabled in account settings, new package format not recognized, generic .zip with no QTI/manifest structure.","solutions":["Enable the appropriate export_system plugin/plugin setting for the package type","Confirm the package is a supported format (Canvas export .imscc, QTI zip, etc.); re-export from the source LMS in a supported format","Check Canvas::Plugin.all_for_tag(:export_system) in console to see which types are provided","Upgrade Canvas if the source format is newer than the installed version supports"],"exampleFix":"// before (caller)\nklass = Canvas::Migration::PackageIdentifier.identify_package(path)\ncm.convert\n// after\nbegin\n  klass = Canvas::Migration::PackageIdentifier.identify_package(path)\nrescue Canvas::Migration::UnsupportedPackage\n  flash[:error] = I18n.t('This content package type is not supported')\nend","handlingStrategy":"try-catch","validationCode":"provided = Canvas::Plugin.all_for_tag(:export_system).flat_map { |p| (p.settings[:provides] || {}).keys }\nraise 'unsupported type' unless provided.include?(type)","typeGuard":"def supported?(type)\n  Canvas::Plugin.all_for_tag(:export_system).any? { |p| (p.settings[:provides] || {})[type] }\nend","tryCatchPattern":"begin\n  cm.convert\nrescue Canvas::Migration::UnsupportedPackage\n  render_unsupported_package_notice\nend","preventionTips":["Check plugin enabled state before accepting imports","Document supported package formats for users in the import UI","Keep export_system plugins updated with Canvas version"],"tags":["content-migration","unsupported-format","plugins"],"backgroundTag":"unsupported-operation","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}