Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
[AIR 51.0.0.3][macOS] `EncryptedLocalStore.setItem()` doesn't work
Problem Description
EncryptedLocalStore.setItem() doesn't work using AIR 51.0.0.3 with macOS.
Tested with latest AIR 51.0.0.3 with macOS Intel-based device. There is no such issue with Windows. Also there is no such issue using AIR 50.2.4.4. Didn't test with AIR 51.0.0.2. Didn't test with Linux.
Related issues: https://github.com/airsdk/Adobe-Runtime-Support/discussions/3095 https://github.com/airsdk/Adobe-Runtime-Support/issues/2303 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/781 https://github.com/airsdk/Adobe-Runtime-Support/discussions/1225 https://github.com/airsdk/Adobe-Runtime-Support/issues/508
Steps to Reproduce
Launch application with code below on any macOS device.
Application example with sources attached. air51_macos_encrypted_local_store_bug.zip
package {
import flash.display.Sprite;
import flash.utils.ByteArray;
import flash.data.EncryptedLocalStore;
public class AIR51MacOSEncryptedLocalStoreBug extends Sprite {
public function AIR51MacOSEncryptedLocalStoreBug() {
trace(EncryptedLocalStore.isSupported);
var bytes:ByteArray = EncryptedLocalStore.getItem("test");
trace(bytes);
bytes = new ByteArray();
bytes.writeUTFBytes("test");
EncryptedLocalStore.setItem("test", bytes);//This line cause Error: EncryptedLocalStore internal error
}
}
}
Actual Result: Exception:
Error: EncryptedLocalStore internal error
at flash.data::EncryptedLocalStore$/processErrorCode()
at flash.data::EncryptedLocalStore$/setItem()
Expected Result: Application read datat from ELS, trace it and write new bytes to ELS without errors.
Known Workarounds
none *Use AIR 50.2.4.4