Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
macOS / Mac OS X
»
Download a file from internet ...
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Complex package installat...
by
parcel
[
Today
at 01:48:04 pm]
a Unit problem?
by
TRon
[
Today
at 01:45:04 pm]
Project fails on run but ...
by
gjunk
[
Today
at 01:42:11 pm]
Understanding and adjusti...
by
ArchChem
[
Today
at 12:58:12 pm]
Any upgrades to fpWeb pag...
by
marcov
[
Today
at 12:50:25 pm]
Help needed with Cairo / ...
by
Roland57
[
Today
at 12:25:16 pm]
JEDI error but unit compi...
by
Roland57
[
Today
at 11:50:11 am]
Using KeyPress event, how...
by
Bart
[
Today
at 11:32:53 am]
Configure JCF messages
by
DomingoGP
[
Today
at 11:26:55 am]
IDE instability on Raspbe...
by
rvk
[
Today
at 10:37:14 am]
Boleeman's projects are p...
by
AlexTP
[
Today
at 10:18:04 am]
Your best UI design - con...
by
circular
[
Today
at 09:36:11 am]
ZeosDBO and querys using ...
by
Zvoni
[
Today
at 09:27:17 am]
STARS with line border st...
by
Boleeman
[
Today
at 09:13:29 am]
Zeos components. Had to c...
by
dbannon
[
Today
at 07:26:11 am]
A button require administ...
by
Fibonacci
[
Today
at 05:57:21 am]
How to detect one externa...
by
d2010
[
Today
at 12:24:32 am]
Center Lost Window featur...
by
Tony Stone
[
Today
at 12:06:16 am]
Controlling the behavior ...
by
wp
[March 27, 2024, 10:43:40 pm]
A "leisure" question on W...
by
EventHorizon
[March 27, 2024, 10:18:38 pm]
need advice about the fol...
by
jamie
[March 27, 2024, 09:56:39 pm]
[SOLVED] Completion box s...
by
Martin_fr
[March 27, 2024, 08:44:09 pm]
Dialog ShowModal and an i...
by
d7_2_laz
[March 27, 2024, 08:25:18 pm]
Offical launch of the 1 B...
by
Gustavo 'Gus' Carreno
[March 27, 2024, 07:41:48 pm]
Problem setting length of...
by
Remy Lebeau
[March 27, 2024, 05:41:10 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Download a file from internet ... (Read 968 times)
Espectr0
Full Member
Posts: 217
Download a file from internet ...
«
on:
April 23, 2023, 04:48:17 pm »
Hola,
If I try to download a file from the internet from my app,
I get the exception "connection failed:443" in macOS while on Windows it works without problem.
Is it something I can solve or are they Apple limits?
Thanks
Logged
TRon
Hero Member
Posts: 2435
Re: Download a file from internet ...
«
Reply #1 on:
April 23, 2023, 04:59:36 pm »
Hi Espectr0,
You really need to provide a little more information. There are many components/packages/solutions to download a file with Pascal. For all we know you are trying to execute wget and it fails returning that error for you (I do not use macos so have no idea but more information does help me in trying to search for a solution).
Even better would be if you would be able to share some code (but that's not always necessary to do so but would be preferred if you are able to). Other than that some information on what version of FPC/Lazarus and/or version of component/package that is used).
That way people are more inclined to provide a better answer (other hen pasting their own solution that works for them)
edit: Right now I can only answer with that your used solution seem unable to connect in secure way probably/perhaps missing (correct/supported version of) ssl libraries ?
«
Last Edit: April 23, 2023, 05:09:18 pm by TRon
»
Logged
Espectr0
Full Member
Posts: 217
Re: Download a file from internet ...
«
Reply #2 on:
April 23, 2023, 06:14:53 pm »
Hola TRon,
used the following code:
Code: Pascal
[Select]
[+]
[-]
fphttpclient
,
opensslsockets
...
FDS
:
=
TFileStream
.
Create
(
AFileName
,
fmCreate
)
;
try
try
FHTTPClient
.
HTTPMethod
(
'GET'
,
AURL
,
FDS
,
[
200
]
)
;
except
on E
:
Exception
do
begin
end
;
end
;
finally
FDS
.
Free
;
end
;
to connect via https and download a file, as I always say, in Windows it works correctly but in macOS I get that expexion.
Logged
TRon
Hero Member
Posts: 2435
Re: Download a file from internet ...
«
Reply #3 on:
April 23, 2023, 07:38:04 pm »
I have no idea how to check what could be the culprit (assuming that your used URL is valid and you are allowed to connect. Make sure to check firewall and file/application permissions perhaps even virus checker.).
Did you read
https://wiki.freepascal.org/macOS_Programming_Tips#OpenSSL.2C_LibreSSL.2C_Secure_Transport.2C_Network_Framework
?
Logged
Espectr0
Full Member
Posts: 217
Re: Download a file from internet ...
«
Reply #4 on:
April 23, 2023, 09:28:56 pm »
Thanks, I'll investigate how to use Apple's standard framework
Logged
ozznixon
Full Member
Posts: 119
Re: Download a file from internet ...
«
Reply #5 on:
May 21, 2023, 08:31:29 pm »
You could share the URL.
It could be simple things like - Datetime is invalid, Self Signed Certificate and OS is not set to allow, etc.
Posting the URL will allow us to help you.
Best Regards,
Ozz
Logged
---
Want to kick the tires to a Free Pascal like script engine?
http://www.ModernPascal.com/
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
macOS / Mac OS X
»
Download a file from internet ...
TinyPortal
© 2005-2018