{"record":{"id":"9aaa35bdafc680e3","repo":"lingochamp/FileDownloader","slug":"this-value-is-used-in-the-filedownloader-process-9aaa35","errorCode":null,"errorMessage":"This value is used in the :filedownloader process, so set this value in your process is without effect. You can add 'process.non-separate=true' in 'filedownloader.properties' to share the main process to FileDownloadService. Or you can configure this value in 'filedownloader.properties' by 'download.min-progress-time'.","messagePattern":"This value is used in the :filedownloader process, so set this value in your process is without effect\\. You can add 'process\\.non-separate=true' in 'filedownloader\\.properties' to share the main process to FileDownloadService\\. Or you can configure this value in 'filedownloader\\.properties' by 'download\\.min-progress-time'\\.","errorType":"exception","errorClass":"IllegalAccessException","httpStatus":null,"severity":"error","filePath":"library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java","lineNumber":110,"sourceCode":"     * @param minProgressTime The minimum millisecond interval in per time to sync to the file and\n     *                        the database.\n     *                        <p>\n     *                        Used for adjudging whether is time to sync the downloaded so far bytes\n     *                        to database and make sure sync the downloaded buffer to local file.\n     *                        <p/>\n     *                        More smaller more frequently, then download more slowly, but will more\n     *                        safer in scene of the process is killed unexpected.\n     *                        <p/>\n     *                        Default 2000, which follow the value in\n     *                        com.android.providers.downloads.Constants.\n     * @see com.liulishuo.filedownloader.download.DownloadStatusCallback#onProgress(long)\n     * @see #setMinProgressStep(int)\n     */\n    public static void setMinProgressTime(long minProgressTime) throws IllegalAccessException {\n        if (isDownloaderProcess(FileDownloadHelper.getAppContext())) {\n            FileDownloadUtils.minProgressTime = minProgressTime;\n        } else {\n            throw new IllegalAccessException(\"This value is used in the :filedownloader process,\"\n                    + \" so set this value in your process is without effect. You can add \"\n                    + \"'process.non-separate=true' in 'filedownloader.properties' to share the main\"\n                    + \" process to FileDownloadService. Or you can configure this value in \"\n                    + \"'filedownloader.properties' by 'download.min-progress-time'.\");\n        }\n    }\n\n    public static int getMinProgressStep() {\n        return minProgressStep;\n    }\n\n    public static long getMinProgressTime() {\n        return minProgressTime;\n    }\n\n    /**\n     * Checks whether the filename looks legitimate.\n     */","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/lingochamp/FileDownloader/blob/6237a8cac174bcc916e4342b14ab1ab72a5768d4/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java#L92-L128","documentation":"FileDownloadUtils.setMinProgressTime is a static global setter for the minimum progress callback interval, but the actual value is only consumed inside the dedicated ':filedownloader' process. If called from the main (non-downloader) process, the assignment would silently have no effect, so the library throws IllegalAccessException to warn the developer. It also points to the two supported ways to configure this value.","triggerScenarios":"Calling FileDownloader.getImpl().setMinProgressTime(...) (which delegates to FileDownloadUtils.setMinProgressTime) while isDownloaderProcess(appContext) is false, i.e. from any process other than the :filedownloader service process.","commonSituations":"Apps that split downloads into a separate process via FileDownloadService (the default multi-process setup) but tune progress timing from Application.onCreate or an Activity in the main process; upgrading to a version that enforces process separation; copying tuning code between projects with different filedownloader.properties.","solutions":["Move the setMinProgressTime call so it runs inside the :filedownloader process (e.g. in the Application class of the downloader process).","Add 'process.non-separate=true' to filedownloader.properties so the main process IS the download process and the setter takes effect.","Remove the programmatic call and configure the value declaratively via 'download.min-progress-time' in filedownloader.properties.","If you only need the warning silenced, guard the call with FileDownloadUtils.isDownloaderProcess(context)."],"exampleFix":"// before (main process, throws)\nFileDownloader.getImpl().setMinProgressTime(2000);\n\n// after: filedownloader.properties\nprocess.non-separate=true\ndownload.min-progress-time=2000","handlingStrategy":"validation","validationCode":"if (!FileDownloadUtils.isDownloaderProcess(context)) {\n    // skip programmatic setter, rely on filedownloader.properties\n} else {\n    FileDownloader.getImpl().setMinProgressTime(2000);\n}","typeGuard":null,"tryCatchPattern":"try {\n    FileDownloader.getImpl().setMinProgressTime(2000);\n} catch (IllegalAccessException e) {\n    Log.w(\"FileDownloader\", \"min-progress-time must be set in :filedownloader process or properties\", e);\n}","preventionTips":["Configure download tuning exclusively through filedownloader.properties instead of static setters.","Remember which process each piece of init code runs in when using FileDownloadService.","Add a debug-time assert that setter calls happen only in the downloader process."],"tags":["android","multi-process","configuration","filedownloader"],"backgroundTag":"invalid-config-value","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"}