Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The callback function is not executed, the task status is "enqueued" in the database #191

Open
xiaolshi opened this issue Dec 4, 2019 · 5 comments · May be fixed by #284
Open

The callback function is not executed, the task status is "enqueued" in the database #191

xiaolshi opened this issue Dec 4, 2019 · 5 comments · May be fixed by #284

Comments

@xiaolshi
Copy link

xiaolshi commented Dec 4, 2019

run on emulator
skd 29

@kcouliba
Copy link

I've encountered the same problem.
For my part, I had to go through the Readme once more since the setup changed the version I was previously using.
Double check that :

  • you are making use of Isolates
  • you callback function fits the rule callback is a top-level or static function
    FlutterDownloader.registerCallback(callback); // callback is a top-level or static function

If that doesn't fix the problem, could you please provide some code?

@qiu997018209
Copy link

I've encountered the same problem.
And My Code is Example Code

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\apk\debug\app-debug.apk.
D/FlutterActivity(20740): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(20740): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(20740): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(20740): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView(20740): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@92659dd
D/FlutterActivityAndFragmentDelegate(20740): Executing Dart entrypoint: main, and sending initial route: /
Debug service listening on ws://127.0.0.1:53232/RhhtyH1HfHI=/ws
Syncing files to device Android SDK built for x86...
D/EGL_emulation(20740): eglMakeCurrent: 0xa17064a0: ver 2 0 (tinfo 0xa1703df0)
D/EGL_emulation(20740): eglMakeCurrent: 0xa1705f00: ver 2 0 (tinfo 0xa1703cc0)
D/EGL_emulation(20740): eglMakeCurrent: 0xa1705f00: ver 2 0 (tinfo 0xa1703cc0)
I/zygote (20740): Do partial code cache collection, code=29KB, data=27KB
I/zygote (20740): After code cache collection, code=29KB, data=27KB
I/zygote (20740): Increasing code cache capacity to 128KB
I/zygote (20740): Do partial code cache collection, code=60KB, data=46KB
I/zygote (20740): After code cache collection, code=60KB, data=46KB
I/zygote (20740): Increasing code cache capacity to 256KB
I/ExoPlayerImpl(20740): Init 40d2b02 [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 26]
D/NetworkSecurityConfig(20740): No Network Security Config specified, using platform default
I/VideoCapabilities(20740): Unsupported profile 4 for video/mp4v-es
I/OMXClient(20740): Treble IOmx obtained
D/SurfaceUtils(20740): connecting to surface 0x83234008, reason connectToSurface
I/MediaCodec(20740): [OMX.google.h264.decoder] setting surface generation to 21237761
D/SurfaceUtils(20740): disconnecting from surface 0x83234008, reason connectToSurface(reconnect)
D/SurfaceUtils(20740): connecting to surface 0x83234008, reason connectToSurface(reconnect)
E/ACodec (20740): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
I/ACodec (20740): codec does not support config priority (err -1010)
I/OMXClient(20740): Treble IOmx obtained
I/ACodec (20740): codec does not support config priority (err -2147483648)
D/MediaCodec(20740): [OMX.google.h264.decoder] setting dataspace on output surface to #103
D/AudioTrack(20740): Client defaulted notificationFrames to 1837 for frameCount 5512
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
D/ (20740): HostConnection::get() New Host Connection established 0x8abffe80, tid 20814
D/SoftwareRenderer(20740): setting dataspace on output surface to #103
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
D/EGL_emulation(20740): eglMakeCurrent: 0xa1705f00: ver 2 0 (tinfo 0xa1703cc0)
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
D/EGL_emulation(20740): eglMakeCurrent: 0xa1705f00: ver 2 0 (tinfo 0xa1703cc0)
I/zygote (20740): Do full code cache collection, code=123KB, data=89KB
I/zygote (20740): After code cache collection, code=97KB, data=63KB
I/zygote (20740): Do partial code cache collection, code=122KB, data=82KB
I/zygote (20740): After code cache collection, code=122KB, data=82KB
I/zygote (20740): Increasing code cache capacity to 512KB
I/ExoPlayerImpl(20740): Release 40d2b02 [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 26] [goog.exo.core]
D/SurfaceUtils(20740): disconnecting from surface 0x83234008, reason disconnectFromSurface
I/ExoPlayerImpl(20740): Init b37ab9d [ExoPlayerLib/2.9.6] [generic_x86, Android SDK built for x86, Google, 26]
I/OMXClient(20740): Treble IOmx obtained
D/SurfaceUtils(20740): connecting to surface 0x80ea4008, reason connectToSurface
I/MediaCodec(20740): [OMX.google.h264.decoder] setting surface generation to 21237762
D/SurfaceUtils(20740): disconnecting from surface 0x80ea4008, reason connectToSurface(reconnect)
D/SurfaceUtils(20740): connecting to surface 0x80ea4008, reason connectToSurface(reconnect)
E/ACodec (20740): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
I/ACodec (20740): codec does not support config priority (err -1010)
I/zygote (20740): Background concurrent copying GC freed 43297(1752KB) AllocSpace objects, 131(8MB) LOS objects, 49% free, 3MB/6MB, paused 1.536ms total 104.184ms
I/OMXClient(20740): Treble IOmx obtained
I/ACodec (20740): codec does not support config priority (err -2147483648)
D/AudioTrack(20740): Client defaulted notificationFrames to 1837 for frameCount 5512
D/MediaCodec(20740): [OMX.google.h264.decoder] setting dataspace on output surface to #103
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
D/ (20740): HostConnection::get() New Host Connection established 0x80e4f680, tid 22180
D/SoftwareRenderer(20740): setting dataspace on output surface to #103
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(20740): buffer descriptor with invalid usage bits 0x2000
D/EGL_emulation(20740): eglMakeCurrent: 0xa1705f00: ver 2 0 (tinfo 0xa1703cc0)
W/WM-WorkSpec(20740): Backoff delay duration less than minimum value
I/flutter (20740): Download task is enqueued with id(009c65ef-30d0-4011-8ae3-5c7b020a2522)

D:\mywork\flutter\flutter_tudou>flutter doctor run -v
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale zh-CN)
• Flutter version 1.12.13+hotfix.8 at D:\mywork\tool\flutter_windows_v1.7.8+hotfix.4-stable\flutter
• Framework revision 0b8abb4724 (3 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at D:\mywork\android_home
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• ANDROID_HOME = D:\mywork\android_home
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Android Studio (version 3.5)
• Android Studio at D:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

• No issues found!

@qiu997018209
Copy link

My emulator is Android 8.0.0 (API 26),but after I change my emulator to API 24,it works well

@addie9000 addie9000 linked a pull request Apr 27, 2020 that will close this issue
@bytemain
Copy link

if you are in China mainland, please see #129
it related to CaptivePortal.

after resolve that by https://hky.moe/archives/162/ , now I can download.

@boshrahi
Copy link

run on emulator
skd 29

in my case, the URL that I wanted to download contains some Persian characters. with encoding the URL the problem of downloading files has been solved. otherwise, they will fail and enqueued.

var encodedUrl = Uri.encodeFull(task.attachment.attachedFileUrl);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants