Skip to content

Initialization of NodeJS Crypto API bug #3332

Open
@NotLazy

Description

@NotLazy

What happened?

When first starting FiveM server, and attempting to do key pair operations in a resource with NodeJS and Crypto API, an error occurs, but if the resource is restarted, it works as expected.

Expected result

No errors should be produced

Reproduction steps

  1. Create a NodeJS resource which utilizes the Crypto API (or download this example resource)
  2. Observe error
  3. Restart the resource
  4. Observe expected output

Importancy

Unknown

Area(s)

ScRT: JS

Specific version(s)

Server 7290 linux

Additional information

example-crypto-resource.zip

Relevant server logs:

[    c-scripting-core] Creating script environments for ssl
[          script:ssl] Error loading script crypto.js in resource ssl: Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
[          script:ssl] stack:
[          script:ssl] Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
[          script:ssl]     at Object.createPrivateKey (node:internal/crypto/keys:615:12)
[          script:ssl]     at @ssl/crypto.js:26:20
[    c-scripting-core] Failed to load script crypto.js.
[           resources] Started resource ssl

Metadata

Metadata

Assignees

No one assigned

    Labels

    ScRT: JSIssues/PRs related to the JavaScript scripting runtimebugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions