'Appium skipping apk file installation inside docker container

I have linux machine with docker container where appium running on linux environment. Mobile device pluged in via USB(LG K22, Android 10) with all granted permissions. Adb devices displays this device. Apk provided with url. The problem is when I running tests the apk is not installing, its like skipping the installation, if app is already installed it doesn’t launch with appPackage and appActivity capabilities. Appium logs shows no errors. The test is running perfect locally on my Windows machine with this capabilities:

String apkLink = SettingsProvider.getPropertyValue("front.android.apk.link") +
                    "/" + SettingsProvider.getPropertyValue("front.android.version");
            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
            capabilities.setCapability(MobileCapabilityType.APP, apkLink);
            capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiautomator2");
            capabilities.setCapability("autoGrantPermissions", true);
            capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 220);

Where should I search for problem?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source