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

<package-name>: <summary> xiaomi ax3600 luci-app-attendedsysupgrade (24.10.0) error #7687

Open
1 task done
migueldeblas opened this issue Mar 18, 2025 · 10 comments
Open
1 task done

Comments

@migueldeblas
Copy link

Is there an existing issue for this?

  • I have searched among all existing issues (including closed issues)

screenshots or captures

Error in luci-app-attendedsysupgrade
I have a Xiaomi AX3600 IoT
When I try to upgrade (attendedsysupgrade) from 23.05.5. to 24.10.0 Luci does not work.

The navigation console error:

Image

Actual behaviour

When I try to upgrade (attendedsysupgrade) from 23.05.5. to 24.10.0
Luci does not work and does not show any message or error.

Expected behaviour

Generates the firmware and shows a message or error.

Steps to reproduce

Luci > System > Attended Sysupgrade > Search for firmware upgrade >
Select firmware version: 24.10.0
Board Name / Profile: xiaomi,ax3600
Click "Request firmware image"

Additional Information

{
        "kernel": "5.15.167",
        "hostname": "AX3600",
        "system": "ARMv8 Processor rev 4",
        "model": "Xiaomi AX3600",
        "board_name": "xiaomi,ax3600",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "ipq807x/generic",
                "description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
        }
}

What browsers do you see the problem on?

No response

Relevant log output

@systemcrash
Copy link
Contributor

Have you updated sysupgrade first?

@migueldeblas
Copy link
Author

Yes, All packages upgraded (via Luci).

@systemcrash
Copy link
Contributor

@efahl does this look like something you recognise?

@efahl
Copy link
Contributor

efahl commented Mar 19, 2025

Yes, I'll take a look.

@efahl
Copy link
Contributor

efahl commented Mar 19, 2025

Displayed error is due to insufficient error handling right here: https://github.com/openwrt/luci/blob/master/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js#L101 . I'll fix both of those functions to be a bit more robust.

$ curl -s https://sysupgrade.openwrt.org/api/v1/revision/24.10.0/ipq807x/generic
{"detail":"Failed to fetch revision for 24.10.0/ipq807x/generic","status":404}

$ curl -s https://sysupgrade.openwrt.org/api/v1/revision/24.10.0/x86/64
{"revision":"r28427-6df0e3d02a"}

@migueldeblas The root cause is that the ipq807x target has been renamed qualcommax, so LuCI ASU will not work for this specific cross-version upgrade on this specific platform. I suggest you use https://firmware-selector.openwrt.org/?version=24.10.0&target=qualcommax%2Fipq807x&id=xiaomi_ax3600 for this upgrade... Once you cross the 23.05->24.10 boundary, the ASU clients should work fine.

@systemcrash
Copy link
Contributor

Seems like target renames should be tracked in general somewhere server-side, as some kind of re-direct?

@efahl
Copy link
Contributor

efahl commented Mar 19, 2025

Yeah, it's sort of like the package_changes stuff, but I think you're right, we could do it automatically on the ASU server. It would reside in https://github.com/openwrt/asu/blob/main/asu/config.py in the branch info, I'll take a look at it once I get the error handling done.

While I've got you, does this look like a reasonable/proper way to implement the error handling? I feel like a noob with this newfangled JS stuff, I haven't used it much for like 20 years. (Might have bugs, I haven't even tried to test it yet, I'm more interested in structure and making it look right to a "real" JS programmer.)

		await Promise.all([
			request.get(overview_url)
				.then(response => response.json())
				.then(json => json.branches)
				.then(branches => branches[get_branch(version)])
				.then(branch => { changes = branch.package_changes; })
				.catch(error => { ui.addNotification(null, E('p', _(`Get overview failed ${error}`))); }),

			request.get(revision_url)
				.then(response => response.json())
				.then(json => json.revision)
				.then(revision => { target_revision = get_revision_count(revision); })
				.catch(error => { ui.addNotification(null, E('p', _(`Get revision failed ${error}`))); }),
		]);

@efahl
Copy link
Contributor

efahl commented Mar 19, 2025

"ipq807x/generic" with "ipq807x/qualcommax"

I believe it should be qualcommax/ipq807x as in

https://downloads.openwrt.org/releases/24.10.0/targets/qualcommax/ipq807x/

@systemcrash
Copy link
Contributor

does this look like a reasonable/proper way to implement the error handling?

		await Promise.all([
...
		]);

Seems reasonable.

efahl added a commit to efahl/luci that referenced this issue Mar 19, 2025
Check various aspects of the overview and revision downloads from
the sysupgrade site, giving the user better error messages when
things go wrong.

Partially addresses issue openwrt#7687 with respect to diagnosis, but not
root cause.

Signed-off-by: Eric Fahlgren <[email protected]>
efahl added a commit to efahl/luci that referenced this issue Mar 20, 2025
Check various aspects of the overview and revision downloads from
the sysupgrade site, giving the user better error messages when
things go wrong.

Partially addresses issue openwrt#7687 with respect to diagnosis, but not
root cause.

Signed-off-by: Eric Fahlgren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants