I am trying download .mp3 files from the internet. I have tried without success from two different web locations; one requiring a username and password and one that does not. In both cases I get the same error message:
***Error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
I am not sure what to try next.
The libraries I have installed are: Core (v 8.30), OkHttp (v 1.2), OkHttpUtils2 (v 2.61), RuntimePermissions (v 1.1), and StringUtils (v 1.12)
Here are the two code modules:
Sub DownloadFile
Log("Download File from internet")
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
'job1.Username = "___"
'job1.Password = "_________"
'job1.Download("https://durben.thorsvik.net/remote.php/webdav/music/Kalimba.mp3")
job1.Download("https://gap.thorconsulting.net/joshmusic/song0.mp3")
End Sub
Sub JobDone(Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
Log("File Downloaded")
End Select
Else
Log("***Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
***Error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
I am not sure what to try next.
The libraries I have installed are: Core (v 8.30), OkHttp (v 1.2), OkHttpUtils2 (v 2.61), RuntimePermissions (v 1.1), and StringUtils (v 1.12)
Here are the two code modules:
Sub DownloadFile
Log("Download File from internet")
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
'job1.Username = "___"
'job1.Password = "_________"
'job1.Download("https://durben.thorsvik.net/remote.php/webdav/music/Kalimba.mp3")
job1.Download("https://gap.thorconsulting.net/joshmusic/song0.mp3")
End Sub
Sub JobDone(Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
Log("File Downloaded")
End Select
Else
Log("***Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub