Zypper broken, Repository has no alias defined

i think that it happen something after a zypper dup.

i have for every command of zypper the same result : unexpected exception Repository has no alias defined

Yast2 work but, i don’t have anymore repositories listed in repository tool management.

[zypp-core] Exception.cc(log):186 basecommand.cc(run):286 CAUGHT:   [|https://mirrorcache.opensuse.org/update/tumbleweed/] Repository has no alias defined.
[zypper] Zypper.h(setExitCode):161 setExitCode 1
[zypper] Zypper.h(setExitCode):161 setExitCode 1
[zypper] Zypper.cc(doCommand):677 Done 
[zypper] Zypper.cc(cleanup):729 START
[zypper] main.cc(~Bye):98 ===== Exiting main(1) =====
type or paste code here

After remove all repositories, repository tool manager and zypper work again but at the moment i begin to add the repositories, after the 2th or 3th, it is broken again

How are you adding the repos?

The alias is the file name for the repo. This suggests that there might be a formatting problem in your repo definition files.

example of script that work but if i edit in Yast2 the priority, playing with different repos, the crash come back:

zypper addrepo http://download.opensuse.org/tumbleweed/repo/oss/ OSS
zypper addrepo http://download.opensuse.org/tumbleweed/repo/non-oss/ NON-OSS
zypper addrepo http://download.opensuse.org/update/tumbleweed/ UPDATE

zypper addrepo https://download.opensuse.org/repositories/system:snappy/openSUSE_Tumbleweed/system:snappy.repo
zypper refresh
zypper install snapd

zypper addrepo https://download.opensuse.org/repositories/network:im:signal/openSUSE_Tumbleweed/network:im:signal.repo
zypper refresh
zypper install signal-desktop

zypper addrepo https://download.opensuse.org/repositories/hardware:razer/openSUSE_Tumbleweed/hardware:razer.repo
zypper refresh
zypper install openrazer-meta


rpm --import https://packages.microsoft.com/keys/microsoft.asc
zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode
zypper refresh
zypper install code


zypper addrepo  http://repo.vivaldi.com/archive/rpm/x86_64 vivaldi
zypper refresh

i have the impression that it is linked to libraries mess seen the output of zypper dup :
many libraries to change because of conflict on version of libreopenssl…

That’s invalid, missing whitespace that would make it valid. Either use valid syntax with zypper ar, or save the .repo file provided by the repo in /etc/zypp/repos.d/.

it does not change the fact that after a time, the error come back.

i reinitialize all stuff about repo, removing the files .repo, cleaning all, reinstall repo and updating but after a moment if i try again to update the os, the error come back.

Does the content of your razer repo file match exactly the content of this one:?
https://download.opensuse.org/repositories/hardware:/razer/openSUSE_Tumbleweed/hardware:razer.repo

@dahikino
I wonder while you are talking about your .repo files without ever showing them. Not even zypper lr -d listing was ever shown here.

I also wonder why nobody of the others participating here ever asked for you to provide facts. All above is based on story telling. Not something I would feel entitled to give advice upon.

But that is only me. :frowning_face:

1 Like

it’s only you, sure.

I explained yet that when the poblem occured, zypper does not work at all anymore, because first of all, it check the repo ant they seem to be corrupted.
so zypper lr -d and so on does crash

It just happen again, now adding KDE/Gnome .repo files in the /etc/zypp/repos.d folder.
Now i have to clean up again.

i was playing with priorities when it crash

reinstall all repo work, change priority make crash repo managment tool and zypper !

the script i use to reinstall all repo :

rm /etc/zypp/repos.d/*.*
zypper clean --all

zypper addrepo http://download.opensuse.org/tumbleweed/repo/oss/ OSS
zypper addrepo http://download.opensuse.org/tumbleweed/repo/non-oss/ NON-OSS
zypper addrepo http://download.opensuse.org/update/tumbleweed/ UPDATE

zypper addrepo https://download.opensuse.org/repositories/system:snappy/openSUSE_Tumbleweed/system:snappy.repo

zypper addrepo https://download.opensuse.org/repositories/network:im:signal/openSUSE_Tumbleweed/network:im:signal.repo

zypper addrepo https://download.opensuse.org/repositories/hardware:/razer/openSUSE_Tumbleweed/hardware:razer.repo

rpm --import https://packages.microsoft.com/keys/microsoft.asc
zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode

zypper addrepo  http://repo.vivaldi.com/archive/rpm/x86_64 vivaldi

zypper addrepo http://download.opensuse.org/repositories/M17N:/fonts/openSUSE_Tumbleweed Fonts
zypper addrepo http://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_Factory Qt5
zypper addrepo http://download.opensuse.org/repositories/GNOME:/Factory/openSUSE_Factory Gnome
zypper addrepo http://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Factory KDE_FrameWork5
zypper addrepo http://download.opensuse.org/repositories/KDE:/Extra/openSUSE_Tumbleweed KDE_Extra
zypper addrepo http://download.opensuse.org/repositories/KDE:/Applications/openSUSE_Factory_standard KDE_App

zypper install openrazer-meta
zypper install snapd
zypper install code
zypper install signal-desktop
zypper refresh

So, show you actual repo definition (file from /etc/zypp/repos.d) when this happens again.

I can only repeat what avidjaar and I already suggested:
Show

zypper lr-d

and

ls -l /etc/zypp/repos.d

and from the repo file that makes trouble

cat /etc/zypp/repos.d/<name>.repo

And of course specially of the latter before and after the action that you think breaks it.

We need a well documented problem description!

BEFORE :
via the script it add repos correectly, refresh without issue and install/update the apps with no crash !


AFTER :
2 updates of priorities in yast2 repo managment tools generate crash of the tool at closing it :


unexpected error :

@dahikino Hi, so your using mirrorsorcerer as well, maybe that is causing issues…

i think to remove it because of that :ok_hand:

What is the way to check the mirrorlist of repo, to obtain the fastest for my geo position ?

And it seems that the problem is with hardware-razor. So my question included (but you did not do that):

cat /etc/zypp/repos.d/hardware-razor.repo

before and after.

Also, all of the .repo files have changed at 14:20. Why?
Also, what are those .msbak file. I have never seem them.

But may be malcomllewis has a clue to this.

@hcvv the msbak files are created with this GitHub - Firstyear/mirrorsorcerer: Mirror Sorcerer tool to magically make OpenSUSE mirror sources more magic-er

before :

it is surelly the mirrorsorcerer that make crash changing the url of the repo