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
BGRABitmap - showcase -
by
circular
[
Today
at 10:43:53 am]
Automatize build system
by
Чебурашка
[
Today
at 10:34:42 am]
Anyone interested in test...
by
ad1mt
[
Today
at 10:14:50 am]
Autentication Oracle
by
MarkMLl
[
Today
at 09:11:11 am]
TWSButton descendance
by
lagprogramming
[
Today
at 09:07:36 am]
lazarus controlling compi...
by
Thaddy
[
Today
at 08:21:16 am]
Unique Instance Terminate...
by
Weitentaaal
[
Today
at 07:38:49 am]
Chinese input in edit and...
by
myisjwj
[
Today
at 05:06:00 am]
Export Stringgrid to an x...
by
majid.ebru
[
Today
at 04:02:17 am]
[SOLVED] How to stay in t...
by
egsuh
[
Today
at 04:00:01 am]
Using tabs instead of spa...
by
Nadar
[
Today
at 03:50:30 am]
Fpcupdeluxe
by
Tony Stone
[
Today
at 02:53:15 am]
[SOLVED] TLabeledEdit.Edi...
by
dsiders
[
Today
at 02:08:20 am]
Stimulus Control: a teach...
by
cpicanco
[
Today
at 02:07:11 am]
Conscious Artificial Inte...
by
cpicanco
[
Today
at 01:18:43 am]
How to convert Real to Bi...
by
ad1mt
[December 06, 2023, 11:24:07 pm]
Small Status Bar Demo
by
MonsterMaze
[December 06, 2023, 09:04:06 pm]
Lazarus Release Candidate...
by
dedrasta
[December 06, 2023, 07:21:58 pm]
[Solved] i can't inatall ...
by
majid.ebru
[December 06, 2023, 06:55:28 pm]
ControlsCodePage presents...
by
Gercino
[December 06, 2023, 06:20:40 pm]
TStringGrid with stretche...
by
wp
[December 06, 2023, 05:54:54 pm]
Mac OS 3.0RC2 throws __da...
by
sawtelle
[December 06, 2023, 05:10:57 pm]
Battery Operations
by
Hansaplast
[December 06, 2023, 04:26:54 pm]
CORDIC algorithms
by
Curt Carpenter
[December 06, 2023, 04:23:32 pm]
Lazarus 3.9.9 Variable Wa...
by
Martin_fr
[December 06, 2023, 03:55:01 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Download a file from internet ... (Read 704 times)
Espectr0
Full Member
Posts: 175
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: 1860
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: 175
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: 1860
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: 175
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