0

I've built a flutter app that displays a list of courses. Each course has an associated image (network image) that I'm pulling from a Digital Ocean Spaces instance.

I've heard of people having this issue because they don't add https:// in front of their URL, but I'm definitely doing that.

Given that, here are my two errors.

Error #1

══ Exception caught by image resource service ═══

Handshake error in client (OS Error:
 
CERTIFICATE_VERIFY_FAILED: application verification failure(handshake.cc:393))

═════════════════════════

Error #2

══ Exception caught by image resource service═══

The following ArgumentError was thrown resolving an image codec:

Invalid argument(s): No host specified in URI file:///

═════════════════════════

Any help would be greatly appreciated.

Chris

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • please show the code where you create/use the URI – MindStudio Sep 21 '22 at 23:16
  • See pepie answer to this [issue here](https://github.com/flutter/flutter/issues/19588), it solves the CERTIFICATE_VERIFY_FAILED issue. – Chance Sep 21 '22 at 23:23
  • Does this answer your question? [How to solve Flutter CERTIFICATE\_VERIFY\_FAILED error while performing a POST request?](https://stackoverflow.com/questions/54285172/how-to-solve-flutter-certificate-verify-failed-error-while-performing-a-post-req) – Hamed Nov 03 '22 at 05:18

1 Answers1

0

If anyone else has this problem, here's the solution. Digital Ocean Spaces allows you to access your media through a CDN or a standard cloud server.

The CDN is faster, so I used the https:// associated with the CDN for all of my media. Well, that was the problem.

I'm not exactly sure why, but for some reason the CDN domain causes a list of issues.

Thankfully it's an easy fix. All you have to do is remove the ".cdn" from your URL. Here's an example to illustrate my point.

CDN address that doesn't work: https://media-files.nyc3.cdn.digitaloceanspaces.com/test.mp3

Non-CDN address that does work: https://media-files.nyc3.digitaloceanspaces.com/test.mp3