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

i have a webview (Flutter WebView Plugin) .when user goes to webview and click a link to download a file nothing is happening. Flutter WebView Plugin : https://pub.dartlang.org/packages/flutter_webview_plugin Could you please help me #382

Open
kw2019ltd opened this issue Apr 12, 2019 · 15 comments

Comments

@kw2019ltd
Copy link

i have a webview (Flutter WebView Plugin) .when user goes to webview and click a link to download a file nothing is happening.
Flutter WebView Plugin : https://pub.dartlang.org/packages/flutter_webview_plugin
Could you please help me

@kw2019ltd
Copy link
Author

I/zygote (23872): WaitForGcToComplete blocked NativeAlloc on None for 26.939ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/chatty (23872): uid=10085(kw.ltd.twitter.facebook.youtube.twitter_facebook_youtube_app) identical 2 lines
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): Do partial code cache collection, code=246KB, data=162KB
I/zygote (23872): After code cache collection, code=246KB, data=162KB
I/zygote (23872): Increasing code cache capacity to 1024KB
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 105(63KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1647KB/3MB, paused 10.117ms total 90.411ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/chatty (23872): uid=10085(kw.ltd.twitter.facebook.youtube.twitter_facebook_youtube_app) identical 4 lines
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 116(63KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1663KB/3MB, paused 24.558ms total 481.739ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 197(47KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1631KB/3MB, paused 9.545ms total 127.561ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 819(80KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1631KB/3MB, paused 1.041ms total 135.663ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
D/ (23872): PlayerBase::stop() from IPlayer
D/AudioTrack(23872): stop() called with 363600 frames delivered
W/cr_MediaCodecBridge(23872): Releasing: OMX.google.h264.decoder
I/zygote (23872): NativeAlloc concurrent copying GC freed 112(48KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1695KB/3MB, paused 988us total 237.823ms
D/SurfaceUtils(23872): disconnecting from surface 0xc26d0808, reason disconnectFromSurface
D/gralloc_ranchu(23872): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
D/ (23872): HostConnection::get() New Host Connection established 0xcecb4500, tid 24532
D/gralloc_ranchu(23872): gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
W/cr_MediaCodecBridge(23872): Codec released
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 457(96KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1646KB/3MB, paused 1.760ms total 104.004ms
D/skia (23872): Program linking failed.
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 213(66KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1612KB/3MB, paused 61.241ms total 107.694ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 30(47KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1643KB/3MB, paused 990us total 133.246ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 209(52KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1627KB/3MB, paused 43.098ms total 91.804ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
E/EGL_emulation(23872): eglQueryContext 32c0 EGL_BAD_ATTRIBUTE
E/EGL_emulation(23872): tid 24062: eglQueryContext(1830): error 0x3004 (EGL_BAD_ATTRIBUTE)
D/ (23872): PlayerBase::PlayerBase()
D/ (23872): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(23872): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
I/AudioTrack(23872): AUDIO_OUTPUT_FLAG_FAST successful; frameCount 1440 -> 1440
D/AudioTrack(23872): Client defaulted notificationFrames to 720 for frameCount 1440
I/OMXClient(23872): Treble IOmx obtained
D/SurfaceUtils(23872): connecting to surface 0xcfc66008, reason connectToSurface
I/MediaCodec(23872): [OMX.google.h264.decoder] setting surface generation to 24444935
D/SurfaceUtils(23872): disconnecting from surface 0xcfc66008, reason connectToSurface(reconnect)
D/SurfaceUtils(23872): connecting to surface 0xcfc66008, reason connectToSurface(reconnect)
E/ACodec (23872): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
D/MediaCodec(23872): [OMX.google.h264.decoder] setting dataspace on output surface to #103
W/GrallocMapperPassthrough(23872): buffer descriptor with invalid usage bits 0x2000
D/ (23872): HostConnection::get() New Host Connection established 0xcecb4880, tid 24708
D/SoftwareRenderer(23872): setting dataspace on output surface to #103
W/GrallocMapperPassthrough(23872): buffer descriptor with invalid usage bits 0x2000
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 689(124KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 1662KB/3MB, paused 1.077ms total 259.545ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/zygote (23872): NativeAlloc concurrent copying GC freed 235(80KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 1631KB/3MB, paused 6.618ms total 61.556ms
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
W/zygote (23872): Attempt to remove non-JNI local reference, dumping thread
I/chromium(23872): [INFO:CONSOLE(0)] "The resource https://pagead2.googlesyndication.com/pagead/js/r20190408/r20190131/show_ads_impl.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.", source: https://www.getfvid.com/downloader (0)
D/ (23872): PlayerBase::stop() from IPlayer
D/AudioTrack(23872): stop() called with 478080 frames delivered
W/cr_MediaCodecBridge(23872): Releasing: OMX.google.h264.decoder
D/SurfaceUtils(23872): disconnecting from surface 0xcfc66008, reason disconnectFromSurface
W/cr_MediaCodecBridge(23872): Codec released

@charafau
Copy link
Collaborator

I think this might be related to app permissions. Does your app have storage permission?

@wbdsnx
Copy link

wbdsnx commented May 7, 2019

@charafau I am facing with the same issue, I've open permission on Android,but anything doesn't happen when click a link for downloading.Can you tell me what should I do?

@wbdsnx
Copy link

wbdsnx commented May 7, 2019

@kw2019ltd Have you solved this problem?

@charafau
Copy link
Collaborator

charafau commented May 7, 2019

@wbdsnx have you tried to add storage permission to your application?

@wbdsnx
Copy link

wbdsnx commented May 8, 2019

@charafau The error is: W/cr_BindingManager(12837): Cannot call determinedVisibility() - never saw a connection for the pid: 12837
I can not unstand what the storage permission are. Can you tell me what they are?
I have add permission:



@wbdsnx
Copy link

wbdsnx commented May 9, 2019

@wbdsnx have you tried to add storage permission to your application?

How can I set a savePath to save my downloads

@charafau
Copy link
Collaborator

@wbdsnx please check this link for permissions on android

https://developer.android.com/training/permissions/requesting

@SbGibson
Copy link

I think is a "native" limitation in flutter and all the plugins that implements a webview. There's an issue also in Flutter flutter/flutter#26373 and post regarding other plugins like flutter_inappbrowser

@charafau
Copy link
Collaborator

@SbGibson well.. it's not flutter limitation because there's no flutter involved in webview, it's just android activity with normal webview in it. So if android can do it, so this plugin can too. It's only matter of properties and permissions you set.

@SbGibson
Copy link

SbGibson commented Jun 25, 2019

@charafau Thanks, I said native in Flutter because in Android the webview is usually connected to a DownloadListener and a DownloadManager is used when download starts and in the webview plugins the downloadListener is not exposed.
Is this possibile with the plugin? Maybe we have to do it separately?

@charafau
Copy link
Collaborator

@SbGibson I haven't looked into downloading files with webview, seems like we could add that one feature, lots of people are waiting for it.

@johnny-stevie
Copy link

@SbGibson Has this pending feature been implemented yet? I looked at the flutter team's plugin and no one has got an answer to the problem of downloading files in a webview.

@SbGibson
Copy link

@johnny-stevie I've not reviewed the latest version of the code but as there was no support for downloading when we need it we decided to develop our implementation inside the app by "sniffing" urls and opening a new download request specific for that url.

@johnny-stevie
Copy link

johnny-stevie commented Oct 28, 2019 via email

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

No branches or pull requests

5 participants