Adobe-Runtime-Support icon indicating copy to clipboard operation
Adobe-Runtime-Support copied to clipboard

[Linux] EncryptedLocalStore doesn't work under sudo

Open itlancer opened this issue 1 year ago • 1 comments

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 avatar Nov 18 '22 14:11 itlancer