ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

DecompressPackageToBlob

Open nmahate opened this issue 7 years ago • 1 comments

Calling ConfigXmlExchange.DecompressPackageToBlob crashes the web client. We have a .rapidstart package in the TempBlob we are passing this across and have checked TempBlob.HasValue prior to sending it to be Decompressed

Image name: bcinsider.azurecr.io/bcsandbox-master AL Compiler version: 4.0.170493 Using dependent apps:

    {
      "appId": "63ca2fa4-4f03-4f2b-a480-172fef340d3f",
      "publisher": "Microsoft",
      "name": "System Application",
      "version": "1.0.0.0"
    },
    {
      "appId": "437dbf0e-84ff-417a-965d-ed2bb9650972",
      "publisher": "Microsoft",
      "name": "Base Application",
      "version": "15.0.0.0"
    }

image

nmahate avatar Sep 04 '19 16:09 nmahate

Hi,

I cannot reproduce the issue. Try the following code on any page with any exported package. It could be something else causing the crash. In any case please look in the event viewer if you can find any further information.

action(ImportAndDecompressPackage)
{
    ApplicationArea = All;
    Caption = 'Import And Decompress Package';
    Image = Import;

    trigger OnAction()
    var
        TempBlob: Codeunit "Temp Blob";
        TempBlobUncompressed: Codeunit "Temp Blob";
        ConfigXMLExchange: Codeunit "Config. XML Exchange";
        InStream: InStream;
        OutStream: OutStream;
        FromFile: Text;
        Content: Text;
    begin
        UploadIntoStream('Select a rapidstart package', '', '(rapidstart files) *.rapidstart|*.rapidstart', FromFile, InStream);

        TempBlob.CreateOutStream(OutStream);
        CopyStream(OutStream, InStream);

        ConfigXMLExchange.DecompressPackageToBlob(TempBlob, TempBlobUncompressed);
        TempBlobUncompressed.CreateInStream(InStream);

        InStream.Read(Content);
        Message(Content);
    end;
}

GiorgosPa avatar Oct 08 '19 12:10 GiorgosPa