Jump to content

DMX78

Members
  • Content Count

    17
  • Joined

  • Last visited

Posts posted by DMX78


  1. Yes, i've found the files, so to make sure again, here is the summarizes steps:

    - Remove all existing files related to indy 9

    - open all those files

    - set lib path to source files

    - compile all

    - install dc files

     

    Can you help me with lib path needed to set?

     

    thank you for the help


  2. Hi, I need to support old project that built using Delphi 7 and Indy 9, but now I need to add support for SMTP protocol which exist only on Indy 10, so can I install indy 10 on Delphi 7, can you please also tell me the documentation or a website to install it

     

    Thank you


  3. Hi, I'm trying to control a browser using webdrive, I have found 2 project already made webdrive library for delphi they are : https://github.com/mmarquee/DelphiWebDriver and https://github.com/Ericwang1104/WebDriver4D, I've tried both but still having problem with how to use them. I've tried WebDrivers4Delphi and it has better example, I can already load Chrome or Edge and tell them to navigate to a certain url, but I still failed to get element to control the web like to click a button or others and the most important thing is that I want to be able to load chrome or edge extension, it throws an exception saying "cannot base64 decode" I've tried to encode the crx content to base64 but still have the same message. Anyone ever tried this ?

     

    Thank you


  4. 12 hours ago, Angus Robertson said:

    The content of the ICS packages has not changed in over 10 years or longer, since Delphi XE2 except for new units being added.  

     

    If you want only VCL you install only the two  OverbyteIcsDxx packages, if you want FMX as well you only install the three IcsCommonDxx packages, as explained in the readme8 file.

     

    Using the install groups is much easier, DxxInstall or DxxInstallVclFmx.  There is a Build Group in modern compilers, so a couple of clicks builds all the packages for Win32 and Win64.

     

    GetIt is the same, VCL only or VCL/FMX. 

     

    Angus

     

    Already clean up my installation, so now I choose to install the VCL FMX package, not the overbyte package


  5. 9 hours ago, FPiette said:

    Look in the "install" directory: you'll find project groups for various combinations of VCL and/or FMX. That is stated in the ReadMe8.txt file.

    About the two entries in GetIT, that is Embarcadero stuff. This is the same ICS for moth FMX and VCL. They just separated VCL from FMX. I don't know why.

     

    And by the way, GetIT is not updated frequently. It is better to download ICS from OverByte webite. See http://wiki.overbyte.eu/wiki/index.php/ICS_Download.

    Yes, i've seen the install folder and just found out that these two package :

    • OverbyteIcsD110Design
    • OverbyteIcsD110Run

    actually the same with 

    • IcsCommonD110Design
    • IcsCommonD110Run

    But still need both the vcl and fmx, so I think the OverbyteICS package is depreceated, you can't install both OvebyteICS and IcsCommon. I'm confused because in Sydney or perhaps in Rio, I use OverbyteIcs package while it has changed in the latest release. 

     

    47 minutes ago, Remy Lebeau said:

    If only there was a system where component authors could update their GetIt submissions whenever they wanted..... oh wait, we were promised that years ago, but it never materialized.....

     

    Well hope this can get solved soon, let me try to refresh this requirement

     

    Iwan CS


  6. Hi, I'm a little bit confused with Overbyte installation, I installed from get it package manager and choose the ICS FMX and VCL, but it will only install :

    • IcsCommonD110Design
    • IcsCommonD110Run
    • IcsFmxD110Design
    • IcsFmxD110Run
    • IcsVclD110Design
    • IcsVclD110Run

     

    But there is another packages

    • OverbyteIcsD110Design
    • OverbyteIcsD110Run

     

    In which I use it previously, so what is the difference between OverbyteICS and ICS package respectively, which one should I installed? I want to install for VCL and FMX.

     

    And there is two overbyte entry in Get It Package Manager, the ICS for FMX and VCL component, and the ICS for VCL only. I haven't tried to install the later, but is there a difference between these two component package? Can anyone explain a bit about these packages, thank you.

     

    Iwan CS


  7. On 7/16/2022 at 12:01 AM, Remy Lebeau said:

    A read timeout error has nothing to do with authentication.  Sounds more like the data connection is probably being blocked.  Remember, FTP uses multiple TCP connections.  I notice in your earlier log that a PORT command is being issued.  That means your FTP client is acting in ACTIVE mode, where the server opens a data connection to the client.  That is not very friendly to routers/proxies.  You should use PASSIVE mode instead, where the client opens a data connection to the server instead.  That is less likely to cause problems.

    Okey, will try to set it passive mode. Thank


  8. On 7/13/2022 at 4:13 PM, Angus Robertson said:

    You didn't give any information on the device you are collecting files from, except the file was an image. 

    It's a Vision Camera, it has ftp to download last capture image. I will look into other samples you mention, but will read the status code and not sending password if not needed as suggested by @Remy Lebeau

     

    20 hours ago, Remy Lebeau said:

    The FTP protocol spec does not allow the password (or the username, or the account) to be empty, it must have at least 1 character.

    I see, so I will check for the status code before sending PASS

     

    20 hours ago, Remy Lebeau said:

    It is generally not a good idea to simply migrate a project from one major IDE version to another.  Migrations are not always smooth.  It is usually better to just create a new project fresh in the new IDE and then add your existing source files to it as needed.

    This is correct, but it takes more time to create a fresh project and add all file for the project, I will do that when there is a major problem with the project file, usually when upgrading android project. This project actually loaded fine, compiled fine, working fine, but problem only when using the FTP, it is true that migrating project should not be done at last minutes. Will be more careful on this next time

     

    20 hours ago, Remy Lebeau said:

    Did you report that issue?  I don't recall seeing anything about that recently.

    Haven't made report, maybe I will later, even though I now know the problem might be that it is related with the empty password erorr, but no clear error is the one need to be fixed, but perhaps I didn't do adequate logging mechanism

     

    Thank you,

     

    Iwan


  9. 5 hours ago, Angus Robertson said:

    If ICS allowed to you send an empty password, you'd still get an error from the server. 

    But what if the server expected an empty password?

     

    5 hours ago, Angus Robertson said:

    Your code is specifically sending the password command with FFTP.PassAsync;, remove that, and you won't get an error

    Yes, I will try that

     

    5 hours ago, Angus Robertson said:

    You are using the low level FTP component, the example you should be looking at is OverbyteIcsXferTst.dpr which uses the high level FTP component that hides much of this complexity from you.

    Thank you for the tip, I will look into that sample

     

    2 hours ago, Remy Lebeau said:

    Yes, you are explicitly calling PassAsync() after UserAsync() is finished, regardless of its outcome.  You need to pay attention the StatusCode of UserAsync() before calling PassAsync(), and make sure your password is not empty if the server requires one.

    Yes, this is due to my lack of research on how to do things

     

    2 hours ago, Remy Lebeau said:

    No, I don't.  You explicitly (and unconditionally) asked it to send a PASS command, but did not provide it with data to send.  Throwing an error sounds logical to me.  It is an input error on your part.

    Agreed, my mistake 😊

     

    2 hours ago, Remy Lebeau said:

    Well, that is your own fault, for not learning the FTP protocol before making use of it, and not having adequate error handling in your code.  If you had been paying attention to the StatusCodes of your commands, you would not have been calling PassAsync() unnecessarily to begin with.

    Lesson learned, thank you 😊

     

    Just to share a bit of the background on this problem, before using overbyte FTP, I use Indy FTP, it worked without error but that is when I worked on Delphi 10.4. Then I decided to move the project to 11.1, with the same project, just load it in 11.1 and try to recompile, it can recompiled nicely without much effort, but when I try to execute the FTP command to get a file, I got a read time out error, and after struggling with debugging a package project (with the show stopper problem if you notice https://quality.embarcadero.com/browse/RSP-37631) putting log anywhere I know, I can only find out that the component already execute a transfer file method, and it stop with a read time out error. So after trying hard to get to know what the problem, I decided to use overbyte since I also prefer overbyte for communication component and loved it. Then I just choose a random sample in order to get it working, that's why I use the sample and not knowing that I need to check the status code as @Remy Lebeau mention. This project should be just a recompiled and run on 11.1, it is already working on 10.4 and the project need to be alive within a week, that's why I have to do things much faster and skip researching on the component

     

    Thank you all for the support, I will try to improved the code, maybe the sample suggested by @Angus Robertson can help me to minimize the long process of getting a file, I see there is a receive command, maybe that is what I'm looking for to make it simpler.

     

    Iwan

     

     


  10. 3 minutes ago, Remy Lebeau said:

    I just checked ICS's latest code, and (while it is a bit difficult to follow) it does appear to send PASS after USER only if USER returns 331.  So I don't know why your log shows PASS being sent, unless you are calling the client's Pass/Async() method yourself?  It would help if you would show your actual code, and your setup of the client's properties.

     

    Here is the code to setup the FTP Client

    function TCSClass_ICSFTPHelper.GetFile(
      AFileName: string;
      const AFileStream: TMemoryStream
    ): Boolean;
    begin
      Result := False;
      FFTP.HostName := FHostname;
      FFTP.Port := FPort.ToString;
      FFTP.UserName := FUserName;
      FFTP.PassWord := FPassword;
      FFTP.Binary := FBinaryMode;
      FFTP.Passive := FPassiveMode;
      FRemoteFileName := AFileName;
      FFileStream := TMemoryStream.Create;
      FResult := 0;
      FFTP.Open;
      if FResult = 1 then
      begin
        AFileStream.LoadFromStream(FFileStream);
        FFileStream.Free;
        Result := True;
      end
      else
      begin
        ShowStatus('Failed To Get File : %s',[FErrorMessage])
      end;
    end;

     

    And here is the code that handle the hand shake, this code is based on the example, and just now I found the problem, thanks to your hint, I did actually still sending the PassAsync method, I'm still trying to understand how to use the component, so I just copy and paste the code from the sample.

    procedure TCSClass_ICSFTPHelper.HandleOnFTP_RequestDone(
      Sender: TObject;
      RqType: TFtpRequest;
      ErrCode: Word
    );
    begin
      if ErrCode <> 0 then begin
        FErrorMessage := Format(
          '*** ERROR (%s) : %s ***',
          [IntToStr(ErrCode),
           FFTP.ErrorMessage
          ]
        );
    //    if RqType <> ftpOpenAsync then
    //      FFTP.QuitAsync
    //    else
    //      ShowStatus('Done.',[]);
    //    Exit;
      end;
    
      case RqType of
        ftpOpenAsync:
          FFTP.UserAsync;
        ftpUserAsync:
          FFTP.PassAsync;
        ftpPassAsync:
          if FPath = '' then
            FFTP.TypeSetAsync
          else
          begin
            FFTP.HostDirName := FPath;
            FFTP.CwdAsync;
          end;
        ftpCwdAsync:
          FFTP.TypeSetAsync;
        ftpTypeSetAsync:
          begin
            FFTP.HostFileName := FRemoteFileName;
            FFTP.LocalStream := FFileStream;
            FFTP.GetAsync;
          end;
        ftpGetAsync:
          begin
            FResult := -1;
            if FFTP.StatusCode = 226 then
            begin
              FResult := 1;
            end;
            FFTP.QuitAsync;
          end;
        ftpQuitAsync:
          begin
            if FResult = 1 then
            begin
              ShowStatus('File Downloaded',[]);
            end;
            ShowStatus('Done',[]);
          end;
      else
        ShowStatus('*** Unknown RqType %s ***',[IntToStr(Ord(RqType))]);
      end;
    end;

    But don't you think it still better to make sure not to raise error when passting empty password? so even if we call the PassAsync directly it will try to send the empty password. This at least will not giving me a half day of work to find the culprit 😊

     

    Iwan


  11. 57 minutes ago, Angus Robertson said:

    It is common for servers to bypass authentication, usually by ignoring any authentication information passed. 

     

    With FTP, this is usually called anonymous authentication, you pass any user name and the password anonymous.

     

    You say 'device not requiring password' which I would interpret as any password used is ignored, so just use xxx and the component will be happy.  

     

    If you mean the device actually requires a specific zero length password, null, space, or the PASS command not to be sent, that will require a change to the component.

     

    Angus

    Here is a log that I capture when login to the FTP server, the admin user is not using any password, so I try to put any password, but it still saying failed to logged in. Even though I don't understand why it still can download the file

     

    12 Jul 2022 16:46:14:839 : OnStatus : > USER admin
    12 Jul 2022 16:46:14:839 : OnStatus : < 230 User admin logged in.
    12 Jul 2022 16:46:14:855 : OnStatus : > PASS 123
    12 Jul 2022 16:46:14:855 : OnStatus : < 530 Invalid password, not logged in.
    12 Jul 2022 16:46:14:855 : OnStatus : > TYPE A
    12 Jul 2022 16:46:14:855 : OnStatus : < 200 Type set to ASCII.
    12 Jul 2022 16:46:14:855 : OnStatus : > PORT 192,168,1,12,224,35
    12 Jul 2022 16:46:14:871 : OnStatus : < 200 PORT command successful.
    12 Jul 2022 16:46:14:871 : OnStatus : > RETR image.jpg
    12 Jul 2022 16:46:14:871 : OnStatus : < 150 Opening Direct data connection for 192.168.1.12.
    12 Jul 2022 16:46:14:956 : OnStatus : < 226 Data Transfer complete.
    12 Jul 2022 16:46:14:962 : OnStatus : ! 68,4Kbytes received/sent in 94 milliseconds
    12 Jul 2022 16:46:14:964 : OnStatus : > QUIT
    12 Jul 2022 16:46:14:964 : OnStatus : < 221 User admin logged out.
    12 Jul 2022 16:46:14:964 : OnStatus : File Downloaded
    12 Jul 2022 16:46:14:964 : OnStatus : Done

     

    Iwan


  12. Hi, 

     

    I have a device that I need to access using FTP component, the device not requiring password, so the password should be left empty, but I can't login to the device's FTP because TFtpClient component will raise an "Password Empty" error, I checked and it happen on this method

    TCustomFtpCli.PassAsync

    where the code will check whether FPassword is empty or not and raise error when empty, so the question is why it have to be a non empty password, even though FTP server should define a password, but there is some that need it to be emptied. I already make the changes by remarking the code line, but I don't know whether it will affect the following code where it use the FPassword. Can someone give an idea on this? or have a fixed by having a property to define whether or not to allow empty password

     

    Iwan


  13. Hi,

     

    I'm trying to build a webservice using Overbyte ICS THTTPAppServer component, i plan to run it as a windows service, i've setup the windows service but got problem when trying the AddGetHandler, the class to handle the request seems not recognized. It failed on line : 948 : TMyHttpHandler(Proc)(FLags); on file OverbyteIcsHttpAppServer.pas. It cause access violation.

     

    My Setup is the usual windows service template, and i run the HTTPAppServer on serviceStart event

     

    The webserver is working, i'm trying using the FHTTPServer.AddGetAllowedPath('/', afBeginBy); routine and it can handle the request

     

    Problem only when try to access the URLHandler. so is it possible to make HTTPAppServer as windows service? And how to setup it correctly

     

    Thank you

     

×