Fetch + service bindings = internal error

I have a worker running, and a pages project that calls that worker through a service binding. When that worker is called (as of a couple days ago) any calls to fetch() throw internal error with no additional stack trace or info. However, when I call that same worker not using a service binding, it works fine.

                                        v Error here
[site] – sb → [worker] – fetch → [other API] :x:
[site] – fetch → [worker] – fetch → [other API] :white_check_mark:

Sample:

await fetch('https://google.com');

I tried:

I thought maybe the lack of standard headers might’ve been part of the issue, so I copied some headers from a fetch request into the sb request, but that didn’t help.

1 Like

Can you share your deployment ID please?

499c3e3f-a15b-4e93-8177-258136bffc67

it’s not accessible right now without authentication. I can set up something simple later, if that helps.

I can’t find any deployments with this UUID, what’s the pages.dev?

Sorry,
pvp-legacy-api.aoelite.workers dot dev/ ← throwing the error
880414bd.kit-viewer-v2.pages dot dev/4JWJO ← calls above

i have the same issue

worker : 17fdbb1e-303d-4576-a4e1-ab9152457e4a
page : 377ee882-0401-4317-9b08-ee11926abf27

route /auth/login_callback, it work only acess direct to worker
error internal when via service binding from pages

Same here, simple pages service binding reqwest::get in router throw “internal error”

How old is your deploy? If you redeploy, does it resolve the issue?

Just deploy a sec ago. I redeploy for 10 time today try to figure this out and gave up then i found this issue after search.

Can you share your pages.dev, a deployment UUID, and your account ID please?

https://gist.rs/hello/test
https://49150712.gist-rs.pages.dev/hello/test

Current Deployment ID: a93edc7e-86cc-42ba-ade8-ff324fea2f2d
Account ID: 7e11517c4dd4f6e9cede7da9b60d66eb

rust: gist-rs/lib.rs at main · gist-rs/gist-rs · GitHub
called from: gist-rs/[test].ts at main · gist-rs/gist-rs · GitHub

Connected to deployment 49150712-76c6-417f-82e3-fd5caa55f0db, waiting for logs...
GET https://gist.rs/hello/test - Exception Thrown @ 1/12/2023, 6:51:44 PM
✘ [ERROR]   Error: The script will never generate a response.


GET https://gist.rs/hello/test - Exception Thrown @ 1/12/2023, 6:51:44 PM
  (log) Thu Jan 12 2023 11:51:44 GMT+0000 (Coordinated Universal Time) - [/hello/test], located at: (13.7063, 100.4597), within: Bangkok
  (error) panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, source: "JsValue(Error: internal error\nError: internal error\n    at Wt (shim.js:492:16)\n    at wasm://wasm/002171de:wasm-function[464]:0x34217\n    at wasm://wasm/002171de:wasm-function[90]:0xad2f\n    at wasm://wasm/002171de:wasm-function[295]:0x2b1e8\n    at wasm://wasm/002171de:wasm-function[262]:0x28b44\n    at wasm://wasm/002171de:wasm-function[164]:0x1e661\n    at wasm://wasm/002171de:wasm-function[93]:0xce38\n    at wasm://wasm/002171de:wasm-function[171]:0x1f72e\n    at wasm://wasm/002171de:wasm-function[173]:0x1fada\n    at wasm://wasm/002171de:wasm-function[428]:0x3295d)" }', src/lib.rs:42:18

Stack:

Error
    at Z (shim.js:304:11)
    at wasm://wasm/002171de:wasm-function[300]:0x2b737
    at wasm://wasm/002171de:wasm-function[1659]:0x46b29
    at wasm://wasm/002171de:wasm-function[394]:0x30fe3
    at wasm://wasm/002171de:wasm-function[511]:0x35eeb
    at wasm://wasm/002171de:wasm-function[1224]:0x43f8e
    at wasm://wasm/002171de:wasm-function[797]:0x3dace
    at wasm://wasm/002171de:wasm-function[1059]:0x41fe7
    at wasm://wasm/002171de:wasm-function[595]:0x38bbf
    at wasm://wasm/002171de:wasm-function[164]:0x1e84e


✘ [ERROR]   Error: The script will never generate a response.

Thanks

Thanks, I’ve passed this along for someone to look at when they are able.

I’m unable to see any errors for that account ID on our end and it doesn’t match the account ID for that zone so I’m unable to verify or lookup errors for that owner.

Are you sure they are the right details?

1 Like

Not sure this is account id you mean?

This is just now

I filed a bug here, not sure any update on this?