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

🐛 BUG: miniflare internal error on incoming request - failed: expected maybeModuleInfo != nullptr; No such module "; #4434

Closed
bkrem opened this issue Nov 13, 2023 · 4 comments
Labels
bug Something that isn't working miniflare Relating to Miniflare

Comments

@bkrem
Copy link

bkrem commented Nov 13, 2023

Which Cloudflare product(s) does this pertain to?

Miniflare

What version(s) of the tool(s) are you using?

[email protected]

What version of Node are you using?

20.2.0

What operating system are you using?

Mac

Describe the Bug

  • When upgrading to [email protected], our API encounters an internal miniflare error (see error logs below) whenever it attempts to route a request
  • This works without issues up until (and including) [email protected]

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

workerd/util/symbolizer.c++:98: warning: Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set. To symbolize stack traces, set $LLVM_SYMBOLIZER to the location of the llvm-symbolizer binary. When running tests under bazel, use `--test_env=LLVM_SYMBOLIZER=<path>`.
workerd/jsg/util.c++:275: error: e = workerd/jsg/_virtual_includes/jsg/workerd/jsg/modules.h:533: failed: expected maybeModuleInfo != nullptr; No such module "; specifier = node-internal:internal_inspect; ".
stack: 10073916b 100953e27 10072eb63 10072eadf 10132f13f 10132d143 101364773 101424777 101353f87 10132aff7 1015f0307 1015f0c6f 1015f0e4f 101604b47 1016049a3 100921f8f 1009f4a6f 1009f5a0b 1009f577f 10229d837 1022a2323 1022a56b7 10229c68b 100450d2b 100454317 100454153 10045413b 1023059bf 102305d07 102304467 102304237; sentryErrorContext = jsgInternalError
workerd/jsg/util.c++:275: error: e = workerd/jsg/_virtual_includes/jsg/workerd/jsg/modules.h:533: failed: expected maybeModuleInfo != nullptr; No such module "; specifier = node-internal:internal_inspect; ".
stack: 10073916b 100953e27 10072eb63 10072eadf 10132f13f 10132d143 10132d143 10132e087 101364697 1014248f7 1013540bf 10132aff7 1015f0307 1015f0c6f 1015f0e4f 101604b47 1016049a3 100921f8f 1009f4a6f 1009f5a0b 1009f577f 10229d837 1022a2323 1022a56b7 10229c68b 100450d2b 100454317 100454153 10045413b 1023059bf 102305d07; sentryErrorContext = jsgInternalError
[mf:err] Error: internal error
    at Object.logError (/Users/bk/repos/walletconnect/explorer-api/src/utils/HelperUtil.ts:41:13)
    at Object.handleError (/Users/bk/repos/walletconnect/explorer-api/src/utils/HelperUtil.ts:56:18)
    at *** [redacted] (/Users/bk/repos/walletconnect/explorer-api/src/index.ts:122:23)
    at async jsonError (/Users/bk/repos/walletconnect/explorer-api/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
[mf:inf] GET /v3/logo/lg/dce1ee99-403f-44a9-9f94-20de30616500 500 Internal Server Error (56ms)
@bkrem bkrem added the bug Something that isn't working label Nov 13, 2023
@jspspike jspspike added the miniflare Relating to Miniflare label Nov 13, 2023
@jspspike
Copy link
Contributor

@bkrem Thanks for submitting this bug, I think there's enough context for this to be triaged but if you could provide more information on how you're invoking dev/setup that might help us find the issue

@mrbbot
Copy link
Contributor

mrbbot commented Nov 15, 2023

Hey! 👋 I'm guessing you're using a service worker? We recently introduced Node.js-style logging to workerd, but unfortunately this broke logging in service workers: cloudflare/workerd#1362. This should be fixed in the next Wrangler release, which will hopefully be going out soon. In the meantime, I recommend you pin to [email protected].

@bkrem
Copy link
Author

bkrem commented Nov 15, 2023

Hi @jspspike, Hi @mrbbot,

Apologies if the context I provided here initially was somewhat lacking, but I think @mrbbot is on the money.

This worker implementation is a bit older and still uses the addEventListener('fetch', (event) => {... syntax in index.ts which I believe makes it a service worker? Whereas some of our newer workers that leverage https://hono.dev/ do not have any issues with [email protected].

This should be fixed in the next Wrangler release, which will hopefully be going out soon. In the meantime, I recommend you pin to [email protected].

Thank you, we will pin 3.14.0 for this specific worker as advised and await a patch 🙏

@mrbbot
Copy link
Contributor

mrbbot commented Nov 17, 2023

Hey! 👋 [email protected] was released yesterday which switches back to the old logging for service workers (i.e. addEventListener("fetch", ...)), and should fix this issue. This means the new, improved Node-style logging is only available for module workers (i.e. export default { fetch() { ... } }) at the moment. I'm going to close this issue, as logging in service workers should now work, but leave cloudflare/workerd#1362 open until we've fixed this properly for service workers. Please let us know if you continue to have issues with logging in service workers. I would encourage you to migrate to module workers if you can though, as they have lots of other advantages. 😃

@mrbbot mrbbot closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working miniflare Relating to Miniflare
Projects
None yet
Development

No branches or pull requests

3 participants