fix run fetch failed#199
Closed
labulakalia wants to merge 1 commit into
Closed
Conversation
Owner
|
Thanks! However, overwriting the global fetch could introduce other unexpected issues, so I'll fix it on the caller side instead. |
Contributor
Author
I use main branch , but it's not fix this problem |
Contributor
Author
this code is work this code is not work |
Owner
|
I recognize that it is necessary to explicitly distinguish between calling the global fetch and the service bindings fetch when implementing the Go side. It seems that the previous patch broke the global fetch while fixing the service bindings fetch. I plan to implement the code in a way that distinguishes between the two so that both can be supported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
panic: JavaScript error: Illegal invocation: function called with incorrect
thisreference. See https://developers.cloudflare.com/workers/observability/errors/#illegal-invocation-errors for details.goroutine 10 [running]:
syscall/js.Value.Call({{}, 0x7ff8000100000005, 0x0}, {0x5d3f2, 0x5}, {0x493dd8, 0x2, 0x2})
/home/labulakalia/sdk/go/src/syscall/js/js.go:443 +0x3b
github.com/syumai/workers/cloudflare/fetch.fetch({{}, 0x7ff8000100000005, 0x0}, 0x48c280, 0x493e60)
/home/labulakalia/go/pkg/mod/github.com/syumai/workers@v0.32.0/cloudflare/fetch/bind.go:18 +0x7
github.com/syumai/workers/cloudflare/fetch.(*Client).Do(...)
/home/labulakalia/go/pkg/mod/github.com/syumai/workers@v0.32.0/cloudflare/fetch/http.go:29
main.main.func1({0x9dd50, 0x482190}, 0x48c140)
/home/labulakalia/workspace/testworker/main.go:23 +0x10
net/http.HandlerFunc.ServeHTTP(0x6a698, {0x9dd50, 0x482190}, 0x48c140)
/home/labulakalia/sdk/go/src/net/http/server.go:2322 +0x4
net/http.(*ServeMux).ServeHTTP(0x2a7da0, {0x9dd50, 0x482190}, 0x48c140)
/home/labulakalia/sdk/go/src/net/http/server.go:2861 +0x2e
github.com/syumai/workers.handleRequest.func1()
/home/labulakalia/go/pkg/mod/github.com/syumai/workers@v0.32.0/handler_js.go:81 +0x4
created by github.com/syumai/workers.handleRequest in goroutine 9
/home/labulakalia/go/pkg/mod/github.com/syumai/workers@v0.32.0/handler_js.go:78 +0x29
illegal-invocation