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

SolidStart - Running server with https breaks #23471

Closed
birkskyum opened this issue Apr 20, 2024 · 4 comments
Closed

SolidStart - Running server with https breaks #23471

birkskyum opened this issue Apr 20, 2024 · 4 comments
Labels
bug Something isn't working correctly node API polyfill Related to various "node:*" modules APIs node compat

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Apr 20, 2024

Repro

deno run -A npm:create-solid 
npm i
DENO_FUTURE=1 deno task dev

Enable https in one of the solid-start examples by changed the app.config.ts to this:

import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
  server: {
    https:true
  }
});

When run with DENO_FUTURE=1 deno task dev it'll break with:

 DENO_FUTURE=1 deno task dev  
Task dev vinxi dev
vinxi v0.3.11
vinxi starting dev server

 ERROR  Not implemented: crypto.KeyObject.prototype.asymmetricKeyType                                                                                                                     3:17:44 PM

  at notImplemented (ext:deno_node/_utils.ts:6:9)
  at KeyObject.export (ext:deno_node/internal/crypto/keys.ts:74:5)
  at ext:deno_node/internal/crypto/keygen.ts:45:37
  at eventLoopTick (ext:core/01_core.js:168:7) 



 ERROR  Not implemented: crypto.KeyObject.prototype.asymmetricKeyType                                                                                                                     3:17:44 PM

Related to

@littledivy littledivy added bug Something isn't working correctly node compat node API polyfill Related to various "node:*" modules APIs labels Apr 20, 2024
@birkskyum birkskyum changed the title SolidStart - Enable https breaks SolidStart - Can't run server with https Apr 20, 2024
@birkskyum birkskyum changed the title SolidStart - Can't run server with https SolidStart - Running server with https breaks Apr 20, 2024
littledivy added a commit that referenced this issue Apr 29, 2024
Initial support for exporting rsa public KeyObject.

Current assumption is that RSA keys are stored in pkcs1 der format in
key storage.

Ref #23471 
Ref #18928
Ref #21124
@birkskyum
Copy link
Contributor Author

Now getting slightly different error, but probably just a rename:

➜ DENO_FUTURE=1 deno task dev
Task dev vinxi dev
vinxi v0.3.11
vinxi starting dev server

 ERROR  Not implemented: crypto.PrivateKeyObject.prototype.export                                                                             4:36:45 PM

  at notImplemented (ext:deno_node/_utils.ts:6:9)
  at PrivateKeyObject.export (ext:deno_node/internal/crypto/keys.ts:201:5)
  at ext:deno_node/internal/crypto/keygen.ts:51:39
  at eventLoopTick (ext:core/01_core.js:168:7) 



 ERROR  Not implemented: crypto.PrivateKeyObject.prototype.export   

@birkskyum
Copy link
Contributor Author

birkskyum commented Aug 8, 2024

deno 1.45.5+507e5b7

Now prints:

 DENO_FUTURE=1 deno task dev
Task dev vinxi dev
vinxi v0.4.1
vinxi starting dev server

 ERROR  Assignment to constant variable.                                                                                                                                                           10:57:41 AM

  at ext:deno_node/internal/crypto/keygen.ts:51:19
  at eventLoopTick (ext:core/01_core.js:174:7) 



 ERROR  Assignment to constant variable. 

@birkskyum
Copy link
Contributor Author

birkskyum commented Aug 8, 2024

Alright, with the latest fix and a local build of Deno I now get this:

⇣4% ➜ DENO_FUTURE=1 RUST_BACKTRACE=1 /Users/admin/repos/deno/target/debug/deno task dev
Task dev vinxi dev
vinxi v0.4.1
vinxi starting dev server

  ➜ Local:    https://localhost:3000/
  ➜ Network:  use --host to expose


============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 1.45.5
Args: ["/Users/admin/repos/deno/target/debug/deno", "run", "--ext=js", "-A", "/Users/admin/repos/solidstart-https/node_modules/.bin/../vinxi/bin/cli.mjs", "dev"]

thread 'worker-1' panicked at /Users/admin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.303.0/gotham_state.rs:74:3:
required type deno_runtime::ops::bootstrap::SnapshotOptions is not present in GothamState container
stack backtrace:
   0: rust_begin_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:72:14
   2: deno_core::gotham_state::missing
             at /Users/admin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.303.0/gotham_state.rs:74:3
   3: deno_core::gotham_state::GothamState::take::{{closure}}
             at /Users/admin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.303.0/gotham_state.rs:69:39
   4: core::option::Option<T>::unwrap_or_else
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:980:21
   5: deno_core::gotham_state::GothamState::take
             at /Users/admin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.303.0/gotham_state.rs:69:5
   6: deno_runtime::ops::bootstrap::op_snapshot_options::op_snapshot_options::call
             at /Users/admin/repos/deno/runtime/ops/bootstrap.rs:69:3
   7: deno_runtime::ops::bootstrap::op_snapshot_options::op_snapshot_options::slow_function_impl
             at /Users/admin/repos/deno/runtime/ops/bootstrap.rs:66:1
   8: deno_runtime::ops::bootstrap::op_snapshot_options::op_snapshot_options::v8_fn_ptr
             at /Users/admin/repos/deno/runtime/ops/bootstrap.rs:66:1
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@birkskyum
Copy link
Contributor Author

birkskyum commented Aug 8, 2024

Tried using the latest canary deno 1.45.5+6522478 instead of a local build, and it did the trick!

Screenshot 2024-08-08 at 14 14 36

It says not secure, because i don't use a self-signed cert in this case, same outcome as with Node.

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 node API polyfill Related to various "node:*" modules APIs node compat
Projects
None yet
Development

No branches or pull requests

2 participants