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

Face Swap error - uncaughtException: Error: Unexpected server response: 403 #252

Open
glbrtjose opened this issue Jan 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@glbrtjose
Copy link

glbrtjose commented Jan 5, 2024

the code that reproduces this issue or a replay of the bug

const client = new Midjourney({
ServerId: process.env.SERVER_ID,
ChannelId: process.env.CHANNEL_ID,
SalaiToken: process.env.SALAI_TOKEN,
Debug: true,
HuggingFaceToken: process.env.HUGGINGFACE_TOKEN,
});
await client.Connect();
const source = "https://cdn.discordapp.com/attachments/1107965981839605792/1129362418775113789/3829c5d7-3e7e-473c-9c7b-b858e3ec97bc.jpeg";
const target = "https://cdn.discordapp.com/attachments/1108587422389899304/1129321837042602016/guapitu006_a_girls_face_with_david_bowies_thunderbolt_71ee5899-bd45-4fc4-8c9d-92f19ddb0a03.png";
const info = await client.FaceSwap(target, source);

Describe the bug

Describe the bug
When executing the method FaceSwap, it returns the following message

error - node_modules/ws/lib/websocket.js (896:6) @ abortHandshake
error - uncaughtException: Error: Unexpected server response: 403
at ClientRequest.eval (webpack-internal:///(sc_server)/./node_modules/ws/lib/websocket.js:706:13)
at ClientRequest.emit (node:events:511:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:535:22)
at TLSSocket.emit (node:events:511:28)
at addChunk (node:internal/streams/readable:332:12)
at readableAddChunk (node:internal/streams/readable:305:9)
at Readable.push (node:internal/streams/readable:242:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)
null

Expected behavior
It should return the uri inside an object

Screenshots
If applicable, add screenshots to help explain your problem.

error log

error - node_modules/ws/lib/websocket.js (896:6) @ abortHandshake
error - uncaughtException: Error: Unexpected server response: 403
at ClientRequest.eval (webpack-internal:///(sc_server)/./node_modules/ws/lib/websocket.js:706:13)
at ClientRequest.emit (node:events:511:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:535:22)
at TLSSocket.emit (node:events:511:28)
at addChunk (node:internal/streams/readable:332:12)
at readableAddChunk (node:internal/streams/readable:305:9)
at Readable.push (node:internal/streams/readable:242:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)

@glbrtjose glbrtjose added the bug Something isn't working label Jan 5, 2024
@RoberBicho
Copy link

any change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants