Closed Hassan6197 closed 3 months ago
The issue is still there.
Sorry about that. Does this happen very time, or only some times? Does it happen in Android and iOS? Are you setting the tasId specifically anywhere or is it always randomly generated by the package? Can you share Android LogCat (not Flutter) logs (or Console if it happens on iOS)? What version of the package and the OS are you running?
Android Logcat
2024-07-18 11:12:59.124 4885-4989 flutter com.istudywise I parameters: {user_id: 95052, institute_id: 143, program_id: 2063, application_status: 1, name: Hassan, email: 1@test.com, phone: 123456789, step_no: complete}
2024-07-18 11:12:59.124 4885-4989 flutter com.istudywise I Api Post, url http://10.0.2.2:8000/api/v1/applications/create/95052
2024-07-18 11:12:59.302 4885-4989 flutter com.istudywise I response.statusCode: 200
2024-07-18 11:12:59.303 4885-4989 flutter com.istudywise I {"data":{"id":8542,"user_id":95052,"agent_id":null,"institute_id":143,"program_id":2063,"application_status":1,"notes":null,"created_at":"2024-07-18T06:13:00.000000Z","updated_at":"2024-07-18T06:13:00.000000Z","deleted_at":null},"message":"Record stored successfully!"}
2024-07-18 11:12:59.303 4885-4989 flutter com.istudywise I api get received!
2024-07-18 11:12:59.303 4885-4989 flutter com.istudywise I response: {"data":{"id":8542,"user_id":95052,"agent_id":null,"institute_id":143,"program_id":2063,"application_status":1,"notes":null,"created_at":"2024-07-18T06:13:00.000000Z","updated_at":"2024-07-18T06:13:00.000000Z","deleted_at":null},"message":"Record stored successfully!"}
2024-07-18 11:12:59.318 4885-4989 flutter com.istudywise I readyToUploadDocumentList.length: 2
2024-07-18 11:12:59.318 4885-4989 flutter com.istudywise I Processing filePath: /data/user/0/com.istudywise/cache/English_Exam_Proficiency.jpg
2024-07-18 11:12:59.327 4885-4989 flutter com.istudywise I Enqueuing task for file: English_Exam_Proficiency.jpg
2024-07-18 11:12:59.353 4885-4885 BackgroundDownloader com.istudywise I Enqueuing task with id 255970107
2024-07-18 11:12:59.377 4885-4885 BackgroundDownloader com.istudywise I Enqueuing task with id 255970107
2024-07-18 11:12:59.391 551-564 ConnectivityService system_server D requestNetwork for uid/pid:10190/4885 activeRequest: null callbackRequest: 176 [NetworkRequest [ REQUEST id=177, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10190 RequestorUid: 10190 RequestorPkg: com.istudywise UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647
2024-07-18 11:12:59.394 551-682 WifiNetworkFactory system_server D got request NetworkRequest [ REQUEST id=177, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10190 RequestorUid: 10190 RequestorPkg: com.istudywise UnderlyingNetworks: Null] ]
2024-07-18 11:12:59.394 551-682 UntrustedW...orkFactory system_server D got request NetworkRequest [ REQUEST id=177, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10190 RequestorUid: 10190 RequestorPkg: com.istudywise UnderlyingNetworks: Null] ]
2024-07-18 11:12:59.394 551-682 OemPaidWif...orkFactory system_server D got request NetworkRequest [ REQUEST id=177, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10190 RequestorUid: 10190 RequestorPkg: com.istudywise UnderlyingNetworks: Null] ]
2024-07-18 11:12:59.394 551-682 MultiInter...orkFactory system_server D got request NetworkRequest [ REQUEST id=177, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10190 RequestorUid: 10190 RequestorPkg: com.istudywise UnderlyingNetworks: Null] ]
2024-07-18 11:12:59.401 4885-4989 flutter com.istudywise I Status: TaskStatus.enqueued
2024-07-18 11:12:59.402 4885-4989 flutter com.istudywise I Status: TaskStatus.enqueued
2024-07-18 11:12:59.408 4885-5547 TaskWorker com.istudywise I Starting task with taskId 255970107
2024-07-18 11:12:59.414 4885-4989 flutter com.istudywise I Status: TaskStatus.running
2024-07-18 11:12:59.415 4885-5545 TaskWorker com.istudywise I Starting task with taskId 255970107
2024-07-18 11:12:59.417 4885-5547 TrafficStats com.istudywise D tagSocket(102) with statsTag=0xffffffff, statsUid=-1
2024-07-18 11:12:59.417 4885-4989 flutter com.istudywise I Progress: 0%
2024-07-18 11:12:59.419 4885-4989 flutter com.istudywise I Status: TaskStatus.running
2024-07-18 11:12:59.420 4885-4989 flutter com.istudywise I Progress: 0%
2024-07-18 11:12:59.421 4885-5545 TrafficStats com.istudywise D tagSocket(157) with statsTag=0xffffffff, statsUid=-1
2024-07-18 11:12:59.431 4885-4989 flutter com.istudywise I Progress: 46%
2024-07-18 11:12:59.431 4885-4989 flutter com.istudywise I Progress: 46%
2024-07-18 11:12:59.923 4885-4990 EGL_emulation com.istudywise D app_time_stats: avg=17.22ms min=1.26ms max=49.85ms count=58
2024-07-18 11:13:00.227 4885-5552 TaskWorker com.istudywise I Successfully uploaded taskId 255970107 from /data/user/0/com.istudywise/app_flutter/English_Exam_Proficiency.jpg
2024-07-18 11:13:00.230 4885-4999 WM-WorkerWrapper com.istudywise I Worker result SUCCESS for Work [ id=0908dce5-456d-4fb2-9dfe-2dfa14517b68, tags={ com.bbflight.background_downloader.UploadTaskWorker, BackgroundDownloader, taskId=255970107, group=default } ]
2024-07-18 11:13:00.234 4885-4989 flutter com.istudywise I Progress: 50%
2024-07-18 11:13:00.238 4885-4989 flutter com.istudywise I Status: TaskStatus.complete
2024-07-18 11:13:00.238 4885-4989 flutter com.istudywise I Processing filePath: /data/user/0/com.istudywise/cache/Grade_12.jpg
2024-07-18 11:13:00.248 4885-4989 flutter com.istudywise I Enqueuing task for file: Grade_12.jpg
2024-07-18 11:13:00.251 4885-4885 BackgroundDownloader com.istudywise I Enqueuing task with id 1780276150
2024-07-18 11:13:00.268 4885-4885 BackgroundDownloader com.istudywise I Enqueuing task with id 1780276150
2024-07-18 11:13:00.286 4885-4989 flutter com.istudywise I Status: TaskStatus.enqueued
2024-07-18 11:13:00.287 4885-4989 flutter com.istudywise I Status: TaskStatus.enqueued
2024-07-18 11:13:00.290 4885-5821 TaskWorker com.istudywise I Starting task with taskId 1780276150
2024-07-18 11:13:00.293 4885-4989 flutter com.istudywise I Status: TaskStatus.running
2024-07-18 11:13:00.293 4885-4989 flutter com.istudywise I Progress: 50%
2024-07-18 11:13:00.295 4885-5821 TrafficStats com.istudywise D tagSocket(95) with statsTag=0xffffffff, statsUid=-1
2024-07-18 11:13:00.301 4885-5545 TaskWorker com.istudywise I Starting task with taskId 1780276150
2024-07-18 11:13:00.303 4885-4989 flutter com.istudywise I Progress: 96%
2024-07-18 11:13:00.307 4885-5545 TrafficStats com.istudywise D tagSocket(154) with statsTag=0xffffffff, statsUid=-1
2024-07-18 11:13:00.315 4885-4989 flutter com.istudywise I Status: TaskStatus.running
2024-07-18 11:13:00.316 4885-4989 flutter com.istudywise I Progress: 50%
2024-07-18 11:13:00.322 4885-4989 flutter com.istudywise I Progress: 96%
2024-07-18 11:13:00.365 551-604 AppsFilter system_server I interaction: PackageSetting{2051b30 app.linkhome.linkhomecorporation/10191} -> PackageSetting{2e373e7 com.istudywise/10190} BLOCKED
2024-07-18 11:13:00.368 937-937 CarrierSvcBindHelper com.android.phone D onPackageModified: com.istudywise
2024-07-18 11:13:00.397 937-1187 ImsResolver com.android.phone D maybeAddedImsService, packageName: com.istudywise
2024-07-18 11:13:00.567 1469-1469 AiAiEcho com.google.android.as I AppFetcherImpl onPackageChanged com.istudywise.
2024-07-18 11:13:00.569 1469-5826 AiAiEcho com.google.android.as I AppIndexer Package:[com.istudywise] UserProfile:[0] Enabled:[true].
2024-07-18 11:13:00.569 1469-5826 AiAiEcho com.google.android.as I AppFetcherImplV2 updateApps package:[com.istudywise], userId:[0], reason:[package is updated.].
2024-07-18 11:13:00.923 4885-4990 EGL_emulation com.istudywise D app_time_stats: avg=7.63ms min=0.92ms max=34.24ms count=60
2024-07-18 11:13:00.943 4885-5818 TaskWorker com.istudywise I Successfully uploaded taskId 255970107 from /data/user/0/com.istudywise/app_flutter/English_Exam_Proficiency.jpg
2024-07-18 11:13:00.947 4885-4944 WM-WorkerWrapper com.istudywise I Worker result SUCCESS for Work [ id=09f60735-107d-45f7-9ff4-7cbd3700a95d, tags={ com.bbflight.background_downloader.UploadTaskWorker, BackgroundDownloader, taskId=255970107, group=default } ]
2024-07-18 11:13:01.873 4885-5817 TaskWorker com.istudywise I Successfully uploaded taskId 1780276150 from /data/user/0/com.istudywise/app_flutter/Grade_12.jpg
2024-07-18 11:13:01.876 4885-4999 WM-WorkerWrapper com.istudywise I Worker result SUCCESS for Work [ id=e41e0b3f-79fc-4d5d-b065-25ed529c4d01, tags={ com.bbflight.background_downloader.UploadTaskWorker, BackgroundDownloader, taskId=1780276150, group=default } ]
2024-07-18 11:13:01.879 4885-4989 flutter com.istudywise I Progress: 100%
2024-07-18 11:13:01.880 4885-4989 flutter com.istudywise I Status: TaskStatus.complete
This issue is stale because it has been open for 14 days with no activity.
@781flyingdutchman Can you help me in this?
I'm not sure. It's clearly working for me and in my tests, so I can think of to possible issues:
You'd have to check number 1 by trying different, simpler upload code. If it still happens, then it may be number 2 and could be related to the use of other plugins - some don't "play nice" with other plugins. In that case, you may want to put the background_downloader
reference in your pubspec.yaml
all the way at the start of your list of dependencies, or all the way at the end, and see if that makes a difference: the order determines the initialization order of the plugins. If that doesn't work, try to debug which other plug is causing the issue.
If none of this works then I am at a loss...
Describe the bug I am experiencing an issue with the background downloader plugin where tasks with the same id appear to be logged multiple times, files are being uploaded twice. Are there any mistake by me in the code?
Expected behavior Should upload the file once only
Logs
Code If possible, paste in the code snippet where you interact with the package: