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

Issue with next-superjson-plugin #47

Closed
MatteoGauthier opened this issue Oct 25, 2022 · 10 comments
Closed

Issue with next-superjson-plugin #47

MatteoGauthier opened this issue Oct 25, 2022 · 10 comments

Comments

@MatteoGauthier
Copy link

MatteoGauthier commented Oct 25, 2022

Here is my full stacktrace

$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Users/matteogauthier/dev/pollo/.env.local
warn  - You have enabled experimental feature (swcPlugins) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

thread 'thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.37/src/impls/core/mod.rs:<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.37/src/impls/core/mod.rs:265:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
265:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LayoutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rkyv-0.7.37/src/impls/core/mod.rs:265:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'thread 'thread '<unnamed><unnamed>' panicked at '<unnamed>failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next@12.3.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/dev/amp-dev.js")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: unreachable
           at <unnamed> (<module>[1499]:0x1253cb)
           at <unnamed> (<module>[1492]:0x125123)
           at <unnamed> (<module>[1491]:0x1250a0)
           at <unnamed> (<module>[1477]:0x124301)
           at <unnamed> (<module>[1476]:0x124240)
           at <unnamed> (<module>[1486]:0x1249f0)
           at <unnamed> (<module>[1581]:0x12aff7)
           at <unnamed> (<module>[1628]:0x131d81)
           at <unnamed> (<module>[705]:0xc3c91)
           at <unnamed> (<module>[175]:0x2e345)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: unreachable', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14' panicked at '
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next@12.3.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/next-dev.js")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: unreachable
           at <unnamed> (<module>[1499]:0x1253cb)
           at <unnamed> (<module>[1492]:0x125123)
           at <unnamed> (<module>[1491]:0x1250a0)
           at <unnamed> (<module>[1477]:0x124301)
           at <unnamed> (<module>[1476]:0x124240)
           at <unnamed> (<module>[1486]:0x1249f0)
           at <unnamed> (<module>[1581]:0x12aff7)
           at <unnamed> (<module>[1628]:0x131d81)
           at <unnamed> (<module>[705]:0xc3c91)
           at <unnamed> (<module>[175]:0x2e345)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: unreachable' panicked at '', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rsfailed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next@12.3.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/client/router.js")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: unreachable
           at <unnamed> (<module>[1499]:0x1253cb)
           at <unnamed> (<module>[1492]:0x125123)
           at <unnamed> (<module>[1491]:0x1250a0)
           at <unnamed> (<module>[1477]:0x124301)
           at <unnamed> (<module>[1476]:0x124240)
           at <unnamed> (<module>[1486]:0x1249f0)
           at <unnamed> (<module>[1581]:0x12aff7)
           at <unnamed> (<module>[1628]:0x131d81)
           at <unnamed> (<module>[440]:0x845e6)
           at <unnamed> (<module>[440]:0x829fb)
           at <unnamed> (<module>[219]:0x466ad)
           at <unnamed> (<module>[175]:0x2eef9)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: unreachable:', 216/Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs::14216
:14
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/pages/_app.tsx")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: out of bounds memory access
           at <unnamed> (<module>[440]:0x8294a)
           at <unnamed> (<module>[219]:0x466ad)
           at <unnamed> (<module>[175]:0x2eef9)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next@12.3.1_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_error.js")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: out of bounds memory access
           at <unnamed> (<module>[1539]:0x129034)
           at <unnamed> (<module>[518]:0x965de)
           at <unnamed> (<module>[175]:0x2e257)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
thread '<unnamed>' panicked at 'failed to invoke plugin: failed to invoke plugin on 'Some("/Users/matteogauthier/dev/pollo/pages/_app.tsx")'

Caused by:
    0: failed to invoke `/Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm` as js transform plugin at /Users/matteogauthier/dev/pollo/node_modules/.pnpm/next-superjson-plugin@0.4.8_qlg2dhhwigzfxh5xuu3lcszjwi/node_modules/next-superjson-plugin/next_superjson.wasm
    1: RuntimeError: out of bounds memory access
           at <unnamed> (<module>[282]:0x4edf8)
           at <unnamed> (<module>[175]:0x2e295)
           at <unnamed> (<module>[728]:0xc603e)
           at <unnamed> (<module>[727]:0xc5dbb)
           at <unnamed> (<module>[575]:0xa3561)
           at <unnamed> (<module>[1692]:0x136a40)
    2: heap_get_oob', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc-0.226.26/src/plugin.rs:216:14
error Command failed with signal "SIGSEGV".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

And my next info

    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 17.4.0
      npm: 8.3.1
      Yarn: 1.22.17
      pnpm: 7.5.1
    Relevant packages:
      next: 12.3.1
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0
@Skn0tt Skn0tt transferred this issue from blitz-js/superjson Oct 26, 2022
@Skn0tt
Copy link
Member

Skn0tt commented Oct 26, 2022

Hi @MatteoGauthier! This looks like an issue with next-superjson-plugin, so I transferred the issue there. @orionmiz could you take a look?

@tavindev
Copy link

The plugin is broken in the new version of Next.Js v13 (which is expected to happen). Not sure if you are getting this error on the new version tho, but this is happening to me on the new version.

@MatteoGauthier
Copy link
Author

The plugin is broken in the new version of Next.Js v13 (which is expected to happen). Not sure if you are getting this error on the new version tho, but this is happening to me on the new version.

It might have been, but I'm on 12.3.2

@orionmiz
Copy link
Collaborator

@MatteoGauthier Hi, maybe it seems like a version issue of next.

next info above indicates v12.3.1 which is not compatible with the plugin.

Would you mind using the plugin with next@canary?

@MatteoGauthier
Copy link
Author

Hey @orionmiz, I just updated to 12.3.2-canary.43 and it works ! Thanks for your help, a mention of the issue in the readme could save time for some people like me 😁

@orionmiz
Copy link
Collaborator

@MatteoGauthier
Actually, It requires an issue template form including Next.js canary verification to submit a bug report for this plugin.
Since this issue was transferred from other repository, you skipped that issue template form.
But I updated README once again by your advice to avoid similar situation to be happened.

@Skn0tt Hey Simon, How about suggesting users to create a new issue rather than transferring the issue?

@orionmiz
Copy link
Collaborator

@tavindev Next.js 13 uses the older version of @swc/core as a dependency.

I'll ask SWC team to update it, so please wait for the patch to be applied.

@tavindev
Copy link

@orionmiz Great, thanks!

@orionmiz
Copy link
Collaborator

orionmiz commented Oct 27, 2022

@tavindev
Unfortunately, swcPlugins option is not supported for Next.js 13 in--turbo dev mode currently.
However, if the same error above is occuring, I could guess that the build cache is used.
Have you tried to remove .next directory?

@tavindev
Copy link

@tavindev Unfortunately, swcPlugins option is not supported for Next.js 13 in--turbo dev mode currently. However, if the same error above is occuring, I could guess that the build cache is used. Have you tried to remove .next directory?

Working now on the latest version 0.4.8. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants