router icon indicating copy to clipboard operation
router copied to clipboard

Custom Router release builds are failing on Rust 1.78

Open shalearkane opened this issue 1 year ago • 0 comments

Describe the bug

Release builds of project created with

cargo-scaffold scaffold https://github.com/apollographql/router.git -r apollo-router-scaffold/templates/base -t main

when built with Rust 1.78 and ran by providing the demo supergraph schema (starstuff) is failing with these errors

shalearkane@shale ~/D/G/plugin> target/release/router --supergraph supergraph-schema.graphql 
2024-07-02T09:51:46.230653Z INFO  Apollo Router v1.49.1 // (c) Apollo Graph, Inc. // Licensed as ELv2 (https://go.apollo.dev/elv2)
2024-07-02T09:51:46.230691Z INFO  Anonymous usage data is gathered to inform Apollo product development.  See https://go.apollo.dev/o/privacy for details.
2024-07-02T09:51:46.417974Z WARN  an error happened in the worker runtime TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string
2024-07-02T09:51:46.418041Z WARN  plan_worker: an unknown error occurred TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string
2024-07-02T09:51:46.419899Z ERROR  panicked at /home/shalearkane/.cargo/registry/src/index.crates.io-6f17d22bba15001f/router-bridge-0.5.27+v2.8.1/src/worker.rs:104:38:
called `Result::unwrap()` on an `Err` value: TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string
    at send (worker.js:54:25)
    at run (worker.js:171:19)

To Reproduce

Set Rust version to the latest stable release using rustup default stable and then run

cargo-scaffold scaffold https://github.com/apollographql/router.git -r apollo-router-scaffold/templates/base -t main
cd starstuff
cargo build --release
target/release/router --supergraph supergraph-schema.graphql

Expected behavior

It should run as expected. This works fine though when built with Rust 1.76

Desktop (please complete the following information):

  • OS: Tested on both Linux (Ubuntu 22.04) and MacOS Sonoma
  • Version 1.49.1

shalearkane avatar Jul 02 '24 12:07 shalearkane