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

perf(turbo-tasks): Filter out and do not cache unused arguments #75261

Draft
wants to merge 2 commits into
base: canary
Choose a base branch
from

Conversation

bgw
Copy link
Member

@bgw bgw commented Jan 24, 2025

No description provided.

@ijjk
Copy link
Member

ijjk commented Jan 24, 2025

Failing test suites

Commit: 25ef396

pnpm test-dev-turbo test/development/app-dir/logging-incoming-request/logging-incoming-request-false.test.ts (turbopack)

  • logging-incoming-request > should handle disabled request logging
Expand output

● logging-incoming-request › should handle disabled request logging

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 500

  18 |   it('should handle disabled request logging', async () => {
  19 |     let response = await next.fetch('/foo')
> 20 |     expect(response.status).toBe(200)
     |                             ^
  21 |
  22 |     response = await next.fetch('/hello')
  23 |     expect(response.status).toBe(200)

  at Object.toBe (development/app-dir/logging-incoming-request/logging-incoming-request-false.test.ts:20:29)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/bigint/test/index.test.js (turbopack)

  • bigint API route support > development mode > should return 200
  • bigint API route support > development mode > should return the BigInt result text
Expand output

● bigint API route support › development mode › should return 200

expect(received).toEqual(expected) // deep equality

Expected: 200
Received: 500

  22 |       method: 'GET',
  23 |     })
> 24 |     expect(res.status).toEqual(200)
     |                        ^
  25 |   })
  26 |
  27 |   it('should return the BigInt result text', async () => {

  at Object.toEqual (integration/bigint/test/index.test.js:24:24)

● bigint API route support › development mode › should return the BigInt result text

expect(received).toEqual(expected) // deep equality

Expected: "3"
Received: false

  29 |       method: 'GET',
  30 |     }).then((res) => res.ok && res.text())
> 31 |     expect(resText).toEqual('3')
     |                     ^
  32 |   })
  33 | }
  34 |

  at Object.toEqual (integration/bigint/test/index.test.js:31:21)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev-turbo test/development/api-cors-with-rewrite/index.test.ts (turbopack)

  • Rewritten API Requests should pass OPTIONS requests to the api function > should pass OPTIONS requests to the api function
Expand output

● Rewritten API Requests should pass OPTIONS requests to the api function › should pass OPTIONS requests to the api function

expect(received).toContain(expected) // indexOf

Expected substring: "successfully hit some-endpoint!"
Received string:    "Internal Server Error"

  41 |       },
  42 |     })
> 43 |     expect(await res.text()).toContain('successfully hit some-endpoint!')
     |                              ^
  44 |   })
  45 | })
  46 |

  at Object.toContain (development/api-cors-with-rewrite/index.test.ts:43:30)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/api-catch-all/test/index.test.js (turbopack)

  • API routes > dev support > should return data when catch-all
  • API routes > dev support > should return data when catch-all with index and trailing slash
  • API routes > dev support > should return data when catch-all with index and no trailing slash
Expand output

● API routes › dev support › should return data when catch-all

expect(received).toEqual(expected) // deep equality

Expected: {"slug": ["1"]}
Received: false

  20 |     )
  21 |
> 22 |     expect(data).toEqual({ slug: ['1'] })
     |                  ^
  23 |   })
  24 |
  25 |   it('should return redirect when catch-all with index and trailing slash', async () => {

  at Object.toEqual (integration/api-catch-all/test/index.test.js:22:18)

● API routes › dev support › should return data when catch-all with index and trailing slash

expect(received).toEqual(expected) // deep equality

Expected: {}
Received: false

  38 |     )
  39 |
> 40 |     expect(data).toEqual({})
     |                  ^
  41 |   })
  42 |
  43 |   it('should return data when catch-all with index and no trailing slash', async () => {

  at Object.toEqual (integration/api-catch-all/test/index.test.js:40:18)

● API routes › dev support › should return data when catch-all with index and no trailing slash

expect(received).toEqual(expected) // deep equality

Expected: {}
Received: false

  46 |     )
  47 |
> 48 |     expect(data).toEqual({})
     |                  ^
  49 |   })
  50 | }
  51 |

  at Object.toEqual (integration/api-catch-all/test/index.test.js:48:18)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/disable-js/test/index.test.js (turbopack)

  • disabled runtime JS > development mode > should render the page
  • disabled runtime JS > development mode > should not have NEXT_DATA script
Expand output

● disabled runtime JS › development mode › should render the page

expect(received).toMatch(expected)

Expected pattern: /Hello World/
Received string:  "Internal Server Error"

  73 |       it('should render the page', async () => {
  74 |         const html = await renderViaHTTP(appPort, '/')
> 75 |         expect(html).toMatch(/Hello World/)
     |                      ^
  76 |       })
  77 |
  78 |       // eslint-disable-next-line jest/no-identical-title

  at Object.toMatch (integration/disable-js/test/index.test.js:75:22)

● disabled runtime JS › development mode › should not have NEXT_DATA script

expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: 0

  81 |
  82 |         const $ = cheerio.load(html)
