Reputation: 4478
I've been working on ionic project. The project uses various plugins including file transfer plugin.
Problem
When I install and run the app, it fails to download resources like image and audio from the api. When I debugged following error was shown:
{
"code": 3,
"source": "https://api.example.com/uploads/audio/011576657039579041.mp3",
"target": "file:///data/user/0/com.myapp.snork/files/audio/011576657039579041.mp3",
"http_status": null,
"body": null,
"exception": "java.security.cert.CertPathValidatorException: Trust anchor for certification path not found."
}
I tested it on Android 6, 7 and 8, with no luck. it works in iOS. Can anybody tell me what might be gone wrong??
What I have tried?
My working Environment
UPDATE
The source URL - https://api.example.com/uploads/audio/011576657039579041.mp3 can be accessible directly via browser, so there is nothing wrong in source URL.
Is it due to https ??
Upvotes: 3
Views: 1852
Reputation: 4478
For those who in case stumble upon same issue,
The issue was The SSL in my server was not properly configured.
I checked via https://www.sslshopper.com and the Intermediate CA
was not properly configured.
After fixing this issue in the server, the app worked flawlessly on android device as well.
Upvotes: 2