Skip to content

Uncaught (in promise) TypeError: Failed to fetch #106

@Nanorithm

Description

@Nanorithm

Describe the bug
It seems that I get a console error when ever I click an action within the menu. Sometimes it is one error, other times it is multiple errors.

To Reproduce
Steps to reproduce the behavior:

  1. Open ps-adminmenu
  2. Go to 'Actions' tab
  3. Select any action (possibly the same action multiple times)
  4. Error pops up in F8 menu

Screenshots
image

Additional context
For reference, when I was using the menu, I specifically was using the "Toggle Laser" action.

I un-minified the code to narrow the error and it seems to be coming from this snippet here: ps-adminmenu/html/index.js line 630

async function fe(n, e = {}, l) {
	if ((Ot == !0 && l) || Ot == !0) return Promise.resolve(l || {});
	const t = {
			method: "post",
			headers: { "Content-Type": "application/json; charset=UTF-8" },
			body: JSON.stringify(e),
		},
		r = window.GetParentResourceName ? window.GetParentResourceName() : Nn;
	return await (await fetch(`https://${r}/${n}`, t)).json();
}

where line 630 is the return await (await fetch(`https://${r}/${n}`, t)).json();

I'm guessing whatever URL its generating isn't returning anything causing an error to be thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions