airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

`Unable to identify the distribution that the application is running on.` when trying to package Swivel #3160

Closed bemxio closed 8 months ago

bemxio commented 8 months ago

Problem Description

When I tried to package Swivel using the air-sdk AUR package (currently at version 50.2.4.5) on Arch Linux, after successfully building it with Haxe 3, I got an error about Adobe AIR not being able to identify the distribution:

unexpected failure: Platform conversion failed. Process exited with error 5. Output was "
(process:42341): Gtk-WARNING **: 15:32:59.355: Locale not supported by C library.
        Using the fallback 'C' locale.

(naip:42341): Gtk-WARNING **: 15:32:59.408: Unable to locate theme engine in module_path: "adwaita",
[ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Unhandled exception Error: Unable to identify the distribution that the application is running on. Adobe AIR is only supported on rpm and debian based distributions." errorID=5024]
"
java.io.IOException: Platform conversion failed. Process exited with error 5. Output was "
(process:42341): Gtk-WARNING **: 15:32:59.355: Locale not supported by C library.
        Using the fallback 'C' locale.

(naip:42341): Gtk-WARNING **: 15:32:59.408: Unable to locate theme engine in module_path: "adwaita",
[ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Unhandled exception Error: Unable to identify the distribution that the application is running on. Adobe AIR is only supported on rpm and debian based distributions." errorID=5024]
"
        at com.adobe.air.nai.NativePackager.conversionFail(NativePackager.java)
        at com.adobe.air.nai.NativePackager.invokePlatformConversion(NativePackager.java)
        at com.adobe.air.nai.NativePackager.createPackage(NativePackager.java)
        at com.adobe.air.ADT.parseArgsAndGo(ADT.java)
        at com.adobe.air.ADT.run(ADT.java)
        at com.adobe.air.ADT.main(ADT.java)

Considering that packaging the SDK on the AUR was discussed here, I assume that's not intended behavior and that the SDK should work on all Linux distributions.

Steps to Reproduce

  1. Get an Arch Linux environment with Haxe 3 and the air-sdk AUR package at version 50.2.4.5
  2. Clone Swivel from the repository on GitHub
  3. Initialize haxelib with haxelib setup and install the air3 dependency for Swivel (haxelib install air3)
  4. Build Swivel using haxe Swivel.hxml
  5. Package Swivel using the SDK with the command:
    adt -package \
    -storetype pkcs12 -keystore bat/Swivel.p12 -storepass ngswivel!430 \
    -target bundle bin/Swivel application.xml bin/Swivel.swf assets/icons
ajwfrost commented 8 months ago

Hi

That error suggests that AIR can't work out the package format for this Linux variant. Can you check, what happens if you run

dpkg -l dpkg

(i.e. to list packages that relate to dpkg..) According to https://man.archlinux.org/man/dpkg.1.en this should be supported?

Looking at the code and where this error is thrown: it's happening during the initialisation of an internal utility, but that utility only needs to know whether it's an RPM or DEB based deployment if it's creating a 'native' installer, and here you're creating a 'bundle' (which is all we currently support on Linux). So actually, it would be possible for us to skip that validation step if it's a bundle build, and fix this.

Temporary workaround though: set an environment variable AIR_DISTRO to a value debian

thanks

bemxio commented 8 months ago

Hello, thank you for your reply!

By default, Arch Linux uses pacman as its package manager, so dpkg and other Debian package-related tools are not there, you would need to install them externally.

And I see, glad I could help to pinpoint that bug, for now I'll tell the AUR package maintainer to include the workaround, thank you once again!