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

500 error on demo site. #603

Closed
ariesclark opened this issue Aug 9, 2024 · 2 comments
Closed

500 error on demo site. #603

ariesclark opened this issue Aug 9, 2024 · 2 comments
Labels
bug Something isn't working next.js Issue is related to Next.js internals rather than this library released

Comments

@ariesclark
Copy link

bc1ec70689e927c5.mp4
@ariesclark ariesclark added the bug Something isn't working label Aug 9, 2024
@franky47
Copy link
Member

Thanks for the report, I was able to reproduce it too.

nuqs comes with a thottling mechanism for updating the URL, to circumvent rate-limits set by browsers (which trigger this error).

After trying to tweak those rates, thinking browsers may have updated them (it happened with Safari), I found that I needed to consistently double all rates. Looking at the debug logs, this comes from Next.js also doing history updates on navigation, essentially doubling the number of calls (and so require double the time between them to stay within rate limits).

@franky47 franky47 added the next.js Issue is related to Next.js internals rather than this library label Sep 12, 2024
franky47 added a commit that referenced this issue Sep 20, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Sep 24, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Sep 28, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 3, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 9, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 10, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 10, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 11, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 21, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
franky47 added a commit that referenced this issue Oct 21, 2024
BREAKING CHANGE: nuqs now requires wrapping your app
with a NuqsAdapter, which is a context provider connecting
your framework APIs to the hooks' internals.

BREAKING CHANGE: The `startTransition` option no longer
automatically sets `shallow: false`. The `Options` type
is no longer generic.

BREAKING CHANGE: The "use client" directive was not included
in the client import (`import {} from 'nuqs'`). It has now been added,
meaning that server-side code needs to import from `nuqs/server`
to avoid errors like:
```
Error: Attempted to call withDefault() from the server but withDefault is on
the client. It's not possible to invoke a client function from the server, it can
only be rendered as a Component or passed to props of a Client
Component.
```

Closes #603, #620.
Copy link

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next.js Issue is related to Next.js internals rather than this library released
Projects
None yet
Development

No branches or pull requests

2 participants