1
0
Fork
You've already forked MbEventS
0

cannot run in debug mode #2

Open
opened 2026年03月31日 14:24:50 +02:00 by bayang · 8 comments

I followed the setup instructions :

  • created a solution and a scraper inside
  • cloned MBEventS and MBEvents.UI just next to it (code from today 2026年03月31日)
  • updated the csproj file with content from setup instructions
  • copied provided minimal class methods to be implemented

When I launch mbEvents.Ui from within rider in debug mode it crashes at startup when parsing this url : avares://MbEvents.Ui/App.axaml

with error :

System.UriFormatException: Invalid URI: The Authority/Host could not be parsed.
 at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
 at System.Uri..ctor(String uriString)
 at CompiledAvaloniaXaml.XamlIlContext.Context`1..ctor(IServiceProvider, Object[], String)
 at MbEventS.Ui.App.!XamlIlPopulate(IServiceProvider, App) in /home/me/perso/AlcatrazScraper/MbEventS.Ui/App.axaml:line 1
 at MbEventS.Ui.App.!XamlIlPopulateTrampoline(App)
 at MbEventS.Ui.App.Initialize() in /home/me/perso/AlcatrazScraper/MbEventS.Ui/App.axaml.cs:line 15
 at Avalonia.AppBuilder.SetupUnsafe()
 at Avalonia.AppBuilder.Setup()
 at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
 at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
 at MbEventS.Ui.Program.Main(String[] args) in /home/me/perso/AlcatrazScraper/MbEventS.Ui/Program.cs:line 12

folders hierarchy is in screenshot
error from Rider IDE is in a screenshot as well

when I launch in normal mode (not debug) I can see the UI appear with my scraper listed in the scrapers section.
But when I click scrape nothing happens (I added some logging instructions to follow execution flow since I can't follow in debug mode with breakpoints, but none of my logging instructions is printed in the console)

my OS : fedora
dotnet install provided by Rider IDE v 10.0.201

I pushed the code here : https://codeberg.org/bayang/AlcatrazScraper

I followed the setup instructions : - created a solution and a scraper inside - cloned MBEventS and MBEvents.UI just next to it (code from today 2026年03月31日) - updated the csproj file with content from setup instructions - copied provided minimal class methods to be implemented When I launch mbEvents.Ui from within rider in debug mode it crashes at startup when parsing this url : `avares://MbEvents.Ui/App.axaml` with error : ``` System.UriFormatException: Invalid URI: The Authority/Host could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions) at System.Uri..ctor(String uriString) at CompiledAvaloniaXaml.XamlIlContext.Context`1..ctor(IServiceProvider, Object[], String) at MbEventS.Ui.App.!XamlIlPopulate(IServiceProvider, App) in /home/me/perso/AlcatrazScraper/MbEventS.Ui/App.axaml:line 1 at MbEventS.Ui.App.!XamlIlPopulateTrampoline(App) at MbEventS.Ui.App.Initialize() in /home/me/perso/AlcatrazScraper/MbEventS.Ui/App.axaml.cs:line 15 at Avalonia.AppBuilder.SetupUnsafe() at Avalonia.AppBuilder.Setup() at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime) at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder) at MbEventS.Ui.Program.Main(String[] args) in /home/me/perso/AlcatrazScraper/MbEventS.Ui/Program.cs:line 12 ``` folders hierarchy is in screenshot error from Rider IDE is in a screenshot as well when I launch in normal mode (not debug) I can see the UI appear with my scraper listed in the scrapers section. But when I click scrape nothing happens (I added some logging instructions to follow execution flow since I can't follow in debug mode with breakpoints, but none of my logging instructions is printed in the console) my OS : fedora dotnet install provided by Rider IDE v 10.0.201 I pushed the code here : https://codeberg.org/bayang/AlcatrazScraper

Nice, thanks for reaching out.

That error looks like a tough one. Unfortunately I can not reproduce it. I cloned my projects and yours to an empty directory and debug and run are working. Also your Alcatraz scraper is loaded and produces log entries when I start scraping schedule or lineup.

Have you tried to Build -> Rebuild Solution?

Maybe u can ask an AI agent to help you solve the issue? From remote I can not do much when I am not able to reproduce it.

But my assumption is, that the error is related to the UI framework Avalonia. Maybe you can try to create a new Avalonia project from template and see if it runs in debug.

https://docs.avaloniaui.net/docs/get-started/

Nice, thanks for reaching out. That error looks like a tough one. Unfortunately I can not reproduce it. I cloned my projects and yours to an empty directory and debug and run are working. Also your Alcatraz scraper is loaded and produces log entries when I start scraping schedule or lineup. Have you tried to Build -> Rebuild Solution? Maybe u can ask an AI agent to help you solve the issue? From remote I can not do much when I am not able to reproduce it. But my assumption is, that the error is related to the UI framework Avalonia. Maybe you can try to create a new Avalonia project from template and see if it runs in debug. https://docs.avaloniaui.net/docs/get-started/

