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

Failed to get application_commands for command settings #255

Open
JoSanson opened this issue Feb 22, 2024 · 39 comments
Open

Failed to get application_commands for command settings #255

JoSanson opened this issue Feb 22, 2024 · 39 comments
Labels
bug Something isn't working

Comments

@JoSanson
Copy link

JoSanson commented Feb 22, 2024

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

Failed to get application_commands for command settings

Describe the bug

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

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

error log

Failed to get application_commands for command settings / RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0

I haven't changed anything in my code, I generated a new SALAI TOKEN and updated in my environment variables. Everything was working at 2:30 PM and it stopped working at 11:00 PM without any code updates. I just want to know if other people are having the same issue? Thank you in advance!

@JoSanson JoSanson added the bug Something isn't working label Feb 22, 2024
@ynonra
Copy link

ynonra commented Feb 22, 2024

yes, me too...

@faridulreza
Copy link

faridulreza commented Feb 22, 2024

same here. was working fine a moment ago.

@JoSanson
Copy link
Author

It doesn't smell very good... I don't want to panic, but considering that the project hasn't been updated in a while, if there have been any changes on discord's or midjourney's end, it might never be updated... Have you found any alternative solutions?

@stremblayiOS
Copy link

same issue here

@morganfuchs
Copy link

morganfuchs commented Feb 22, 2024

Me too...
allCommand() return empty result :
{ "applications": [], "application_commands": [], "cursor": { "previous": null, "next": null, "repaired": false } }

@Germey
Copy link

Germey commented Feb 23, 2024

Seems discord has deprecated this API due to some security reasons?

@mpakunderscore
Copy link

Same

@windjet
Copy link

windjet commented Feb 23, 2024

same

@deniska83
Copy link
Contributor

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

@E-toolmaster
Copy link

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

hi. Can you clarify how to fix it? I have tried installing the package, but the problem still hasn't been resolved.

@deniska83
Copy link
Contributor

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

hi. Can you clarify how to fix it? I have tried installing the package, but the problem still hasn't been resolved.

You should be using

import { Midjourney } from 'freezer-midjourney-api';

instead of

import { Midjourney } from 'midjourney';

For this particular problem to go away.

Remember to check the original package for a permanent fix!

@Jiancong
Copy link

Jiancong commented Feb 23, 2024

The discord api v9 seems give null response for "application_commands" now.

https://discord.com/api/v9/channels/1105325796748439578/application-commands/search?type=1&query=settings&limit=1&include_applications=true

{
"applications": [],
"application_commands": [],
"cursor": {
"previous": null,
"next": null,
"repaired": false
}
}

@Jiancong
Copy link

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

hi. Can you clarify how to fix it? I have tried installing the package, but the problem still hasn't been resolved.

You should be using

import { Midjourney } from 'freezer-midjourney-api';

instead of

import { Midjourney } from 'midjourney';

For this particular problem to go away.

Remember to check the original package for a permanent fix!

Thank you guys, this saves me.

@morganfuchs
Copy link

morganfuchs commented Feb 23, 2024

freezer-midjourney-api

A function has not been fixed...

