erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.65k stars 271 forks source link

Websocket doesn't work #183

Closed fatiherdogan01 closed 1 year ago

fatiherdogan01 commented 1 year ago

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

My use - package version 4.2.1

const client = new Midjourney({
      ServerId: '1128221341183647xxx',
      ChannelId: '1128221342345465xxx',
      SalaiToken: 'OTE1MTMzxxxxxxxxxx',
      Debug: __DEV__,
      Ws: true,
    });
    await client.Connect();
    const Imagine = await client.Imagine(finalPrompt, (uri: string, progress: string) => {
      console.log('uri: ', uri, 'progress: ', progress);
    });
    console.log({ Imagine });

Describe the bug

wsClient.once("ready" ... does not trigger and resolve and it doesn't continue

Screenshots src/midjourney.ts

Ekran Resmi 2023-07-11 18 19 13

error log

I don't have any logs.

fatiherdogan01 commented 1 year ago

My fault. I was using it in a React Native project. It works in Node.js project.