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
Demo Scene Picture sinwav...
by
Gigatron
[
Today
at 09:00:25 pm]
add new targets to make
by
marcov
[
Today
at 08:38:42 pm]
A fairly simple sound sol...
by
Thaddy
[
Today
at 08:37:08 pm]
how to tweek fpmake to co...
by
marcov
[
Today
at 08:29:16 pm]
Quirky windows
by
ASerge
[
Today
at 07:07:16 pm]
Parameter passing odditie...
by
ASerge
[
Today
at 06:59:05 pm]
[Request] Demo Scene Sub ...
by
Gigatron
[
Today
at 06:29:39 pm]
Unlocking Files
by
KodeZwerg
[
Today
at 06:03:08 pm]
[SOLVED] trunk bug for mi...
by
Key-Real
[
Today
at 05:56:32 pm]
Demo Scene Bitmap Font Sc...
by
Gigatron
[
Today
at 05:56:27 pm]
Compile/Convert Delphi pr...
by
Martin_fr
[
Today
at 05:43:11 pm]
Generics - correct syntax
by
Thaddy
[
Today
at 05:40:59 pm]
Lazarus for Windows on aa...
by
msintle
[
Today
at 05:32:42 pm]
InstallAware Using Lazaru...
by
msintle
[
Today
at 05:26:36 pm]
Xcode Command Line Tools ...
by
Joseph
[
Today
at 05:16:39 pm]
Offical launch of the 1 B...
by
Hartmut
[
Today
at 04:49:29 pm]
what to do if my target M...
by
nickysn
[
Today
at 04:16:02 pm]
compiler error in unit
by
paule32
[
Today
at 03:49:50 pm]
Can function be used for ...
by
VisualLab
[
Today
at 02:15:30 pm]
Multithreading - synchron...
by
mika
[
Today
at 01:48:51 pm]
May be useful to somebody
by
KodeZwerg
[
Today
at 12:38:22 pm]
match automatic highlight...
by
Чебурашка
[
Today
at 11:35:14 am]
Tchart with dual numbers ...
by
wp
[
Today
at 10:48:18 am]
Debugger crashes with App...
by
Martin_fr
[
Today
at 09:29:46 am]
Copyrights Q
by
BrassGear
[
Today
at 09:13:14 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Download a file from internet ... (Read 999 times)
Espectr0
Full Member
Posts: 218
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: 2538
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: 218
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: 2538
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: 218
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