Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving npm:express and npm:express-openid-connect results with Deno has panicked. #24143

Closed
BogdanRaicevic opened this issue Jun 7, 2024 · 1 comment · Fixed by #24303
Closed
Labels
bug Something isn't working correctly crypto Related to node:crypto or WebCrypto node compat

Comments

@BogdanRaicevic
Copy link

Trying to set up Auth0 with express as per their documentation results with Deno has panicked. This is a bug in Deno.

thread 'main' panicked at ext\node\ops\crypto\mod.rs:1496:66:
called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 0, error_len: Some(1) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

backtrace output:

Stack backtrace:
   0: onig_get_string_end_by_callout_args
   1: onig_unicode_define_user_property
   2: onig_builtin_fail
   3: onig_get_capture_tree
   4: onig_get_capture_tree
   5: onig_get_capture_tree
   6: onig_get_capture_tree
   7: onig_get_capture_tree
   8: napi_fatal_error
   9: napi_fatal_error
  10: napi_fatal_error
  11: napi_fatal_error
  12: onig_get_regex_by_callout_args
  13: napi_release_threadsafe_function
  14: napi_delete_reference
  15: napi_fatal_error
  16: onig_get_regex_by_callout_args
  17: napi_release_threadsafe_function
  18: onig_unicode_define_user_property
  19: BaseThreadInitThunk
  20: RtlUserThreadStart

code executed from server.ts file is the following:

import { ENV } from './envVariables.ts';
import express from 'npm:express';
import { auth } from 'npm:express-openid-connect';


const app = express();
const config = {
  authRequired: false,
  auth0Logout: true,
  baseURL: ENV.auth.baseURL,
  clientID: ENV.auth.clientId,
  issuerBaseURL: ENV.auth.baseURL,
  secret: ENV.auth.authSecret,
};

app.use(auth(config));

try {
  await app.listen({ port: Number(ENV.beAppPort) });
} catch (error) {
  console.error('Error starting server:', error);
}
@marvinhagemeister marvinhagemeister added the bug Something isn't working correctly label Jun 8, 2024
@lucacasonato lucacasonato added node compat crypto Related to node:crypto or WebCrypto labels Jun 8, 2024
@lucacasonato
Copy link
Member

What Deno version are you on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly crypto Related to node:crypto or WebCrypto node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants