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

[BUG] #228

Closed
Pactera-wanpingzhang opened this issue May 20, 2020 · 1 comment
Closed

[BUG] #228

Pactera-wanpingzhang opened this issue May 20, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Pactera-wanpingzhang
Copy link

Describe the bug
Show wrong things when video has no sddefault.webp
When YoutubePlayer.thumbnailUrl is null, it's default ThumbnailQuality.standard.
So player use this image to be dafault thumb:

https://i3.ytimg.com/vi_webp/<video_id>/sddefault.webp

Example:

https://i3.ytimg.com/vi_webp/ihOkavVCtlU/sddefault.webp

But when this link got a HTTP 404, things go wrong.

To Reproduce
Steps to reproduce the behavior:
Just use a videoID has no sddefault.webp

Expected behavior
Use a lower quality thumb.

Screenshots
image

Technical Details:

  • Device: iPhone any
  • OS: iOS Any

Additional context

flutter: ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
flutter: The following NetworkImageLoadException was thrown resolving an image codec:
flutter: HTTP request failed, statusCode: 404, https://i3.ytimg.com/vi_webp/ihOkavVCtlU/sddefault.webp
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 NetworkImage._loadAsync (package:flutter/src/painting/_network_image_io.dart:95:9)
flutter:
flutter: #1 NetworkImage.load (package:flutter/src/painting/_network_image_io.dart:48:14)
flutter: #2 ImageProvider.resolveStreamForKey. (package:flutter/src/painting/image_provider.dart:501:13)
flutter: #3 ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:359:22)
flutter: #4 ImageProvider.resolveStreamForKey (package:flutter/src/painting/image_provider.dart:499:80)
flutter: #5 ScrollAwareImageProvider.resolveStreamForKey (package:flutter/src/widgets/scroll_aware_image_provider.dart:106:19)
flutter: #6 ImageProvider.resolve. (package:flutter/src/painting/image_provider.dart:330:9)
flutter: #7 ImageProvider._createErrorHandlerAndKey.. (package:flutter/src/painting/image_provider.dart:460:26)
flutter: #8 SynchronousFuture.then (package:flutter/src/foundation/synchronous_future.dart:41:29)
flutter: #9 ImageProvider._createErrorHandlerAndKey. (package:flutter/src/painting/image_provider.dart:457:11)
flutter: #13 ImageProvider._createErrorHandlerAndKey (package:flutter/src/painting/image_provider.dart:449:16)
flutter: #14 ImageProvider.resolve (package:flutter/src/painting/image_provider.dart:327:5)
flutter: #15 _ImageState._resolveImage (package:flutter/src/widgets/image.dart:1099:16)
flutter: #16 _ImageState.didChangeDependencies (package:flutter/src/widgets/image.dart:1052:5)
flutter: #17 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4661:12)
flutter: #18 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
flutter: ... Normal element mounting (12 frames)
flutter: #30 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
flutter: #31 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5947:32)
flutter: ... Normal element mounting (81 frames)
flutter: #112 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
flutter: #113 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5947:32)
flutter: #114 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
flutter: #115 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5947:32)
flutter: ... Normal element mounting (50 frames)
flutter: #165 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
flutter: #166 Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
flutter: #167 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1162:36)
flutter: #168 SliverMultiBoxAdaptorElement.createChild. (package:flutter/src/widgets/sliver.dart:1147:20)
flutter: #169 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2607:19)
flutter: #170 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:1140:11)
flutter: #171 RenderSliverMultiBoxAdaptor._createOrObtainChild. (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:354:23)
flutter: #172 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1866:58)
flutter: #173 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:918:15)
flutter: #174 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1866:13)
flutter: #175 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:343:5)
flutter: #176 RenderSliverMultiBoxAdaptor.insertAndLayoutChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:489:5)
flutter: #177 RenderSliverList.performLayout.advance (package:flutter/src/rendering/sliver_list.dart:219:19)
flutter: #178 RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:262:19)
flutter: #179 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #180 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:135:11)
flutter: #181 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:375:11)
flutter: #182 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #183 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:452:13)
flutter: #184 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1444:12)
flutter: #185 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1353:20)
flutter: #186 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #187 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #188 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #189 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #190 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #191 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #192 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #193 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #194 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #195 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #196 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #197 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #198 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #199 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #200 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #201 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:266:13)
flutter: #202 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #203 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #204 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #205 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #206 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #207 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:246:18)
flutter: #208 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #209 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:135:11)
flutter: #210 _RenderSliverFractionalPadding.performLayout (package:flutter/src/widgets/sliver_fill.dart:168:11)
flutter: #211 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #212 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:452:13)
flutter: #213 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1444:12)
flutter: #214 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1353:20)
flutter: #215 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #216 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #217 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #218 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #219 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #220 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #221 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #222 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #223 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #224 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #225 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #226 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #227 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #228 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:808:17)
flutter: #229 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #230 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:11)
flutter: #231 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:484:7)
flutter: #232 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
flutter: #233 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:399:14)
flutter: #234 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #235 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #236 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #237 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
flutter: #238 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1248:11)
flutter: #239 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #240 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:556:15)
flutter: #241 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
flutter: #242 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:11)
flutter: #243 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:484:7)
flutter: #244 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
flutter: #245 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:399:14)
flutter: #246 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1630:7)
flutter: #247 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887:18)
flutter: #248 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:402:19)
flutter: #249 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:13)
flutter: #250 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:284:5)
flutter: #251 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1113:15)
flutter: #252 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1052:9)
flutter: #253 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:968:5)
flutter: #257 _invoke (dart:ui/hooks.dart:261:10)
flutter: #258 _drawFrame (dart:ui/hooks.dart:219:3)
flutter: (elided 6 frames from dart:async)
flutter:
flutter: Image provider: NetworkImage("https://i3.ytimg.com/vi_webp/ihOkavVCtlU/sddefault.webp", scale: 1.0)
flutter: Image key: NetworkImage("https://i3.ytimg.com/vi_webp/ihOkavVCtlU/sddefault.webp", scale: 1.0)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: HTTP request failed, statusCode: 404, https://i3.ytimg.com/vi_webp/ihOkavVCtlU/sddefault.webp

@Pactera-wanpingzhang Pactera-wanpingzhang added the bug Something isn't working label May 20, 2020
@sarbagyastha
Copy link
Owner

Duplicate of #164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants