# File Encryption plugin not working

**URL:** <https://forum.ionicframework.com/t/file-encryption-plugin-not-working/137424>\
**Category:** Ionic Native\
**Created:** [August 5, 2018, 2:17pm UTC](https://forum.ionicframework.com/t/file-encryption-plugin-not-working/137424 "2018-08-05T14:17:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyrax80](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Kyrax80](https://forum.ionicframework.com/u/Kyrax80)\
**Post date:** [August 5, 2018, 2:17pm UTC](https://forum.ionicframework.com/t/file-encryption-plugin-not-working/137424/1 "2018-08-05T14:17:01Z")

</div>

Hi, I am getting this error when I install the plugin (just install, not even using it) and try to execute `ionic cordova run android`:

```auto
                                           ^
C:\Users\Zel\Desktop\a\platforms\android\src\com\disusered\Safe.java:120: error: cannot find symbol

      CRYPTO = new Crypto(new SharedPrefsBackedKeyChain(CONTEXT), new SystemNativeCryptoLibrary());
                              ^
  symbol: class SharedPrefsBackedKeyChain
  location: class Safe
Note: Some input files use or override a deprecated API.
:compileDebugJavaWithJavac FAILED

Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

BUILD FAILED
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Total time: 11.002 secs
(node:14276) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\Zel\Desktop\a\platforms\android\src\com\disusered\Safe.java:26: error: package com.facebook.android.crypto.keychain does not exist
import com.facebook.android.crypto.keychain.SharedPrefsBackedKeyChain;
                                           ^
C:\Users\Zel\Desktop\a\platforms\android\src\com\disusered\Safe.java:120: error: cannot find symbol
      CRYPTO = new Crypto(new SharedPrefsBackedKeyChain(CONTEXT), new SystemNativeCryptoLibrary());
                              ^
  symbol: class SharedPrefsBackedKeyChain
  location: class Safe
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (C:\Users\Zel\Desktop\a\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:14276) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14276) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

```

My Ionic info:

```auto
cli packages: (C:\Users\Zel\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.11
    Cordova Platforms : android 6.3.0
    Ionic Framework : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node : v8.11.3
    npm : 5.6.0
    OS : Windows 10

```

Is there anything I can do?

Thanks

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:26pm UTC](https://forum.ionicframework.com/t/file-encryption-plugin-not-working/137424/2 "2021-07-19T21:26:07Z")

</div>

Closed on July 19, 2021, 9:26pm UTC


