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

Unexpected application error #1918

Closed
tonyj-suse opened this issue Jan 17, 2025 · 5 comments
Closed

Unexpected application error #1918

tonyj-suse opened this issue Jan 17, 2025 · 5 comments

Comments

@tonyj-suse
Copy link

tonyj-suse commented Jan 17, 2025

I suspect an issue with the JSON (which was convered by agama-autoyast) but what exactly is unclear.

Image

agama-logs-1737155520.tar.gz

Also this was a serial (PXE install). And at this point I'm seeing the "Welcome to Agama installer version 11! (ttyS1)" prompt on the serial console.

I booted with "linemode=1 Textmode=1" which are obviously linuxrc and likely irrelevant (sorry I know nothing about agama internals) but had I not opened the HTML5 console on the machines service-processor I would never have seen the above error.

How do you propose to handle unattended serial console installs that fail?

@tonyj-suse
Copy link
Author

I pared the json down (which was originally translated from XML by agama) to the following but issue still occurs.

If legacyAutoyastStorage is the issue can someone give me the translation into the new structure? I read the schema but lack the free cycles to really dig into it.

{
"localization": {
"keyboard": "us",
"languages": [
"en_US.UTF-8",
"en_US de_DE.UTF-8"
],
"timezone": "Europe/Berlin"
},
"product": {
"id": "SLES",
"registrationCode": "[redacted]"
},
"root": {
"password": "[redacted]"
"hashedPassword": true
},
"software": {
"patterns": [
"base",
"base_traditional",
"fips",
"hardware",
"minimal_base",
"selinux",
"sssd_ldap"
]
},
"legacyAutoyastStorage": [
{
"disklabel": "gpt",
"initialize": true,
"partitions": [
{
"filesystem": "vfat",
"format": true,
"label": "efi",
"mount": "/boot/efi",
"partition_nr": 1,
"size": "512MB"
},
{
"mount": "swap",
"partition_nr": 2,
"size": "auto"
},
{
"filesystem": "btrfs",
"format": true,
"label": "SLES",
"mount": "/",
"partition_nr": 3,
"size": "60%"
},
{
"filesystem": "ext4",
"format": true,
"label": "ABUILD",
"mount": "/abuild",
"partition_nr": 4,
"size": "max"
}
],
"use": "all"
}
]
}

@imobachgs
Copy link
Contributor

The logs show that the installation worked, although the UI crashed. I tried your profile, and it worked just fine for me. Initially, I thought it might be related to #1881. But checking the logs, the patch might already be available in the ISO you are trying.

Could you press F12 (in the browser) and send us a screenshot of the "console" tab, please? We need to check the error.

Perhaps @joseivanlopez or @ancorgs have a better idea.

To track progress in the serial console, we plan to include an agama monitor command that will give you the progress (and you should be able to answer any question/message, too). We are not there yet.

@imobachgs
Copy link
Contributor

No problem, I was able to reproduce the issue. The crash happens at the end of the installation only. Wrongly, I thought that the UI crash occurred from the beginning.

Image

@imobachgs
Copy link
Contributor

The problem seems to be here: https://github.com/agama-project/agama/blob/master/web/src/queries/storage.ts#L133. The query returns and object with the legacyAutoyastStorage key.

imobachgs added a commit that referenced this issue Jan 21, 2025
## Problem

When using the legacy AutoYaST mode, the web UI crashes at the end of
the installation when trying
to find our whether it is using TPM or not.

- #1918

## Solution

Properly handle that case:

* `fetchConfig` now returns `null` instead of `undefined`. According to
[TanStack Query

documentation](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery),
`queryFn`
*Must return a promise that will either resolve data or throw an error.
The data cannot be
undefined*.
* `usingTpm` function now handles the case where the configuration is
`null`.

## Testing

- *Tested manually*
@imobachgs
Copy link
Contributor

The problem is fixed with #1927. We will send this change to beta 1.

Thanks!

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

2 participants