airsdk / Adobe-Runtime-Support

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

[Linux] EncryptedLocalStore doesn't work under sudo #2303

Open itlancer opened 1 year ago

itlancer commented 1 year ago

Problem Description

EncryptedLocalStore doesn't work with Linux devices if AIR application runs under sudo. It just throw exception when you try to use it. Tested with latest multiple AIR versions even with latest AIR 50.0.0.3 with multiple Ubuntu 22.04.1 LTS and Ubuntu 16.04.7 LTS (VM and real devices).

It works fine with other platfroms (Windows, macOS, Android, iOS). Also it works fine if AIR application launched without root privileges. EncryptedLocalStore.isSupported always returns true in all these cases.

Related issue (that was earlier fixed): https://github.com/airsdk/Adobe-Runtime-Support/issues/1829 Also related issues: https://github.com/airsdk/Adobe-Runtime-Support/issues/2253 https://github.com/airsdk/Adobe-Runtime-Support/issues/2011 https://github.com/airsdk/Adobe-Runtime-Support/issues/508 https://github.com/airsdk/Adobe-Runtime-Support/issues/229

Steps to Reproduce

Build AIR application with code below. And launch application via Terminal command: sudo encrypted_local_store_linux_bug

Application example with sources attached. encrypted_local_store_linux_bug.zip

var bytes:ByteArray = EncryptedLocalStore.getItem("test");

Actual Result: Exception will be throwed:

Error: EncryptedLocalStore database access error
Exception: flash.errors::IOError
flash.data::EncryptedLocalStore$/processErrorCode
flash.data::EncryptedLocalStore$/getItem

Expected Result: EncryptedLocalStore.getItem returns ByteArray with data of specified name without exceptions.

Known Workarounds

none

itlancer commented 2 months ago

Issue still exists with latest AIR 51.0.1.1.