> 83 |         expect($('script#__NEXT_DATA__').length).toBe(1)
     |                                                  ^
  84 |       })
  85 |
  86 |       it('should have a script for each preload link', async () => {

  at Object.toBe (integration/disable-js/test/index.test.js:83:50)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev-turbo test/development/app-dir/hmr-shared-css/hmr-shared-css.test.ts (turbopack)

  • hmr-app-and-pages > should do HMR when app router and pages router have shared CSS
Expand output

● hmr-app-and-pages › should do HMR when app router and pages router have shared CSS

expect(received).toEqual(expected) // deep equality

Expected: "rgb(255, 255, 255)"
Received: "rgba(0, 0, 0, 0)"

  13 |     expect(
  14 |       await browser.elementByCss('body').getComputedCss('background-color')
> 15 |     ).toEqual('rgb(255, 255, 255)')
     |       ^
  16 |
  17 |     await next.patchFile('app/styles.css', (content) =>
  18 |       content.replace(

  at Object.toEqual (development/app-dir/hmr-shared-css/hmr-shared-css.test.ts:15:7)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/404-page-custom-error/test/index.test.js (turbopack)

  • Default 404 Page with custom _error > development mode > should respond to 404 correctly
  • Default 404 Page with custom _error > development mode > should render error correctly
  • Default 404 Page with custom _error > development mode > should render index page normal
Expand output

● Default 404 Page with custom _error › development mode › should respond to 404 correctly

expect(received).toBe(expected) // Object.is equality

Expected: 404
Received: 500

  24 |   it('should respond to 404 correctly', async () => {
  25 |     const res = await fetchViaHTTP(appPort, '/404')
> 26 |     expect(res.status).toBe(404)
     |                        ^
  27 |     expect(await res.text()).toContain('This page could not be found')
  28 |   })
  29 |

  at Object.toBe (integration/404-page-custom-error/test/index.test.js:26:24)

● Default 404 Page with custom _error › development mode › should render error correctly

expect(received).toContain(expected) // indexOf

Expected substring: "oops"
Received string:    "Internal Server Error"

  30 |   it('should render error correctly', async () => {
  31 |     const text = await renderViaHTTP(appPort, '/err')
> 32 |     expect(text).toContain(isDev ? 'oops' : 'Internal Server Error')
     |                  ^
  33 |   })
  34 |
  35 |   it('should render index page normal', async () => {

  at Object.toContain (integration/404-page-custom-error/test/index.test.js:32:18)

● Default 404 Page with custom _error › development mode › should render index page normal

expect(received).toContain(expected) // indexOf

Expected substring: "hello from index"
Received string:    "Internal Server Error"

  35 |   it('should render index page normal', async () => {
  36 |     const html = await renderViaHTTP(appPort, '/')
> 37 |     expect(html).toContain('hello from index')
     |                  ^
  38 |   })
  39 |
  40 |   if (!isDev) {

  at Object.toContain (integration/404-page-custom-error/test/index.test.js:37:18)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/500-page/test/gsp-gssp.test.js (turbopack)

  • gsp-gssp > development mode > shows error with getServerSideProps in pages/500 dev
Expand output

● gsp-gssp › development mode › shows error with getServerSideProps in pages/500 dev

expect(received).toMatch(expected)

Expected pattern: /`pages\/500` can not have getInitialProps\/getServerSideProps/
Received string:  "FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>·
FATAL: An unexpected Turbopack error occurred:
content is not available as task execution failed·
Caused by:
- content is not available as task execution failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of <PageEndpoint as Endpoint>::client_changed failed
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of PageEndpoint::client_evaluatable_assets failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of PagesProject::client_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")
FATAL: An unexpected Turbopack error occurred:
Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of subscribe_issues_and_diags_operation failed
- Execution of <PageEndpoint as Endpoint>::server_changed failed
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::ssr_data_chunk failed
- Execution of PagesProject::ssr_data_runtime_entries failed
- Execution of PagesProject::ssr_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")
FATAL: An unexpected Turbopack error occurred:
Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of subscribe_issues_and_diags_operation failed
- Execution of <PageEndpoint as Endpoint>::server_changed failed
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::ssr_chunk failed
- Execution of PagesProject::ssr_runtime_entries failed
- Execution of PagesProject::ssr_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")
 ⨯ [Error [TurbopackInternalError]: Failed to write page endpoint /_app·
Caused by:
- content is not available as task execution failed
- content is not available as task execution failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483657 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of PageEndpoint::client_evaluatable_assets failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of PagesProject::client_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
[Error [TurbopackInternalError]: Failed to write page endpoint /_app·
Caused by:
- content is not available as task execution failed
- content is not available as task execution failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483653 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of PageEndpoint::client_evaluatable_assets failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of PagesProject::client_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
 ⨯ [Error [TurbopackInternalError]: Failed to write page endpoint /_app·
Caused by:
- content is not available as task execution failed
- content is not available as task execution failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483659 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of PageEndpoint::client_evaluatable_assets failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of PagesProject::client_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
[Error [TurbopackInternalError]: Failed to write page endpoint /_app·
Caused by:
- content is not available as task execution failed
- content is not available as task execution failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483660 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of PageEndpoint::client_evaluatable_assets failed
- content is not available as task execution failed
- Execution of PageEndpoint::client_module failed
- content is not available as task execution failed
- Execution of PagesProject::client_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
"

  242 |         await fs.move(`${pages500}.bak`, pages500)
  243 |
> 244 |         expect(stderr).toMatch(gip500Err)
      |                        ^
  245 |       })
  246 |     }
  247 |   )

  at Object.toMatch (integration/500-page/test/gsp-gssp.test.js:244:24)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev-turbo test/development/app-dir/async-request-warnings/async-request-warnings.test.ts (turbopack)

  • dynamic-requests warnings > warnings on sync cookie access
  • dynamic-requests warnings > warnings on sync draftMode access
  • dynamic-requests warnings > warnings on sync headers access
  • dynamic-requests warnings > warnings on sync params access
  • dynamic-requests warnings > warnings on sync searchParams access
Expand output

● dynamic-requests warnings › warnings on sync cookie access

expect(received).toEqual(expected) // deep equality

- Expected  - 12
+ Received  +  2

  Object {
-   "browserConsoleWarnings": Array [
-     StringContaining "`cookies().get('page')`.",
-     StringContaining "`cookies().get('component')`.",
-     StringContaining "`cookies().has('component')`.",
-     StringContaining "`...cookies()` or similar iteration",
-   ],
-   "terminalCookieErrors": Array [
-     StringContaining "`cookies().get('page')`.",
-     StringContaining "`cookies().get('component')`.",
-     StringContaining "`cookies().has('component')`.",
-     StringContaining "`...cookies()` or similar iteration",
-   ],
+   "browserConsoleWarnings": Array [],
+   "terminalCookieErrors": Array [],
  }

  19 |       return line.includes('Route "/request/cookies')
  20 |     })
> 21 |     expect({ browserConsoleWarnings, terminalCookieErrors }).toEqual({
     |                                                              ^
  22 |       browserConsoleWarnings: [
  23 |         expect.stringContaining("`cookies().get('page')`."),
  24 |         expect.stringContaining("`cookies().get('component')`."),

  at Object.toEqual (development/app-dir/async-request-warnings/async-request-warnings.test.ts:21:62)

● dynamic-requests warnings › warnings on sync draftMode access

expect(received).toEqual(expected) // deep equality

- Expected  - 12
+ Received  +  2

  Object {
-   "browserConsoleWarnings": Array [
-     StringContaining "`draftMode().isEnabled`.",
-     StringContaining "`draftMode().isEnabled`.",
-     StringContaining "`draftMode().enable()`.",
-     StringContaining "`draftMode().isEnabled`.",
-   ],
-   "terminalCookieErrors": Array [
-     StringContaining "`draftMode().isEnabled`.",
-     StringContaining "`draftMode().isEnabled`.",
-     StringContaining "`draftMode().enable()`.",
-     StringContaining "`draftMode().isEnabled`.",
-   ],
+   "browserConsoleWarnings": Array [],
+   "terminalCookieErrors": Array [],
  }

  48 |       return line.includes('Route "/request/draftMode')
  49 |     })
> 50 |     expect({ browserConsoleWarnings, terminalCookieErrors }).toEqual({
     |                                                              ^
  51 |       browserConsoleWarnings: [
  52 |         expect.stringContaining('`draftMode().isEnabled`.'),
  53 |         expect.stringContaining('`draftMode().isEnabled`.'),

  at Object.toEqual (development/app-dir/async-request-warnings/async-request-warnings.test.ts:50:62)

● dynamic-requests warnings › warnings on sync headers access

expect(received).toEqual(expected) // deep equality

- Expected  - 12
+ Received  +  2

  Object {
-   "browserConsoleWarnings": Array [
-     StringContaining "`headers().get('page')`.",
-     StringContaining "`headers().get('component')`.",
-     StringContaining "`headers().has('component')`.",
-     StringContaining "`...headers()` or similar iteration",
-   ],
-   "terminalCookieErrors": Array [
-     StringContaining "`headers().get('page')`.",
-     StringContaining "`headers().get('component')`.",
-     StringContaining "`headers().has('component')`.",
-     StringContaining "`...headers()` or similar iteration",
-   ],
+   "browserConsoleWarnings": Array [],
+   "terminalCookieErrors": Array [],
  }

  77 |       return line.includes('Route "/request/headers')
  78 |     })
> 79 |     expect({ browserConsoleWarnings, terminalCookieErrors }).toEqual({
     |                                                              ^
  80 |       browserConsoleWarnings: [
  81 |         expect.stringContaining("`headers().get('page')`."),
  82 |         expect.stringContaining("`headers().get('component')`."),

  at Object.toEqual (development/app-dir/async-request-warnings/async-request-warnings.test.ts:79:62)

● dynamic-requests warnings › warnings on sync params access

expect(received).toEqual(expected) // deep equality

- Expected  - 12
+ Received  +  2

  Object {
-   "browserConsoleWarnings": Array [
-     StringContaining "`params.slug`.",
-     StringContaining "`params.slug`.",
-     StringContaining "`params.slug`.",
-     StringContaining "`...params` or similar expression",
-   ],
-   "terminalCookieErrors": Array [
-     StringContaining "`params.slug`.",
-     StringContaining "`params.slug`.",
-     StringContaining "`params.slug`.",
-     StringContaining "`...params` or similar expression",
-   ],
+   "browserConsoleWarnings": Array [],
+   "terminalCookieErrors": Array [],
  }

  106 |       return line.includes('Route "/request/params/[slug]')
  107 |     })
> 108 |     expect({ browserConsoleWarnings, terminalCookieErrors }).toEqual({
      |                                                              ^
  109 |       browserConsoleWarnings: [
  110 |         expect.stringContaining('`params.slug`.'),
  111 |         expect.stringContaining('`params.slug`.'),

  at Object.toEqual (development/app-dir/async-request-warnings/async-request-warnings.test.ts:108:62)

● dynamic-requests warnings › warnings on sync searchParams access

expect(received).toEqual(expected) // deep equality

- Expected  - 12
+ Received  +  2

  Object {
-   "browserConsoleWarnings": Array [
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`Object.keys(searchParams)` or similar",
-   ],
-   "terminalCookieErrors": Array [
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`searchParams.slug`.",
-     StringContaining "`Object.keys(searchParams)` or similar",
-   ],
+   "browserConsoleWarnings": Array [],
+   "terminalCookieErrors": Array [],
  }

  135 |       return line.includes('Route "/request/searchParams')
  136 |     })
> 137 |     expect({ browserConsoleWarnings, terminalCookieErrors }).toEqual({
      |                                                              ^
  138 |       browserConsoleWarnings: [
  139 |         expect.stringContaining('`searchParams.slug`.'),
  140 |         expect.stringContaining('`searchParams.slug`.'),

  at Object.toEqual (development/app-dir/async-request-warnings/async-request-warnings.test.ts:137:62)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/app-dir-export/test/dynamic-missing-gsp-prod.test.ts (turbopack)

  • app dir - with output export - dynamic missing gsp prod > production mode > should error when dynamic route is missing generateStaticParams
Expand output

● app dir - with output export - dynamic missing gsp prod › production mode › should error when dynamic route is missing generateStaticParams

expect(received).toMatch(expected)

Expected substring: "Page \"/another/[slug]\" is missing \"generateStaticParams()\" so it cannot be used with \"output: export\" config."
Received string:    " ⚠ Linting is disabled.
FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>·
FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>··
> Build error occurred
[Error [TurbopackInternalError]: Failed to write app endpoint /page·
Caused by:
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483652 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /page
- Execution of AppEndpoint::output failed
- Execution of AppEndpoint::app_page_entry failed
- Execution of AppProject::rsc_module_context failed
- Execution of AppProject::ecmascript_client_reference_transition failed
- Execution of AppProject::client_transition failed
- Execution of AppProject::client_module_context failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
"

  184 |         await check(() => result.stderr, /error/i)
  185 |       }
> 186 |       expect(result.stderr).toMatch(expectedErrMsg)
      |                             ^
  187 |     } else {
  188 |       const a = (n: number) => `li:nth-child(${n}) a`
  189 |       const browser = await webdriver(port, '/')

  at toMatch (integration/app-dir-export/test/utils.ts:186:29)
  at Object.<anonymous> (integration/app-dir-export/test/dynamic-missing-gsp-prod.test.ts:8:9)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app-root-params/simple.test.ts (turbopack)

  • app-root-params - simple > should return rootParams
  • app-root-params - simple > should only return rootParams and not other params
Expand output

● app-root-params - simple › should return rootParams

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app-root-params - simple › should only return rootParams and not other params

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app-basepath/index.test.ts (turbopack)

  • app dir - basepath > should successfully hard navigate from pages -> app
  • app dir - basepath > should support basePath
  • app dir - basepath > should support Link with basePath prefixed
  • app dir - basepath > should prefix metadata og image with basePath
  • app dir - basepath > should prefix redirect() with basePath
  • app dir - basepath > should render usePathname without the basePath
  • app dir - basepath > should handle redirect in dynamic in suspense boundary routes with basePath
  • app dir - basepath > should only make a single RSC call to the current page (/base/refresh)
  • app dir - basepath > should only make a single RSC call to the current page (/base/refresh?foo=bar)
  • app dir - basepath > should properly stream an internal server action redirect() with a relative URL
  • app dir - basepath > should properly stream an internal server action redirect() with a absolute URL
  • app dir - basepath > should redirect externally when encountering absolute URLs on the same host outside the basePath
Expand output

● app dir - basepath › should successfully hard navigate from pages -> app

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should support basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should support Link with basePath prefixed

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should prefix metadata og image with basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should prefix redirect() with basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should render usePathname without the basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should handle redirect in dynamic in suspense boundary routes with basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should only make a single RSC call to the current page (/base/refresh)

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should only make a single RSC call to the current page (/base/refresh?foo=bar)

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should properly stream an internal server action redirect() with a relative URL

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should properly stream an internal server action redirect() with a absolute URL

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● app dir - basepath › should redirect externally when encountering absolute URLs on the same host outside the basePath

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/404-page-ssg/test/index.test.js (turbopack)

  • 404 Page Support SSG > production mode > should build successfully
  • 404 Page Support SSG > production mode > should respond to 404 correctly
  • 404 Page Support SSG > production mode > should render error correctly
  • 404 Page Support SSG > production mode > should not show an error in the logs for 404 SSG
  • 404 Page Support SSG > production mode > should render index page normal
  • 404 Page Support SSG > production mode > should not revalidate custom 404 page
  • 404 Page Support SSG > production mode > should set pages404 in routes-manifest correctly
  • 404 Page Support SSG > production mode > should have 404 page in prerender-manifest
Expand output

● 404 Page Support SSG › production mode › should build successfully

expect(received).toBe(expected) // Object.is equality

Expected: 0
Received: 1

  100 |         })
  101 |
> 102 |         expect(code).toBe(0)
      |                      ^
  103 |         expect(buildStderr).not.toMatch(gip404Err)
  104 |         expect(buildStdout).not.toMatch(gip404Err)
  105 |

  at Object.toBe (integration/404-page-ssg/test/index.test.js:102:22)

● 404 Page Support SSG › production mode › should respond to 404 correctly

TypeError: Invalid URL

  179 | ): Promise<Response> {
  180 |   const url = query ? withQuery(pathname, query) : pathname
> 181 |   return fetch(getFullUrl(appPort, url), opts)
      |               ^
  182 | }
  183 |
  184 | export function renderViaHTTP(

  at parseURL (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1164:12)
  at new Request (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1210:17)
  at ../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1439:19
  at fetch (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1437:9)
  at fetchViaHTTP (lib/next-test-utils.ts:181:15)
  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:27:35)

● 404 Page Support SSG › production mode › should render error correctly

TypeError: Invalid URL

  179 | ): Promise<Response> {
  180 |   const url = query ? withQuery(pathname, query) : pathname
> 181 |   return fetch(getFullUrl(appPort, url), opts)
      |               ^
  182 | }
  183 |
  184 | export function renderViaHTTP(

  at parseURL (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1164:12)
  at new Request (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1210:17)
  at ../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1439:19
  at fetch (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1437:9)
  at fetchViaHTTP (lib/next-test-utils.ts:181:15)
  at fetchViaHTTP (lib/next-test-utils.ts:190:10)
  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:33:37)

● 404 Page Support SSG › production mode › should not show an error in the logs for 404 SSG

TypeError: Invalid URL

  179 | ): Promise<Response> {
  180 |   const url = query ? withQuery(pathname, query) : pathname
> 181 |   return fetch(getFullUrl(appPort, url), opts)
      |               ^
  182 | }
  183 |
  184 | export function renderViaHTTP(

  at parseURL (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1164:12)
  at new Request (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1210:17)
  at ../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1439:19
  at fetch (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1437:9)
  at fetchViaHTTP (lib/next-test-utils.ts:181:15)
  at fetchViaHTTP (lib/next-test-utils.ts:190:10)
  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:38:24)

● 404 Page Support SSG › production mode › should render index page normal

TypeError: Invalid URL

  179 | ): Promise<Response> {
  180 |   const url = query ? withQuery(pathname, query) : pathname
> 181 |   return fetch(getFullUrl(appPort, url), opts)
      |               ^
  182 | }
  183 |
  184 | export function renderViaHTTP(

  at parseURL (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1164:12)
  at new Request (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1210:17)
  at ../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1439:19
  at fetch (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1437:9)
  at fetchViaHTTP (lib/next-test-utils.ts:181:15)
  at fetchViaHTTP (lib/next-test-utils.ts:190:10)
  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:44:37)

● 404 Page Support SSG › production mode › should not revalidate custom 404 page

TypeError: Invalid URL

  179 | ): Promise<Response> {
  180 |   const url = query ? withQuery(pathname, query) : pathname
> 181 |   return fetch(getFullUrl(appPort, url), opts)
      |               ^
  182 | }
  183 |
  184 | export function renderViaHTTP(

  at parseURL (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1164:12)
  at new Request (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1210:17)
  at ../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1439:19
  at fetch (../node_modules/.pnpm/[email protected][email protected]/node_modules/node-fetch/lib/index.js:1437:9)
  at fetchViaHTTP (lib/next-test-utils.ts:181:15)
  at fetchViaHTTP (lib/next-test-utils.ts:190:10)
  at Object.<anonymous> (integration/404-page-ssg/test/index.test.js:50:39)

● 404 Page Support SSG › production mode › should set pages404 in routes-manifest correctly

ENOENT: no such file or directory, open '/root/actions-runner/_work/next.js/next.js/test/integration/404-page-ssg/.next/routes-manifest.json'

● 404 Page Support SSG › production mode › should have 404 page in prerender-manifest

ENOENT: no such file or directory, open '/root/actions-runner/_work/next.js/next.js/test/integration/404-page-ssg/.next/prerender-manifest.json'

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/app/standalone.test.ts (turbopack)

  • output: standalone with app dir > should handle trace files correctly for route groups (nodejs only)
  • output: standalone with app dir > should work correctly with output standalone
Expand output

● output: standalone with app dir › should handle trace files correctly for route groups (nodejs only)

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

● output: standalone with app dir › should work correctly with output standalone

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/app-document-import-order/test/index.test.js (turbopack)

  • Root components import order > production mode > root components should be imported in this order _document > _app > page in order to respect side effects
Expand output

● Root components import order › production mode › _app chunks should be attached to de dom before page chunks

command failed with code 1 signal null
 ⚠ Linting is disabled.
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
   ▲ Next.js 15.2.0-canary.25 (Turbopack)

   Checking validity of types ...
   Creating an optimized production build ...
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
 ⚠ Webpack is configured while Turbopack is not, which may cause problems.
 ⚠ See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbo

   Building (0/2) ...
FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>

 ✓ Building (2/2)

> Build error occurred
[Error [TurbopackInternalError]: Failed to write page endpoint /_app

Caused by:
- Panic in resolve: Some("called `Result::unwrap()` on an `Err` value: Invalid argument type")

Debug info:
- Execution of TaskId { id: 2147483652 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of Project::client_chunking_context failed
- Execution of Project::module_id_strategy failed
- Execution of Project::whole_app_module_graphs failed
- Execution of whole_app_module_graph_operation failed
- Execution of Project::get_all_entries failed
- Execution of <PageEndpoint as Endpoint>::root_modules failed
- Execution of PageEndpoint::internal_ssr_chunk_module failed
- Execution of PagesProject::ssr_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some("called `Result::unwrap()` on an `Err` value: Invalid argument type")]

  312 |       ) {
  313 |         return reject(
> 314 |           new Error(
      |           ^
  315 |             `command failed with code ${code} signal ${signal}\n${mergedStdio}`
  316 |           )
  317 |         )

  at ChildProcess.<anonymous> (lib/next-test-utils.ts:314:11)

● Root components import order › production mode › root components should be imported in this order _document > _app > page in order to respect side effects

command failed with code 1 signal null
 ⚠ Linting is disabled.
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
   ▲ Next.js 15.2.0-canary.25 (Turbopack)

   Checking validity of types ...
   Creating an optimized production build ...
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/app-document-import-order/next.config.js
 ⚠ Webpack is configured while Turbopack is not, which may cause problems.
 ⚠ See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbo

   Building (0/2) ...
FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>

 ✓ Building (2/2)

> Build error occurred
[Error [TurbopackInternalError]: Failed to write page endpoint /_app

Caused by:
- Panic in resolve: Some("called `Result::unwrap()` on an `Err` value: Invalid argument type")

Debug info:
- Execution of TaskId { id: 2147483652 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of Project::client_chunking_context failed
- Execution of Project::module_id_strategy failed
- Execution of Project::whole_app_module_graphs failed
- Execution of whole_app_module_graph_operation failed
- Execution of Project::get_all_entries failed
- Execution of <PageEndpoint as Endpoint>::root_modules failed
- Execution of PageEndpoint::internal_ssr_chunk_module failed
- Execution of PagesProject::ssr_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some("called `Result::unwrap()` on an `Err` value: Invalid argument type")]

  312 |       ) {
  313 |         return reject(
> 314 |           new Error(
      |           ^
  315 |             `command failed with code ${code} signal ${signal}\n${mergedStdio}`
  316 |           )
  317 |         )

  at ChildProcess.<anonymous> (lib/next-test-utils.ts:314:11)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/amp-export-validation/test/index.test.js (turbopack)

  • AMP Validation on Export > production mode > should have shown errors during build
Expand output

● AMP Validation on Export › production mode › should have shown errors during build

expect(received).toMatch(expected)

Expected pattern: /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
Received string:  "   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   ▲ Next.js 15.2.0-canary.25 (Turbopack)·
   Checking validity of types ...
   Creating an optimized production build ...
   Loading config from /root/actions-runner/_work/next.js/next.js/test/integration/amp-export-validation/next.config.js
   Building (0/7) ...
   Building (1/7)··
   Building (3/7)··
   Building (5/7)··
 ✓ Building (7/7)
 ⚠ Linting is disabled.
FATAL: An unexpected Turbopack error occurred:
Panic: panicked at /root/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks/src/native_function.rs:54:18:
called `Result::unwrap()` on an `Err` value: Invalid argument type
Backtrace:    0: next_swc_napi::init::{closure#0}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: <turbo_tasks::native_function::ArgMeta>::new::downcast::<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>
   8: <<turbo_tasks::native_function::ArgMeta>::new<(turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>,)>::{closure#0} as core::ops::function::FnOnce<(&dyn turbo_tasks::magic_any::MagicAny,)>>::call_once
   9: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::dynamic_call
  10: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::trait_call
  11: <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>> as turbo_tasks::manager::TurboTasksCallApi>::trait_call
  12: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::with::<turbo_tasks::manager::with_turbo_tasks<turbo_tasks::raw_vc::RawVc, turbo_tasks::manager::trait_call::{closure#0}>::{closure#0}, turbo_tasks::raw_vc::RawVc>
  13: turbo_tasks::manager::trait_call
  14: <alloc::boxed::Box<dyn turbopack_core::resolve::plugin::BeforeResolvePlugin> as turbopack_core::resolve::plugin::BeforeResolvePlugin>::before_resolve
  15: turbopack_core::resolve::handle_before_resolve_plugins::{closure#0}::{closure#0}
  16: <tracing::instrument::Instrumented<turbopack_core::resolve::resolve_inline::{closure#0}::{closure#0}> as core::future::future::Future>::poll
  17: <turbopack_core::resolve::resolve_turbo_tasks_function_inline as turbo_tasks::task::function::TaskFnInputFunction<turbo_tasks::task::function::AsyncFunctionMode, (turbo_tasks::vc::Vc<turbo_tasks_fs::FileSystemPath>, turbo_tasks::value::Value<turbopack_core::reference_type::ReferenceType>, turbo_tasks::vc::Vc<turbopack_core::resolve::parse::Request>, turbo_tasks::vc::Vc<turbopack_core::resolve::options::ResolveOptions>)>>::functor::{closure#0}
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>> as core::future::future::Future>::poll
  19: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::mutex::Mutex<(core::time::Duration, usize, usize)>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>>
  20: <turbo_tasks::capture_future::CaptureFuture<core::result::Result<core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>, alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>, futures_util::future::future::catch_unwind::CatchUnwind<core::panic::unwind_safe::AssertUnwindSafe<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<turbo_tasks::raw_vc::RawVc, anyhow::Error>> + core::marker::Send>>>>> as core::future::future::Future>::poll
  21: <tracing::instrument::Instrumented<<turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}::{closure#0}> as core::future::future::Future>::poll
  22: <tokio::task::task_local::LocalKey<turbo_tasks::manager::CurrentLocalTaskState>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  23: <tokio::task::task_local::LocalKey<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<std::sync::rwlock::RwLock<turbo_tasks::manager::CurrentGlobalTaskState>>, tokio::task::task_local::TaskLocalFuture<turbo_tasks::manager::CurrentLocalTaskState, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}::{closure#1}>> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<bool>>>
  24: <tokio::task::task_local::LocalKey<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>>>::scope_inner::<<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}> as core::future::future::Future>::poll::{closure#0}, core::option::Option<core::task::poll::Poll<core::result::Result<(), anyhow::Error>>>>
  25: <tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>> as core::future::future::Future>::poll
  26: <tokio::runtime::task::core::Core<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread_alt::handle::Handle>>>::poll
  27: tokio::runtime::task::harness::poll_future::<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>
  28: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll_inner
  29: <tokio::runtime::task::harness::Harness<tracing::instrument::Instrumented<tokio::task::task_local::TaskLocalFuture<alloc::sync::Arc<dyn turbo_tasks::manager::TurboTasksApi>, <turbo_tasks::manager::TurboTasks<turbo_tasks_backend::backend::TurboTasksBackend<turbo_tasks_backend::kv_backing_storage::KeyValueDatabaseBackingStorage<turbo_tasks_backend::database::noop_kv::NoopKvDb>>>>::schedule::{closure#0}>>, alloc::sync::Arc<tokio::runtime::scheduler::multi_thread::handle::Handle>>>::poll
  30: <tokio::runtime::scheduler::multi_thread::worker::Context>::run_task
  31: <tokio::runtime::scheduler::multi_thread::worker::Context>::run
  32: <tokio::runtime::context::scoped::Scoped<tokio::runtime::scheduler::Context>>::set::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}::{closure#0}, ()>
  33: tokio::runtime::context::runtime::enter_runtime::<tokio::runtime::scheduler::multi_thread::worker::run::{closure#0}, ()>
  34: tokio::runtime::scheduler::multi_thread::worker::run
  35: <tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}> as core::future::future::Future>::poll
  36: <tokio::runtime::task::core::Core<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll
  37: tokio::runtime::task::harness::poll_future::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  38: <tokio::runtime::task::harness::Harness<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>>::poll_inner
  39: tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<tokio::runtime::scheduler::multi_thread::worker::Launch>::launch::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
  40: <tokio::runtime::blocking::pool::Inner>::run
  41: std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: <unknown>
  45: <unknown>··
> Build error occurred
[Error [TurbopackInternalError]: Failed to write page endpoint /_app·
Caused by:
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")·
Debug info:
- Execution of TaskId { id: 2147483652 } transient failed
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <PageEndpoint as Endpoint>::output failed
- Failed to write page endpoint /_app
- Execution of PageEndpoint::output failed
- Execution of PageEndpoint::client_chunks failed
- Execution of Project::client_chunking_context failed
- Execution of Project::module_id_strategy failed
- Execution of Project::whole_app_module_graphs failed
- Execution of whole_app_module_graph_operation failed
- Execution of Project::get_all_entries failed
- Execution of <PageEndpoint as Endpoint>::root_modules failed
- Execution of PageEndpoint::internal_ssr_chunk_module failed
- Execution of PagesProject::ssr_module_context failed
- Execution of PagesProject::transitions failed
- Execution of PagesProject::client_transition failed
- Execution of get_client_module_options_context failed
- Execution of get_jsx_transform_options failed
- Execution of assert_can_resolve_react_refresh failed
- Panic in resolve: Some(\"called `Result::unwrap()` on an `Err` value: Invalid argument type\")]
"

  26 |
  27 |       it('should have shown errors during build', async () => {
> 28 |         expect(buildOutput).toMatch(
     |                             ^
  29 |           /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
  30 |         )
  31 |         expect(existsSync(outDir)).toBeFalse()

  at Object.toMatch (integration/amp-export-validation/test/index.test.js:28:29)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/async-component-preload/async-component-preload.test.ts (turbopack)

  • async-component-preload > should handle redirect in an async page
Expand output

● async-component-preload › should handle redirect in an async page

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

Read more about building and testing Next.js in contributing.md.

pnpm test-start-turbo test/e2e/app-dir/actions-revalidate-remount/actions-revalidate-remount.test.ts (turbopack)

  • actions-revalidate-remount > should not remount the page + loading component when revalidating
Expand output

● actions-revalidate-remount › should not remount the page + loading component when revalidating

next build failed with code/signal 1

   98 |           if (code || signal)
   99 |             reject(
> 100 |               new Error(`next build failed with code/signal ${code || signal}`)
      |               ^
  101 |             )
  102 |           else resolve()
  103 |         })

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:100:15)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/development/next-config-ts/turbo/index.test.ts

  • next-config-ts - turbopack > should work with Turbopack
Expand output

● next-config-ts - turbopack › should work with Turbopack

expect(received).toBe(expected) // Object.is equality

Expected: "foo"
Received: ""

   9 |   it('should work with Turbopack', async () => {
  10 |     const $ = await next.render$('/')
> 11 |     expect($('p').text()).toBe('foo')
     |                           ^
  12 |   })
  13 | })
  14 |

  at Object.toBe (development/next-config-ts/turbo/index.test.ts:11:27)

Read more about building and testing Next.js in contributing.md.

__NEXT_EXPERIMENTAL_PPR=true pnpm test-dev test/development/app-dir/error-overlay/async-client-component/async-client-component.test.ts (PPR)

  • app-dir - async-client-component > app router client component async module
Expand output

● app-dir - async-client-component › app router client component async module

No Redbox to open.

  23 |     const browser = await next.browser('/client')
  24 |
> 25 |     await openRedbox(browser)
     |     ^
  26 |
  27 |     const description = await getRedboxDescription(browser)
  28 |     const componentStack = await getStackFramesContent(browser)

  at Object.<anonymous> (development/app-dir/error-overlay/async-client-component/async-client-component.test.ts:25:5)

Cause:
elementHandle.click: Element is not attached to the DOM
Call log:
  - attempting click action
  -   waiting for element to be visible, enabled and stable

  394 |   click() {
  395 |     return this.chain((el: ElementHandleExt) => {
> 396 |       return el.click().then(() => el)
      |                 ^
  397 |     })
  398 |   }
  399 |

  at click (lib/browsers/playwright.ts:396:17)
  at openRedbox (lib/next-test-utils.ts:913:7)
  at Object.<anonymous> (development/app-dir/error-overlay/async-client-component/async-client-component.test.ts:25:5)
  at Proxy.chain (lib/browsers/base.ts:17:23)
  at Proxy.chain (lib/browsers/playwright.ts:395:17)
  at click (lib/next-test-utils.ts:913:63)
  at Object.<anonymous> (development/app-dir/error-overlay/async-client-component/async-client-component.test.ts:25:5)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev-turbo test/development/acceptance-app/version-staleness.test.ts (turbopack)

  • Error Overlay version staleness > should show version staleness in runtime error
  • Error Overlay version staleness > should show version staleness in render error
  • Error Overlay version staleness > should show version staleness in build error
Expand output

● Error Overlay version staleness › should show version staleness in runtime error

Application is in inconsistent state: timeout.

  93 |             }
  94 |             if (status !== 'pending') {
> 95 |               throw new Error(
     |                     ^
  96 |                 `Application is in inconsistent state: ${status}.`
  97 |               )
  98 |             }

  at Object.patch (lib/development-sandbox.ts:95:21)
  at Object.<anonymous> (development/acceptance-app/version-staleness.test.ts:34:5)

● Error Overlay version staleness › should show version staleness in render error

Application is in inconsistent state: timeout.

  93 |             }
  94 |             if (status !== 'pending') {
> 95 |               throw new Error(
     |                     ^
  96 |                 `Application is in inconsistent state: ${status}.`
  97 |               )
  98 |             }

  at Object.patch (lib/development-sandbox.ts:95:21)
  at Object.<anonymous> (development/acceptance-app/version-staleness.test.ts:75:5)

● Error Overlay version staleness › should show version staleness in build error

Application is in inconsistent state: timeout.

  93 |             }
  94 |             if (status !== 'pending') {
> 95 |               throw new Error(
     |                     ^
  96 |                 `Application is in inconsistent state: ${status}.`
  97 |               )
  98 |             }

  at Object.patch (lib/development-sandbox.ts:95:21)
  at Object.<anonymous> (development/acceptance-app/version-staleness.test.ts:110:5)

Read more about building and testing Next.js in contributing.md.

@bgw bgw marked this pull request as ready for review January 24, 2025 15:26
@bgw bgw marked this pull request as draft January 24, 2025 15:26
@bgw bgw force-pushed the bgw/fn-local-option branch from a7429b6 to 40fd0db Compare January 24, 2025 16:30
@bgw bgw force-pushed the bgw/filter-unused-args branch from 4dcf00f to f22bdcd Compare January 24, 2025 16:30
@ijjk
Copy link
Member

ijjk commented Jan 24, 2025

Stats from current PR

Default Build (Increase detected ⚠️)
General
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
buildDuration 18.4s 16.1s N/A
buildDurationCached 15.3s 13.2s N/A
nodeModulesSize 419 MB 419 MB
nextStartRea..uration (ms) 426ms 424ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
5306-HASH.js gzip 54.1 kB 54.1 kB N/A
8276.HASH.js gzip 169 B 168 B N/A
8377-HASH.js gzip 5.46 kB 5.46 kB N/A
bccd1874-HASH.js gzip 52.9 kB 52.9 kB N/A
framework-HASH.js gzip 57.5 kB 57.5 kB N/A
main-app-HASH.js gzip 240 B 242 B N/A
main-HASH.js gzip 34.6 kB 34.6 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 0 B 0 B
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
_app-HASH.js gzip 193 B 193 B
_error-HASH.js gzip 193 B 193 B
amp-HASH.js gzip 512 B 510 B N/A
css-HASH.js gzip 343 B 342 B N/A
dynamic-HASH.js gzip 1.84 kB 1.84 kB
edge-ssr-HASH.js gzip 265 B 265 B
head-HASH.js gzip 363 B 362 B N/A
hooks-HASH.js gzip 393 B 392 B N/A
image-HASH.js gzip 4.59 kB 4.58 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.35 kB 2.35 kB N/A
routerDirect..HASH.js gzip 328 B 328 B
script-HASH.js gzip 397 B 397 B
withRouter-HASH.js gzip 323 B 326 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 3.59 kB 3.59 kB
Client Build Manifests
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
_buildManifest.js gzip 748 B 747 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
index.html gzip 523 B 523 B
link.html gzip 538 B 539 B N/A
withRouter.html gzip 518 B 521 B N/A
Overall change 523 B 523 B
Edge SSR bundle Size
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
edge-ssr.js gzip 129 kB 129 kB N/A
page.js gzip 210 kB 210 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
middleware-b..fest.js gzip 671 B 665 B N/A
middleware-r..fest.js gzip 155 B 156 B N/A
middleware.js gzip 31.3 kB 31.3 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 844 B 844 B
Next Runtimes
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
274-experime...dev.js gzip 322 B 322 B
274.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 378 kB 378 kB
app-page-exp..prod.js gzip 132 kB 132 kB
app-page-tur..prod.js gzip 145 kB 145 kB
app-page-tur..prod.js gzip 141 kB 141 kB
app-page.run...dev.js gzip 365 kB 365 kB
app-page.run..prod.js gzip 128 kB 128 kB
app-route-ex...dev.js gzip 37.6 kB 37.6 kB
app-route-ex..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.6 kB 25.6 kB
app-route-tu..prod.js gzip 25.4 kB 25.4 kB
app-route.ru...dev.js gzip 39.2 kB 39.2 kB
app-route.ru..prod.js gzip 25.4 kB 25.4 kB
pages-api-tu..prod.js gzip 9.69 kB 9.69 kB
pages-api.ru...dev.js gzip 11.6 kB 11.6 kB
pages-api.ru..prod.js gzip 9.68 kB 9.68 kB
pages-turbo...prod.js gzip 21.9 kB 21.9 kB
pages.runtim...dev.js gzip 27.7 kB 27.7 kB
pages.runtim..prod.js gzip 21.9 kB 21.9 kB
server.runti..prod.js gzip 916 kB 916 kB
Overall change 2.49 MB 2.49 MB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js bgw/filter-unused-args Change
0.pack gzip 2.1 MB 2.1 MB ⚠️ +294 B
index.pack gzip 75.1 kB 75.5 kB ⚠️ +427 B
Overall change 2.18 MB 2.18 MB ⚠️ +721 B
Diff details
Diff for main-HASH.js

Diff too large to display

Commit: 25ef396

@bgw bgw force-pushed the bgw/fn-local-option branch from 40fd0db to 2a987b0 Compare January 24, 2025 17:46
@bgw bgw force-pushed the bgw/filter-unused-args branch from f22bdcd to 28e47be Compare January 24, 2025 17:46
@bgw bgw force-pushed the bgw/fn-local-option branch from 2a987b0 to dd12daa Compare January 24, 2025 18:33
@bgw bgw force-pushed the bgw/filter-unused-args branch from 28e47be to 25ef396 Compare January 24, 2025 18:34
@bgw bgw force-pushed the bgw/fn-local-option branch 2 times, most recently from 51a826a to 35fc3ed Compare January 24, 2025 19:18
@bgw bgw force-pushed the bgw/filter-unused-args branch from 25ef396 to c8519e8 Compare January 24, 2025 19:18
@bgw bgw force-pushed the bgw/fn-local-option branch from 35fc3ed to 0151e49 Compare January 24, 2025 19:24
@bgw bgw force-pushed the bgw/filter-unused-args branch from c8519e8 to 5c57296 Compare January 24, 2025 19:24
@bgw bgw force-pushed the bgw/fn-local-option branch from 0151e49 to 0c17996 Compare January 24, 2025 22:05
@bgw bgw changed the base branch from bgw/fn-local-option to graphite-base/75261 January 24, 2025 22:29
@bgw bgw force-pushed the bgw/filter-unused-args branch from 5c57296 to 3e43193 Compare January 24, 2025 22:31
@bgw bgw force-pushed the graphite-base/75261 branch from 0c17996 to 7578b8f Compare January 24, 2025 22:31
@bgw bgw changed the base branch from graphite-base/75261 to canary January 24, 2025 22:31
@bgw bgw force-pushed the bgw/filter-unused-args branch from 3e43193 to 3b47071 Compare January 24, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Turbopack team PRs by the Turbopack team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants