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

[🐞] serializeQRL: Cannot resolve symbol s_90E3ENLVOAc in null undefined #6930

Open
codeyash opened this issue Oct 2, 2024 · 8 comments
Open
Labels
COMP: optimizer TYPE: bug Something isn't working

Comments

@codeyash
Copy link

codeyash commented Oct 2, 2024

Which component is affected?

Qwik Optimizer

Describe the bug

This code works perfectly in Dev mode but failing in Prod mode. Tried all types of middlewares like express, Deno etc

const process_text: QRL<(o: any) => string> = $(
  (o: any): string => `${JSON.stringify(o)}  Hello`
);

const e = {      
    filters: ["groups__name=User"],
     process_text: process_text
}

const data = useStore(e)

Reproduction

Above info should be enough

Steps to reproduce

Bun Dev: works perfectly

Bun Preview : As soon this runs and tried to visit the relevant page which use above store, whole server crashes. Without even calling process_text server crashes.
Full crash log
https://pastebin.com/TNCsRpDW

System Info

System:
    OS: macOS 15.0
    CPU: (12) arm64 Apple M2 Max
    Memory: 1.02 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - /opt/homebrew/opt/node@20/bin/node
    npm: 10.8.2 - /opt/homebrew/opt/node@20/bin/npm
    pnpm: 9.11.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.6 - ~/.bun/bin/bun
  Browsers:
    Chrome: 129.0.6668.60
    Safari: 18.0
  npmPackages:
    @builder.io/qwik: ^1.9.0 => 1.9.0 
    @builder.io/qwik-city: ^1.9.0 => 1.9.0 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.19.8 
    vite: 5.3.5 => 5.3.5

Additional Information

How to debug in prod is missing on docs. I have to debug line by line to find what's the problem. Crash logs are not helpful.

@codeyash codeyash added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Oct 2, 2024
@codeyash
Copy link
Author

codeyash commented Oct 2, 2024

I solved by moving my code from routeLoader$(index/route) to Task$ inside component.

I still consider it as bug in routeLoader$ which failed to collect all required fn for final build.

@wmertens wmertens added COMP: optimizer and removed STATUS-1: needs triage New issue which needs to be triaged labels Oct 2, 2024
@wmertens
Copy link
Member

wmertens commented Oct 2, 2024

Right this seems to be an issue with the optimizer. Can you please try reproducing in https://qwik.dev/playground? It should also be failing there, since it does production builds.

@lbensaad
Copy link
Contributor

lbensaad commented Oct 3, 2024

I am also getting this error when building:

Cannot resolve symbol s_p321FqRPspM in {
  '6X0KberS7Oc': [ 's_6X0KberS7Oc', 'q-DttXmm6U.js' ],
  QeHqHqnbSiY: [ 's_QeHqHqnbSiY', 'q-AKokdM7B.js' ],
  agzGBGehytw: [ 's_agzGBGehytw', 'q-DvDAJ766.js' ],
  ...
} undefined
worker error: Error: Code(31) https://github.com/QwikDev/qwik/blob/main/packages/qwik/src/core/error/error.ts#L39

@wmertens
Copy link
Member

wmertens commented Oct 3, 2024

@lbensaad that's a different issue and it's likely solved in the upcoming 1.9.1 release

@lbensaad
Copy link
Contributor

lbensaad commented Oct 4, 2024

@wmertens when v 1.9.1 will be released?

@lbensaad
Copy link
Contributor

lbensaad commented Oct 8, 2024

The issue still there in v 1.9.1, is there a way to fix it.

@wmertens
Copy link
Member

wmertens commented Oct 9, 2024

@lbensaad Can you make a minimal reproduction?

@lbensaad
Copy link
Contributor

lbensaad commented Oct 9, 2024

The issue has disappeared now, thank you @wmertens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP: optimizer TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants