Skip to content

[Question]: #565

Description

@ZOUYAN1117

Do you need to ask a question?

  • I have searched the existing questions and discussions and this question is not already answered.
  • I believe this is a legitimate question, not just a bug or feature request.

Your Question

在设置伙伴的时候无法正常保存

Related Module

Frontend/Web

Additional Context

log:
backend INFO: 127.0.0.1:57417 - "GET /api/v1/knowledge/list HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:61462 - "GET /api/v1/settings/llm-options HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:52924 - "GET /api/v1/tools HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:60090 - "GET /api/v1/knowledge/list HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:52571 - "GET /api/v1/settings/llm-options HTTP/1.1" 200 OK
backend ERROR asyncio - Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
backend handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
backend INFO: 127.0.0.1:61462 - "GET /api/v1/tools HTTP/1.1" 200 OK
backend ERROR asyncio - Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
backend handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
backend INFO: 127.0.0.1:52571 - "GET /api/v1/tools HTTP/1.1" 200 OK
frontend GET /chat 200 in 269ms (next.js: 94ms, proxy.ts: 4ms, application-code: 171ms)
backend INFO: 127.0.0.1:57417 - "GET /api/v1/knowledge/list HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:60090 - "GET /api/v1/sessions?limit=50&offset=0 HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:57897 - "GET /api/v1/tools HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:60659 - "GET /api/v1/settings/llm-options HTTP/1.1" 200 OK
frontend GET /partners 200 in 100ms (next.js: 54ms, proxy.ts: 8ms, application-code: 38ms)
backend INFO: 127.0.0.1:63530 - "GET /api/v1/partners HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:62756 - "GET /api/v1/partners HTTP/1.1" 200 OK
frontend GET /partners/partner 200 in 517ms (next.js: 471ms, proxy.ts: 6ms, application-code: 40ms)
backend INFO: 127.0.0.1:62756 - "GET /api/v1/partners/partner HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:63530 - "GET /api/v1/partners/partner HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:63530 - "GET /api/v1/partners/partner/history?limit=60 HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:62756 - "GET /api/v1/partners/partner/history?limit=60 HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:62151 - "WebSocket /api/v1/partners/partner/ws" [accepted]
backend INFO: 127.0.0.1:62756 - "GET /api/v1/partners/channels/schema HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:63530 - "GET /api/v1/partners/channels/schema HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:65199 - "GET /api/v1/partners/partner?include_secrets=true HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:62756 - "GET /api/v1/partners/partner?include_secrets=true HTTP/1.1" 200 OK
backend INFO: 127.0.0.1:53456 - "OPTIONS /api/v1/partners/partner HTTP/1.1" 200 OK
frontend [browser] ⨯ unhandledRejection: TypeError: Failed to fetch
frontend at apiFetch (lib/api.ts:144:21)
frontend at save (components/partners/PartnerChannels.tsx:125:33)
frontend at onClick (components/partners/PartnerChannels.tsx:191:31)
frontend 142 | init?: RequestInit,
frontend 143 | ): Promise {
frontend > 144 | const res = await fetch(input, { credentials: "include", ...init });
frontend | ^
frontend 145 |
frontend 146 | if (res.status === 401 && AUTH_ENABLED && typeof window !== "undefined") {
frontend 147 | const next = encodeURIComponent(window.location.pathname);

网页控制台报错:
partner:1 Access to fetch at 'http://localhost:8001/api/v1/partners/partner' from origin 'http://localhost:3782' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response.
:8001/api/v1/partners/partner:1 Failed to load resource: net::ERR_FAILED
api.ts:144 Uncaught (in promise) TypeError: Failed to fetch
at apiFetch (api.ts:144:21)
at save (PartnerChannels.tsx:125:33)
at onClick (PartnerChannels.tsx:191:31)
at executeDispatch (react-dom-client.development.js:20610:9)
at runWithFiberInDEV (react-dom-client.development.js:986:30)
at processDispatchQueue (react-dom-client.development.js:20660:19)
at react-dom-client.development.js:21234:9
at batchedUpdates$1 (react-dom-client.development.js:3377:40)
at dispatchEventForPluginEventSystem (react-dom-client.development.js:20814:7)
at dispatchEvent (react-dom-client.development.js:25817:11)
at dispatchDiscreteEvent (react-dom-client.development.js:25785:11)

partner:1 Access to fetch at 'http://localhost:8001/api/v1/partners/partner' from origin 'http://localhost:3782' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response.
:8001/api/v1/partners/partner:1 Failed to load resource: net::ERR_FAILED
api.ts:144 Uncaught (in promise) TypeError: Failed to fetch
at apiFetch (api.ts:144:21)
at save (PartnerChannels.tsx:125:33)
at onClick (PartnerChannels.tsx:191:31)
at executeDispatch (react-dom-client.development.js:20610:9)
at runWithFiberInDEV (react-dom-client.development.js:986:30)
at processDispatchQueue (react-dom-client.development.js:20660:19)
at react-dom-client.development.js:21234:9
at batchedUpdates$1 (react-dom-client.development.js:3377:40)
at dispatchEventForPluginEventSystem (react-dom-client.development.js:20814:7)
at dispatchEvent (react-dom-client.development.js:25817:11)
at dispatchDiscreteEvent (react-dom-client.development.js:25785:11)

partner:1 Access to fetch at 'http://localhost:8001/api/v1/partners/partner' from origin 'http://localhost:3782' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response.
:8001/api/v1/partners/partner:1 Failed to load resource: net::ERR_FAILED
api.ts:144 Uncaught (in promise) TypeError: Failed to fetch
at apiFetch (api.ts:144:21)
at save (PartnerChannels.tsx:125:33)
at onClick (PartnerChannels.tsx:191:31)
at executeDispatch (react-dom-client.development.js:20610:9)
at runWithFiberInDEV (react-dom-client.development.js:986:30)
at processDispatchQueue (react-dom-client.development.js:20660:19)
at react-dom-client.development.js:21234:9
at batchedUpdates$1 (react-dom-client.development.js:3377:40)
at dispatchEventForPluginEventSystem (react-dom-client.development.js:20814:7)
at dispatchEvent (react-dom-client.development.js:25817:11)
at dispatchDiscreteEvent (react-dom-client.development.js:25785:11)

网络设置:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions