Closed JordanMarr closed 6 months ago
@jamie-rower and I were just batting around strategies for getting the XPlat project into our MiniScaffold instance for our project. I'll pull the latest and play with it a bit.
I think I need to understand better where the main.js update comes into play for your template. I just read that thread and I'm more confused now than when I glanced at your screenshot.
OK - I got the same error with .NET7 on MacOS (had to run dotnet workload install twice to get it to load wasm-tools for some reason)
So I read that thread and I'm actually not sure what to do next. What does maybe the latest template needs to be re-run to replace some of the js files.
mean?
So the diff between the project folder and the folder that is generated in the "bin" folder is now my latest head-scratcher...
I wish I had a cleaner way of showing this but on the left is the Avalonia project AppBundle and the right is the generated AppBundle in the bin path.
So I read that thread and I'm actually not sure what to do next. What does
maybe the latest template needs to be re-run to replace some of the js files.
mean?
I’m assuming that the .js files are generated by the Avalonia xplat template. So I’m thinking that the way forward is to update to the latest xplat template, create a new project and then copy over the .js files. (or maybe just copy them over from the Avalonia git repo)
It looks like your dep for Avalonia is sourcing from AvaloniaCI and not NuGet. Maybe that's it?
I was battling with this and made some progress - I had partly worked out PR, but then the whole main project went on a tear and I've been busy, so I didn't get around to cleaning it up. It's not 100% working - I ran into the problem with workloads not installing on my machine. Looks like this branch
https://github.com/daz10000/Elmish.Avalonia/tree/23/11/MNT-update_web_target
I just pushed the changes - mainly to the AppBundle folder, which are from the new template. There were some residual issues though. Somehow it was crashing during startup still. If I did AwaitTask then RunSynchronously on the main startup task, it cashes. If I don't, it gets further but the elmish loop never started up. Also for some reason, having FluentTheme in the applicaton styles broken things, so I just commented that out for now.
I also removed nuget.config file, I think because as @houstonhaynes mentions, it was sourcing from an odd place
Bit the bullet and did the merge - will see if I can it to build and run but the branch is at least up to date with the rest of the project. Let's see if it even builds..
It's slowly coming back to me - I ended up in a corner of hell where the wasm workload wouldn't update
Updated advertising manifest microsoft.net.sdk.macos.
Updated advertising manifest microsoft.net.workload.emscripten.net7.
Updated advertising manifest microsoft.net.workload.mono.toolchain.net6.
Updated advertising manifest microsoft.net.workload.emscripten.net6.
Updated advertising manifest microsoft.net.sdk.ios.
Updated advertising manifest microsoft.net.sdk.maui.
Updated advertising manifest microsoft.net.sdk.android.
Updated advertising manifest microsoft.net.sdk.tvos.
Updated advertising manifest microsoft.net.workload.mono.toolchain.net7.
Updated advertising manifest microsoft.net.sdk.maccatalyst.
The machine has a pending reboot. Installation will continue, but you may need to restart.
Downloading microsoft.net.sdk.ios.manifest-7.0.100.msi.x64 (16.4.7125)
Workload installation failed. Rolling back installed packs...
Workload update failed: Value cannot be null. (Parameter 's')
I tried updating bundle files from the latest template, and they did change, but still same problem. https://github.com/JordanMarr/ReactiveElmish.Avalonia/tree/xplat-update
My branch actually starts up, but I can either get it to render and crash or not render at all. Installing new sdk - let me see if I can it working
I'm on the xplat-update branch and it runs "clean" (no console errors) but it's also just splashing the Powered by Avalonia screen - and no favicon.ico displays though I see it in the AppBundle folder.
Do we need a 'paket' for Avalonia templates? 😸
I have everything pulled into that branch, but the desktop app doesn't run properly - I just get an empty window and it never renders the middle part - it's just transparent. I'm still stuck on not being able to install the wasm workloads to try the web branch. Might try a different machine at this point.
Edit: interesting, the desktop version won't work without fluenttheme in App.axaml
and that was part of what was breaking the web version.
Edit2: neurons waking up, and remembering part of why workload won't restore - it needs to run with admin privs, but the error message gives you no idea why it's failing. It's making more progress finally.
Funny how on Mac it hard stops if you're running dotnet workload xxx
without elevated privileges
It does stop on the PC too, brilliantly telling you
Workload update failed: Value cannot be null. (Parameter 's')
of course..
Ok, I have web version building, and also just stuck on splash screen... let me see if I can get it a little further.
Ah, edge is actually being helpful and giving me the console output which firefox was withholding for some reason. Now I can see exactly where startup is failing
Yes specifically, it dies trying to use AppCompositionRoot()
because AppCompositionRoot() assumes a main window where the singlepage application styles (basically everything except the desktop), needs a single usercontrol at the root.
And partial success.. I had to swap out a usercontrol instead of a window for the main"Window", and then the file service can't be added in because it's looking for a window. The web version works somewhat.. chart isn't drawing but all the rest of the chart controls work.
Any thoughts on how to harmonize the top level controls?
I don't get what you see in FF and there's some odd behavior in the re-load of the page. I get the splash page and no favicon.ico the first time - then on refresh FF mostly reloads instantly and shows the favicon and Chrome just janks (and no console output).
It did work for me in Firefox now - it's slower, you might need to refresh cache (I opened it in an incognito window but then the main window also worked). I did have to fix some other small things - like piping the main program task to ignore rather than runsynchronously. Changes are all on the updated branch,
still broken
And I didn't see any updates on the xplat-update branch
PR #33 updated.
I'm not seeing any difference - I'll come back to a fresh start in the AM.
I was working on a fork and just submitted a PR to the project. The changes aren’t in the xplat-update branch. sorry for any confusion. Am 12/9/23 um 6:01 PM schrieb Houston Haynes @.***>: I'm not seeing any difference - I'll come back to a fresh start in the AM.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Just wrapping up for the night.. I followed your PR and rebased on main. I'll come back to my WinOS slab in the AM and give it a fresh look.
It works again! 🎉
There is still an issue with the graph in the web client but I’ll look tomorrow. It works for desktop. Might be some incompatibility in the library.Am 12/9/23 um 9:09 PM schrieb Jordan Marr @.***>: It works again! 🎉
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
I made a few tweaks:
SourceList
for smoother updatesWebFileService
(not implemented)Rainstorm here in the early hours - lots of thunder and lightning 🌧️ ⚡ so I'm up 😸
I'm on WinOS - latest main - web does run but lingers on the "Powered By Avalonia" screen for a moment longer than I expect. Not a deal-breaker but interesting. Maybe I just haven't run it in a while.
LiveCharts bar chart doesn't render in .Web
but does in .Desktop
. Haven't tried mobile yet - on device or emulated. I updated to their latest version (2.0.0-rc2) and will scout their repo for late-breaking news, if any.
Android is not so hot either - API 34 on em or 33 on physical (Galaxy Tab 5) I get a "gray screen" and
Process finished with exit code -1.
after a looooooooooong launch window.
I'm seeing the same on all fronts. TBF, the Android emulator is just SLOW in general. It's exactly the same on my MAUI project -- almost unusably slow. I found that using a real device is preferable. Although setting up a real iPhone is a pain.
Good news: I got Android back to working again -- even the chart seems to render properly!
I forgot that when I last upgraded Avalonia, Activities.fs
code failed to build because override _.CustomizeAppBuilder(builder)
didn't exist as a method to override, so I commented it out to fix later.
Looking at it again, I saw that they added a new AvaloniaMainActivity
base class that takes a generic arg:
type MainActivity() =
inherit AvaloniaMainActivity<App>()
Although setting up a real iPhone is a pain.
You said a MOUTHFUL. I had my early sample app running on my iPhone - which I confirmed because it's STILL THERE 😁
But now, even after setting up a fresh dev cert and doing ALL OF THE THINGS that Rider discussion threads suggest I'm still not getting a successful iOS build. It is extremely frustrating and I have too much work to do to bang my head against that right now. So at some point I'm going to come back to face this - but for the time I spent on it my money's on a regression in the latest version of Rider.
Yes, it is very frustrating! It seems like every time I come back to my Xamarin turned MAUI project after a month or more, the iPhone portion fails to build. It's the most unstable, frustrating mess I've ever seen. Many times, the fix comes in the form a new Visual Studio release. So, upgrading VS has become a regular part of my MAUI development. I hate it SO much. It makes me want to never do iOS development again.
I get the impression that a lot of the issues come from the Apple side, but I don't really know.
This is why I'm so keen on the idea of creating a PWA with Fable the next time I have to develop for iOS.
The xplat build failed, so I upgraded everything to net8.0 and updated to use the new ReactiveElmish.Avalonia v1.0.0.
It runs again, but now the Web project is back to being stuck at the "powered by Avalonia UI" splash page.
I did notice there is a js console error in the browser:![image](https://github.com/JordanMarr/ReactiveElmish.Avalonia/assets/1030435/7e52d560-6f5d-443e-8d15-9f2b3cefba1e)
Which leads to this issue: https://github.com/AvaloniaUI/Avalonia/discussions/11037
So maybe the latest template needs to be re-run to replace some of the js files. 🤷♂️
@daz10000 @houstonhaynes