Fetch: Failed to download chunked type file!
The downloader seems like NOT supporting Transfer-Encoding: chunked. Downloaded some unrelated html instead of mp3 file.
Link: https://hindugodsongs.in/
final FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(this)
.setDownloadConcurrentLimit(3)
.enableAutoStart(false)
.setProgressReportingInterval(1100)
.setHttpDownloader(new HttpUrlConnectionDownloader(Downloader.FileDownloaderType.SEQUENTIAL))
.build();
Fetch.Impl.setDefaultInstanceConfiguration(fetchConfiguration);
Logcat:
D/LibGlobalFetchLib: Enqueued download DownloadInfo(id=-1786947277, namespace='LibGlobalFetchLib', url='https://hindugodsongs.in/get/download/shani-gayatri-mantra-[hindugodsongs.in].mp3', file='content://com.android.providers.downloads.documents/document/73', group=0, priority=HIGH, headers={Cookie=__cfduid=d22766a6f223a771943be99db82f7db1d1543158628, User-Agent=Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36}, downloaded=0, total=-1, status=QUEUED, error=NONE, networkType=ALL, created=1543163829063, tag=null, enqueueAction=UPDATE_ACCORDINGLY, identifier=0, downloadOnEnqueue=true, extras={"KEY_DOWNLOAD_SUPPORTS_RESUME":"false","KEY_DOWNLOAD_FILE_NAME":"shani-gayatri-mantra-[hindugodsongs.in].mp3 (1)","KEY_DOWNLOAD_USER_AGENT":"Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36","KEY_DOWNLOAD_SAVE_PATH":"content://com.android.providers.downloads.documents/document/73"}) D/LibGlobalFetchLib: PriorityIterator backoffTime reset to 500 milliseconds D/LibGlobalFetchLib: PriorityIterator started D/LibGlobalFetchLib: PriorityIterator backoffTime reset to 500 milliseconds D/LibGlobalFetchLib: Added DownloadInfo(id=-1786947277, namespace='LibGlobalFetchLib', url='https://hindugodsongs.in/get/download/shani-gayatri-mantra-[hindugodsongs.in].mp3', file='content://com.android.providers.downloads.documents/document/73', group=0, priority=HIGH, headers={Cookie=__cfduid=d22766a6f223a771943be99db82f7db1d1543158628, User-Agent=Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36}, downloaded=0, total=-1, status=QUEUED, error=NONE, networkType=ALL, created=1543163829063, tag=null, enqueueAction=UPDATE_ACCORDINGLY, identifier=0, downloadOnEnqueue=true, extras={"KEY_DOWNLOAD_SUPPORTS_RESUME":"false","KEY_DOWNLOAD_FILE_NAME":"shani-gayatri-mantra-[hindugodsongs.in].mp3 (1)","KEY_DOWNLOAD_USER_AGENT":"Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36","KEY_DOWNLOAD_SAVE_PATH":"content://com.android.providers.downloads.documents/document/73"}) D/LibGlobalFetchLib: Queued DownloadInfo(id=-1786947277, namespace='LibGlobalFetchLib', url='https://hindugodsongs.in/get/download/shani-gayatri-mantra-[hindugodsongs.in].mp3', file='content://com.android.providers.downloads.documents/document/73', group=0, priority=HIGH, headers={Cookie=__cfduid=d22766a6f223a771943be99db82f7db1d1543158628, User-Agent=Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36}, downloaded=0, total=-1, status=QUEUED, error=NONE, networkType=ALL, created=1543163829063, tag=null, enqueueAction=UPDATE_ACCORDINGLY, identifier=0, downloadOnEnqueue=true, extras={"KEY_DOWNLOAD_SUPPORTS_RESUME":"false","KEY_DOWNLOAD_FILE_NAME":"shani-gayatri-mantra-[hindugodsongs.in].mp3 (1)","KEY_DOWNLOAD_USER_AGENT":"Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36","KEY_DOWNLOAD_SAVE_PATH":"content://com.android.providers.downloads.documents/document/73"}) for download D/LibGlobalFetchLib: DownloadManager starting download DownloadInfo(id=-1786947277, namespace='LibGlobalFetchLib', url='https://hindugodsongs.in/get/download/shani-gayatri-mantra-[hindugodsongs.in].mp3', file='content://com.android.providers.downloads.documents/document/73', group=0, priority=HIGH, headers={Cookie=__cfduid=d22766a6f223a771943be99db82f7db1d1543158628, User-Agent=Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36}, downloaded=0, total=-1, status=QUEUED, error=NONE, networkType=ALL, created=1543163829063, tag=null, enqueueAction=UPDATE_ACCORDINGLY, identifier=0, downloadOnEnqueue=true, extras={"KEY_DOWNLOAD_SUPPORTS_RESUME":"false","KEY_DOWNLOAD_FILE_NAME":"shani-gayatri-mantra-[hindugodsongs.in].mp3 (1)","KEY_DOWNLOAD_USER_AGENT":"Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36","KEY_DOWNLOAD_SAVE_PATH":"content://com.android.providers.downloads.documents/document/73"}) D/LibGlobalFetchLib: FileDownloader starting Download DownloadInfo(id=-1786947277, namespace='LibGlobalFetchLib', url='https://hindugodsongs.in/get/download/shani-gayatri-mantra-[hindugodsongs.in].mp3', file='content://com.android.providers.downloads.documents/document/73', group=0, priority=HIGH, headers={Cookie=__cfduid=d22766a6f223a771943be99db82f7db1d1543158628, User-Agent=Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36}, downloaded=0, total=-1, status=QUEUED, error=NONE, networkType=ALL, created=1543163829063, tag=null, enqueueAction=UPDATE_ACCORDINGLY, identifier=0, downloadOnEnqueue=true, extras={"KEY_DOWNLOAD_SUPPORTS_RESUME":"false","KEY_DOWNLOAD_FILE_NAME":"shani-gayatri-mantra-[hindugodsongs.in].mp3 (1)","KEY_DOWNLOAD_USER_AGENT":"Mozilla/5.0 (Linux; Android 8.1.0; Redmi 2 Build/OPM7.181005.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36","KEY_DOWNLOAD_SAVE_PATH":"content://com.android.providers.downloads.documents/document/73"}) W/OkHttpClient: A connection to https://hindugodsongs.in/ was leaked. Did you forget to close a response body? D/LibGlobalFetchLib: PriorityIterator backoffTime reset to 500 milliseconds
For your reference: https://stackoverflow.com/questions/5737945/java-how-to-download-chunked-content-correctly
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (12 by maintainers)
The links need a Referer header attached.
If those are not added to the request, Fetch will insert a default one when the request is being made.
@jpvs0101 Fetch 2.3.4 has be released. Please test and let me know if it is working for you.
Update: Fetch 2.3.3 that fixes the return type issue is now available.