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?]: Cannot read properties of null (reading 'cloneEvent') #1199

Closed
2 tasks done
baptistemanson opened this issue Dec 30, 2023 · 13 comments
Closed
2 tasks done

[Bug?]: Cannot read properties of null (reading 'cloneEvent') #1199

baptistemanson opened this issue Dec 30, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@baptistemanson
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

I installed solidstart as such:
image
√ Where do you want to create the app? ... aowp-bat
√ Which template do you want to use? » with-auth
√ Server Side Rendering? ... yes
√ Use TypeScript? ... yes
found matching commit hash: a9b4b05

On windows 11.
When booting up, I get:

TypeError: Cannot read properties of null (reading 'cloneEvent')
    at Object.apply (node_modules/@solidjs/start/config/server-fns-runtime.jsx:19:41)
    at Module.cachedFn (node_modules/@solidjs/router/dist/data/cache.js:85:7)
    at load (src/routes/index.tsx?pick=route:6:37)

Expected behavior πŸ€”

I was expecting the server to work.

Steps to reproduce πŸ•Ή

Steps:

  1. npm init solid@latest
  2. cd my-folder/
  3. npm i
  4. npm run dev -- --open

Context πŸ”¦

No response

Your environment 🌎

System: Windows 11
Node v18.16.1
Chrome Version 120.0.6099.130 (Official Build) (64-bit)
@baptistemanson baptistemanson added the bug Something isn't working label Dec 30, 2023
@asterikx
Copy link

I experience the same error. It goes away as I remove the export const route = { ... } from my routes files, so I guess it has something to do with it.

@nksaraf
Copy link
Member

nksaraf commented Dec 30, 2023

Hmm weird, i'll give it a try agian

@alveshelio
Copy link

I'm having the same problem and I can confirm that @asterikx answer makes the error go away.
If you click "Clear errors and retry", the error will go away too.

This error only happens in development mode, in production everything seems to work just fine. I've done a pnpm run build and pnpm run start and no errror.

@aellerton
Copy link

I can confirm the above behaviour.

Further, and possibly related to the routes, if I add a file routes/about.tsx with content like this:

export default function About() {
  return (
    <main>
      <h2>About</h2>
      <p>This page intentionally blank</p>
    </main>
  );
}

then if you click the link to /about it will give a 404, but if you reload the page on that URL it works fine.

@carere
Copy link

carere commented Jan 2, 2024

I got the same problem on 0.0.62, and removing the route object works fine, but I need to load some data upon switching to that route πŸ˜…

@carere
Copy link

carere commented Jan 3, 2024

Ok with further looking, I get the error on a fresh pnpm dev, then if i Hot Reload my page, the error goes away (I think that the load data was cache and retrieved).
Do you guys have the same behavior ?

@hansoksendahl
Copy link

hansoksendahl commented Jan 3, 2024

@carere No, I do not have the same behavior.

I get ERR_CONNECTION_REFUSED errors on repeat after forcing a hot reload.

I was in the midst of a refactor to use the new API and this was a blocker for me.

@aellerton
Copy link

aellerton commented Jan 4, 2024 via email

@bartoszkrawczyk2
Copy link

bartoszkrawczyk2 commented Jan 5, 2024

Same issue here. It works with export const route = { ... }, but when I use "use server" in cache it crashes with the same error.

Edit, it seems to occur only after initial dev build. After any change, eg:

from:

const getHello = cache(async () => {
  "use server";
  return { message: "hello" };
}, "hello");

to:

const getHello = cache(async () => {
  "use server";
  return { message: "different message" };
}, "hello");

It seems to work. But when I restart dev server it crashes again, until I'll change message property.

@carere
Copy link

carere commented Jan 5, 2024

It seems I don't have the error anymore with the latest version of vinxi / solid-start

@ryansolid
Copy link
Member

It seems I don't have the error anymore with the latest version of vinxi / solid-start

That's good so likely Vinxi version mismatch or something. Can others retry and let me know.

@asterikx
Copy link

asterikx commented Jan 5, 2024

That's good so likely Vinxi version mismatch or something. Can others retry and let me know.

@ryansolid I can confirm that I don't have the error anymore on the latest version of vinxi & solid-start.

@ryansolid
Copy link
Member

That's 2 good enough for me. Reopen if still an issue.

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

No branches or pull requests

9 participants