오류 로그
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════
The following ImageCodecException was thrown resolving an image codec:
Failed to load network image.
Image URL:
https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/U4IIQNIIYFLA3JC7EYMNJMOCIA.JPG
Trying to load an image from another domain? Find answers at:
https://flutter.dev/docs/development/platform-integration/web-images
When the exception was thrown, this was the stack
Image provider:
NetworkImage("https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/U4IIQNIIYFLA3JC7EYMNJMOCIA.JPG",
scale: 1)
Image key:
NetworkImage("https://cloudfront-ap-northeast-1.images.arcpublishing.com/chosun/U4IIQNIIYFLA3JC7EYMNJMOCIA.JPG",
scale: 1)
Launching lib/main.dart on Chrome in debug mode... main.dart:1
This app is linked to the debug service: ws://127.0.0.1:60587/KU6kl_lw-cM=/ws
Debug service listening on ws://127.0.0.1:60587/KU6kl_lw-cM=/ws
═══════════════════════════════════════════════════════════════════════
이 오류에 대한 공식문서 내용은 아래에 있다.
https://docs.flutter.dev/development/platform-integration/web/web-images
요약하자면, Flutter에서 UI Renderer는 HTML과 Canvas kit 이 있는데,
Canvas kit 으로 NetworkImage를 렌더할 경우, CORS에 걸릴 수 있다.
Html로 렌더해도 상관없으면 디버깅시 html renderer 옵션으로 진행하면 CORS 정책이 반영되지않는다.
'📝 꾸준함이 무기 > Flutter' 카테고리의 다른 글
notification.metrics.axis == widget.axis : is not true (0) | 2022.11.22 |
---|---|
flutter 캐시 삭제 (0) | 2022.10.27 |
IOS 실기기에서 테스트하기 (맥북, 아이패드, VSCode, Flutter App) (0) | 2022.10.12 |