{"record":{"id":"8469935649e71ecf","repo":"lingochamp/FileDownloader","slug":"can-t-recognize-the-intent-with-action-s-on-the","errorCode":null,"errorMessage":"can't recognize the intent with action %s, on the current version we only support action [%s]","messagePattern":"can't recognize the intent with action (.+?), on the current version we only support action \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadBroadcastHandler.java","lineNumber":41,"sourceCode":"import com.liulishuo.filedownloader.util.FileDownloadHelper;\nimport com.liulishuo.filedownloader.util.FileDownloadUtils;\n\n/**\n * The handler broadcast from filedownloader.\n */\npublic class FileDownloadBroadcastHandler {\n    public static final String ACTION_COMPLETED = \"filedownloader.intent.action.completed\";\n    public static final String KEY_MODEL = \"model\";\n\n    /**\n     * Parse the {@code intent} from the filedownloader broadcast.\n     *\n     * @param intent the intent from the broadcast.\n     * @return the file download model.\n     */\n    public static FileDownloadModel parseIntent(Intent intent) {\n        if (!ACTION_COMPLETED.equals(intent.getAction())) {\n            throw new IllegalArgumentException(FileDownloadUtils.\n                    formatString(\"can't recognize the intent with action %s, on the current\"\n                            + \" version we only support action [%s]\",\n                            intent.getAction(), ACTION_COMPLETED));\n        }\n\n        return intent.getParcelableExtra(KEY_MODEL);\n    }\n\n    public static void sendCompletedBroadcast(FileDownloadModel model) {\n        if (model == null) throw new IllegalArgumentException();\n        if (model.getStatus() != FileDownloadStatus.completed) throw new IllegalStateException();\n\n        final Intent intent = new Intent(ACTION_COMPLETED);\n        intent.putExtra(KEY_MODEL, model);\n\n        FileDownloadHelper.getAppContext().sendBroadcast(intent);\n    }\n}","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/lingochamp/FileDownloader/blob/6237a8cac174bcc916e4342b14ab1ab72a5768d4/library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadBroadcastHandler.java#L23-L59","documentation":"Raised by FileDownloadBroadcastHandler.parseIntent when a received broadcast intent's action is not ACTION_COMPLETED (\"filedownloader.intent.action.completed\"), the only action this version emits/understands. The %s placeholders print the unrecognized action and the list of supported actions; the faulty input is the intent action of a broadcast that was not sent by FileDownloader (or a stale/custom action).","triggerScenarios":"Thrown at library/src/main/java/com/liulishuo/filedownloader/services/FileDownloadBroadcastHandler.java:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register your BroadcastReceiver with an IntentFilter on FileDownloadBroadcastHandler.ACTION_COMPLETED only","Check intent.getAction() equals ACTION_COMPLETED before passing the intent to parseIntent","Do not route broadcasts from other components or custom actions into parseIntent"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6237a8cac174bcc916e4342b14ab1ab72a5768d4","analyzedAt":"2026-09-08T23:50:48.168Z","contentChangedAt":"2026-09-08T23:50:48.168Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}