sushinpv / react-secure-storage

This is a wrapper written above local storage to write the data securely to local storage
https://npmjs.com/package/react-secure-storage
MIT License
126 stars 12 forks source link

Unable to run unit test if `react-secure-storage` is used in the project. #46

Closed arnold-parge closed 6 months ago

arnold-parge commented 6 months ago

On running the test it is giving the below error.

TypeError: Cannot set properties of null (setting 'textBaseline')
 ❯ ClientJS.getCanvasPrint node_modules/react-secure-storage/dist/fingerprint.lib.js:257:24
 ❯ ClientJS.getFingerprint node_modules/react-secure-storage/dist/fingerprint.lib.js:82:21
 ❯ getFingerprint node_modules/react-secure-storage/dist/fingerprint.js:24:31
 ❯ new EncryptionService node_modules/react-secure-storage/dist/encryption.js:33:47
 ❯ getAllLocalStorageItems node_modules/react-secure-storage/dist/localStorageHelpers.js:36:19
 ❯ new SecureLocalStorage node_modules/react-secure-storage/dist/index.js:59:64
     57|     _defineProperty(this, "_localStorageItems", {});
     58| 
     59|     this._localStorageItems = (0, _localStorageHelpers.default)();
       |                                                                ^
     60|   }
     61|   /**
 ❯ Object.<anonymous> node_modules/react-secure-storage/dist/index.js:123:26
sushinpv commented 6 months ago

HI @arnold-parge

This issue has been already discussed and close on this thread, Please have a look https://github.com/sushinpv/react-secure-storage/issues/12