Just one more thing: Have you set up YAMBS? https://codeberg.org/relaxo/MbEventS#setup

I don't think it is related to the debug issue but necessary to create the seeds after scraping.

Just one more thing: Have you set up YAMBS? https://codeberg.org/relaxo/MbEventS#setup I don't think it is related to the debug issue but necessary to create the seeds after scraping.
Author
Copy link

Yes I have installed yambs

I asked an AI to help me because I don't know dotnet or C# and I don't have much time, apparently my problem could be solved by upgrading avalonia and making small changes to the xml files.
The issue is a race condition in debug mode because the url handler is not yet registered and also there is an issue with the avalonia version used.

here is the output :

Summary
Cause of the UriFormatException: .NET 10 has tightened the System.Uri parser. Avalonia 11.2.8 uses the custom avares:// scheme in a way that .NET 10 intermittently rejects, particularly in the Rider previewer/debugger (race condition when registering the schema handler).
Fixes:
MbEventS.Ui.csproj — Updated Avalonia from 11.2.8 to 11.3.13 (fixes .NET 10 compatibility + avares:// URIs)
ScraperView.axaml and TourScraperListView.axaml — Fixed the ‘Unable to resolve element name’ error that prevented you from upgrading to 11.3.x:
{Binding ElementName=X} → {Binding #X} (native Avalonia syntax compatible with compiled bindings)
Name=‘X’ → x:Name=‘X’ on DataGrids (helps Rider’s AXAML plugin resolve references)

I am attaching a patch file with teh fix if you are interested.
With those changes I can now debug and test stuff with css selectors.

I had another issue because nothing was happening and my code was never called as I told you, I could find the issue in debug actually.
My input csv was like this :

3,Alcatraz,e23c36df-84e9-4c80-b54e-e6a7e3f192e3

Turns out the code for Running Order mode is not 3 as is written in the example in the docs but 4.
So initially in the switch that determines which mode is the festival I matched no branch at all because 3 is not associated with any mode.

So now I put 4 in my csv and I can test my code.

Yes I have installed yambs I asked an AI to help me because I don't know dotnet or C# and I don't have much time, apparently my problem could be solved by upgrading avalonia and making small changes to the xml files. The issue is a race condition in debug mode because the url handler is not yet registered and also there is an issue with the avalonia version used. here is the output : ``` Summary Cause of the UriFormatException: .NET 10 has tightened the System.Uri parser. Avalonia 11.2.8 uses the custom avares:// scheme in a way that .NET 10 intermittently rejects, particularly in the Rider previewer/debugger (race condition when registering the schema handler). Fixes: MbEventS.Ui.csproj — Updated Avalonia from 11.2.8 to 11.3.13 (fixes .NET 10 compatibility + avares:// URIs) ScraperView.axaml and TourScraperListView.axaml — Fixed the ‘Unable to resolve element name’ error that prevented you from upgrading to 11.3.x: {Binding ElementName=X} → {Binding #X} (native Avalonia syntax compatible with compiled bindings) Name=‘X’ → x:Name=‘X’ on DataGrids (helps Rider’s AXAML plugin resolve references) ``` I am attaching a patch file with teh fix if you are interested. With those changes I can now debug and test stuff with css selectors. I had another issue because nothing was happening and my code was never called as I told you, I could find the issue in debug actually. My input csv was like this : ``` 3,Alcatraz,e23c36df-84e9-4c80-b54e-e6a7e3f192e3 ``` Turns out the code for Running Order mode is not 3 as is written in the example in the docs but 4. So initially in the switch that determines which mode is the festival I matched no branch at all because 3 is not associated with any mode. So now I put 4 in my csv and I can test my code.

Sorry for the late replay, I was on holiday. And thank you for investigating.
I updated AvaloniaUI directly to Version 12. In rider I get an error shown in the editor, but compiling works.
I also fixed the readme.

Please try if it works for you now.

I skipped changing the ElementName=XXX to #XXX, because I think it is not related to your issue.

And another note: You called your scraper project AlcatrazScraper, which implies that it only will contain the Alcatraz scraper. I just want to mention, that multiple scrapers can be placed in one single project. Just in case you want to build other ones ;)

Sorry for the late replay, I was on holiday. And thank you for investigating. I updated AvaloniaUI directly to Version 12. In rider I get an error shown in the editor, but compiling works. I also fixed the readme. Please try if it works for you now. I skipped changing the `ElementName=XXX` to `#XXX`, because I think it is not related to your issue. And another note: You called your scraper project AlcatrazScraper, which implies that it only will contain the Alcatraz scraper. I just want to mention, that multiple scrapers can be placed in one single project. Just in case you want to build other ones ;)
Author
Copy link

Ok thanks for the feedback.
I applied your changes and it works.
I am starting to get results with the parsing, I still need to figure out everything and how seeding works.
I am getting seeds for day events in html files, my intuition is I have to create the day events that have been seeded in musicbrainz and then only after that launching MbEventS will generate the seeds for stage events as well right ?