getCommand(
...
    const url = `${this.config.DiscordBaseUrl}/api/v9/channels/${this.config.ChannelId}/application-commands/search?${searchParams}`;

@E-toolmaster
Copy link

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

hi. Can you clarify how to fix it? I have tried installing the package, but the problem still hasn't been resolved.

You should be using

import { Midjourney } from 'freezer-midjourney-api';

instead of

import { Midjourney } from 'midjourney';

For this particular problem to go away.

Remember to check the original package for a permanent fix!

Everything seems to be running, but I often encounter the error: ImagineApi failed with status 400. Do you have any experience with this error?

@JoSanson
Copy link
Author

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

Thank you @freezer71 ! 🚀

@jimmy-o
Copy link

jimmy-o commented Feb 23, 2024

Does Upscale command working for your guys? after applied @freezer71's fix, the imagine one is ok but I am still having issue with Upscale:

Error: CustomApi failed with status 404

@NatalieM11
Copy link

try this fix. it's working for me - https://github.com/erictik/midjourney-api/pull/256/files

@Ymjir
Copy link

Ymjir commented Feb 23, 2024

if someone still facing issues with upscale, variations etc can use this package for now https://www.npmjs.com/package/@ymjir/midjourney-api

use

import { Midjourney } from '@ymjir/midjourney-api';

instead of

import { Midjourney } from 'midjourney';

@artemptushkin
Copy link
Contributor

@NatalieM11 could you maybe update https://github.com/erictik/midjourney-ui with this, please? at least on feature branch

the library updates breaks stuff there

or anyone if you fix it in midjourney-ui please 🙏

zcpua added a commit that referenced this issue Feb 25, 2024
[fix] Failed to get application_commands for command settings issue #255
@buzuosheng
Copy link

try this fix. it's working for me - https://github.com/erictik/midjourney-api/pull/256/files

@NatalieM11 this pr was merged, and i updated to the latest 4.3.14, but it still dosen't work.

@Pepperoniii
Copy link

Now I get this.
v4.3.15
Has anyone had the same thing happen?
image

@Ymjir
Copy link

Ymjir commented Feb 26, 2024

@jimmy-o thanks for pointing out this issue, i can see that upscale on initial image is working, but when i tried to upscale an individual image, it's causing Error: CustomApi failed with status 404, you can use the client.Custom() function directly and pass the custom_id which you can get from options property of the result object, i can fix the issues later and create a pull request.

const Upscale = await client.Custom({
    customId: CUSTOM_ID,
    msgId: <string>Imagine.id,
    flags: Imagine.flags,
    loading: (uri: string, progress: string) => {
      console.log(progress)
    },
  });

@misakaikato
Copy link

same 😭

@KristiyanTs
Copy link

Same

@freezer71
Copy link

should work with that npm freezer-midjourney-api
with new version 4.0.6

@6leonardo
Copy link

doesn't work on init got "unxpected end of json input" i have tried with midjourney lib and also with freezer-midjourney-api

@freezer71
Copy link

can i see the code for the problem

@Pepperoniii
Copy link

Pepperoniii commented Mar 2, 2024

@freezer71
image
image

@freezer71
Copy link

@Pepperoniii
you should use 4.0.6 version of freezer-midjourney-api

@zongzi531
Copy link

@freezer71 Thanks, it's work for me. 👍

@Slushbanq
Copy link

@freezer71 your fork used to work but I am getting the same error with command settings right now

@Pepperoniii
Copy link

Pepperoniii commented Apr 3, 2024

@freezer71
Hello, i get it

изображение
Can you help me?

Same with midjourney lib
изображение

@snailcms
Copy link

snailcms commented Apr 3, 2024 via email

@artemptushkin
Copy link
Contributor

这是来自QQ邮箱的自动回复邮件。   您好,您发送的邮件已收到,我查看后会尽快给您回复。

This is an automatic reply email from QQ mailbox.
Hello, the email you sent has been received. I will reply to you as soon as possible after checking it.

:)


any update on the issue? I assume MJ servers based on this simply do not work but I have doubts given the level of activity - someone has it working

@vbruj
Copy link

vbruj commented Apr 30, 2024

After changing midjourney to freezer-midjourney-api I am facing this problem, is there a solution?

image

@snailcms
Copy link

snailcms commented Apr 30, 2024 via email

@akashbiztechcs
Copy link

akashbiztechcs commented May 14, 2024

I've opened a pull request with a provisional workaround. Meanwhile, @freezer71 has created interim npm package freezer-midjourney-api

hi. Can you clarify how to fix it? I have tried installing the package, but the problem still hasn't been resolved.

You should be using

import { Midjourney } from 'freezer-midjourney-api';

instead of

import { Midjourney } from 'midjourney';

For this particular problem to go away.

Remember to check the original package for a permanent fix!

I used this solution and it worked for me please check your SERVER_ID as well as CHANNEL_ID. Maybe that will be wrong.

Get both keys from URL
https://discord.com/channels//{**CHANNEL_ID**}/{**SERVER_ID**}

and SALAI_TOKEN from the discord network tab follow this SITE

@snailcms
Copy link

snailcms commented May 14, 2024 via email

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