node-google-spreadsheet icon indicating copy to clipboard operation
node-google-spreadsheet copied to clipboard

ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY

Open FelippeChemello opened this issue 2 years ago • 10 comments

I'm getting this error

node:internal/crypto/sig:131
  const ret = this[kHandle].sign(data, format, type, passphrase, rsaPadding,

Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
    at Sign.sign
    at Object.sign
    at Object.jwsSign [as sign]
    at GoogleToken.requestToken
    at GoogleToken.getTokenAsyncInner
    at GoogleToken.getTokenAsync
    at GoogleToken.getToken
    at JWT.refreshTokenNoCache
    at JWT.refreshToken
    at JWT.authorizeAsync
  opensslErrorStack: [
    'error:0E076071:configuration file routines:module_run:unknown module name',
    'error:0E07506E:configuration file routines:module_load_dso:error loading dso',
    'error:25070067:DSO support routines:DSO_load:could not load the shared library'
  ],
  library: 'DSO support routines',
  function: 'dlfcn_load',
  reason: 'could not load the shared library',
  code: 'ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY'
}

Code:

const sheets = new GoogleSpreadsheet(SPREADSHEET_ID);

    await sheets.useServiceAccountAuth({
        client_email: GOOGLE_EMAIL,
        private_key: GOOGLE_PRIVATE_KEY,
    });

Already tried to install OPENSSL 1.1.1 as reccomended on this issue, however didn't work.

$ openssl version
OpenSSL 1.1.1c  28 May 2019

FelippeChemello avatar May 12 '22 06:05 FelippeChemello

hrmmm thats a new one to me... What system are you running this on?

theoephraim avatar May 14 '22 05:05 theoephraim

Just ran into the same issue,

OS: Ubuntu 22.04 LTS x86_64 
Kernel: 5.15.0-33-generic
Node: v16.13.2
OpenSSL:  3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
google-spreadsheet: 3.3.0

The issue occurs locally and when building a nextjs project on vercel servers

williamluke4 avatar May 26 '22 05:05 williamluke4

Setting OPENSSL_CONF envar to /dev/null works but :grimacing:

williamluke4 avatar May 26 '22 05:05 williamluke4

I also got this error using Ubuntu 22.04 with WSL2 on WIndows 10, also in a next.js project. I don't get the error using Ubuntu20.04 if that helps.

soundproofboot avatar Jun 02 '22 03:06 soundproofboot

I just got this error too. I am running:

Operating System:
      Platform: linux
      Arch: x64
      Version: #34-Ubuntu SMP Wed May 18 13:34:26 UTC 2022
    Binaries:
      Node: 14.18.1
      npm: 8.6.0
      Yarn: 1.22.18
      pnpm: N/A
    Relevant packages:
      next: 12.1.6
      react: 18.1.0
      react-dom: 18.1.0
      google-spreadsheet: 3.3.0

DanielBailey-web avatar Jun 07 '22 01:06 DanielBailey-web

Windows 10
Node 16
OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)

Same issue

fax1ty avatar Jun 09 '22 11:06 fax1ty

@theoephraim Any what's going on here?

williamluke4 avatar Jun 09 '22 12:06 williamluke4

I am getting the error still, but it is no longer fatal after my latest ubuntu update. it just logs it and seems to not care past that. Also, it seems to be operating find in my production environment ([Docker] FROM node:16-alpine AS deps. Running on Cloud Run) So this is definitely a weird one.

DanielBailey-web avatar Jun 09 '22 22:06 DanielBailey-web

no idea whats going on sorry and I sort of doubt it is caused directly by this package. Seems like it may have something to do with the 'googleapis' module, but of course they have issues disabled on github...

Maybe some useful info here: https://stackoverflow.com/questions/70102543/error-could-not-load-the-shared-library-api-google-vms

theoephraim avatar Jun 09 '22 22:06 theoephraim

Fixed this issue on Ubuntu 22.04 by using node 18

nicolas-t avatar Jul 04 '22 18:07 nicolas-t

closing for now. Please reopen if still running into issues with the latest version.

theoephraim avatar Jun 28 '23 22:06 theoephraim