NB : I also had an issue in rider with my PATH env var : MbEventS could not find the yambs binary (although it was in my PATH).
Turns out the PATH env variable that is used by rider was not the one that is defined in my .zshrc file, I don't know why.
I fixed the issue by editing the PATH used by rider in the launch config and then it worked.
I'm saying this here in case this could use a future contributor.

Ok thanks for the feedback. I applied your changes and it works. I am starting to get results with the parsing, I still need to figure out everything and how seeding works. I am getting seeds for day events in html files, my intuition is I have to create the day events that have been seeded in musicbrainz and then only after that launching MbEventS will generate the seeds for stage events as well right ? NB : I also had an issue in rider with my PATH env var : MbEventS could not find the yambs binary (although it was in my PATH). Turns out the PATH env variable that is used by rider was not the one that is defined in my .zshrc file, I don't know why. I fixed the issue by editing the PATH used by rider in the launch config and then it worked. I'm saying this here in case this could use a future contributor.

Glad to hear it worked.

Yeah that's right. You have to enter the day events first. Because of the tree structure, they can not be added all along with the stage events. Just run the scraper again after entering the day events. Then MbEventS finds the day events and links them correctly to the stage event seeds. I try to document it in the readme.

I also had trouble setting up yambs first. That is why I wrote this in the readme: https://codeberg.org/relaxo/MbEventS#linux-ubuntu

Glad to hear it worked. Yeah that's right. You have to enter the day events first. Because of the tree structure, they can not be added all along with the stage events. Just run the scraper again after entering the day events. Then MbEventS finds the day events and links them correctly to the stage event seeds. I try to document it in the readme. I also had trouble setting up yambs first. That is why I wrote this in the readme: https://codeberg.org/relaxo/MbEventS#linux-ubuntu
Author
Copy link

Also, I'm having a look at adding the alcatraz 2026 edition in lineup annoucement mode.
The files I get for yambs make me add all the artists on the main event.
If I go that way, what will happen after the festival enters schedule mode ?
MbEvents will use the artits added in lineup mode and reuse them for the daysubevents et stagesubevents ?
But will those artists added on the main event stay on the main event or will they get removed to only appear in sub day events on MB ?

PS : for more discussion like this tell me where you want it to happen, here in new issues or maybe on the MB forum, or somewhere else. You decide.

Also, I'm having a look at adding the alcatraz 2026 edition in lineup annoucement mode. The files I get for yambs make me add all the artists on the main event. If I go that way, what will happen after the festival enters schedule mode ? MbEvents will use the artits added in lineup mode and reuse them for the daysubevents et stagesubevents ? But will those artists added on the main event stay on the main event or will they get removed to only appear in sub day events on MB ? PS : for more discussion like this tell me where you want it to happen, here in new issues or maybe on the MB forum, or somewhere else. You decide.

Nice, you can add them to the main event or you can already create the day sub events with the artists. The Alcatraz website already shows the days, so you should be able to scrape them. It is possible to do this in lineup mode because you can add DaySubEventInfos to the EventInfo object instead of adding the artists to the EventInfo object directly.
But that is up to you. Adding it to the days is a good information for people who want to buy single day tickets.

MbEventS will "reuse" the artist from the higher level. It tries to match every artist new, but will take the already existing as a hint so the matching is faster and better and with more confidence.

And when the festival enters schedule mode you should remove every artist from the main event or the day sub events. There is a useful userscript from chaban which lets you remove all with one click. https://community.metabrainz.org/t/chabans-userscripts-and-bookmarklet-support-thread/768583/42

If an artist is cancelled, you should leave it at the most granular level and mark it as cancelled. FestivalGuide will use that flag in future. For now it just removes the cancelled artists.

I think the MB Community Discourse is the place where most people will see it, so please ask there. For bugs it will be nice when you create tickets here.
I will try to improve the documentation with each question.

Nice, you can add them to the main event or you can already create the day sub events with the artists. The Alcatraz website already shows the days, so you should be able to scrape them. It is possible to do this in lineup mode because you can add `DaySubEventInfos` to the `EventInfo` object instead of adding the artists to the `EventInfo` object directly. But that is up to you. Adding it to the days is a good information for people who want to buy single day tickets. MbEventS will "reuse" the artist from the higher level. It tries to match every artist new, but will take the already existing as a hint so the matching is faster and better and with more confidence. And when the festival enters schedule mode you should remove every artist from the main event or the day sub events. There is a useful userscript from chaban which lets you remove all with one click. https://community.metabrainz.org/t/chabans-userscripts-and-bookmarklet-support-thread/768583/42 If an artist is cancelled, you should leave it at the most granular level and mark it as cancelled. FestivalGuide will use that flag in future. For now it just removes the cancelled artists. I think the MB Community Discourse is the place where most people will see it, so please ask there. For bugs it will be nice when you create tickets here. I will try to improve the documentation with each question.
Sign in to join this conversation.
No Branch/Tag specified
main
v0.10.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
relaxo/MbEventS#2
Reference in a new issue
relaxo/MbEventS
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?