immichFrame / ImmichFrame

GNU General Public License v3.0
469 stars 20 forks source link

Invalid URL building #100

Closed ScottFries closed 3 months ago

ScottFries commented 3 months ago

Version

v1.0.7.0

Deployment Method

Desktop - linux-arm

Description

When building locally or via GitHub action on my fork, I'm unable to connect to my Immich server because the URL builder is generating bad values.

Digging in, once you get to immich-openapi-specsClient.cs:1112, the builder has a value of (omitting actual host) "https://immich.example.com" and after running the albums append, it becomes "https://immich.example.comalbums", and continuing from here, the app eventually gives the error "Name or service not know (https://immich.example.comalbums:443)".

Not sure if this is me overlooking some additional configuration, but any help would be appreciated!

Reproduction

For me, this occurs regardless of if I build and run locally through VS (Windows), locally through the terminal using the command from the GitHub action (linux-arm), or through my fork's GitHub action.

Expectations

No response

Configuration

{
    "ImmichServerUrl": "<OMITTED>",
    "ApiKey": "<OMITTED>",
    "Margin": "0,0,0,0",
    "Interval": 30,
    "TransitionDuration": 1,
    "DownloadImages": false,
    "ShowMemories": false,
    "RenewImagesDuration": 30,
    "ShowClock": true,
    "ClockFontSize": 72,
    "ClockFormat": "hh:mm:ss",
    "ShowPhotoDate": true,
    "PhotoDateFontSize": 48,
    "PhotoDateFormat": "yyyy-MM-dd",
    "ShowImageDesc": true,
    "ImageDescFontSize": 48,
    "ShowImageLocation": true,
    "ImageLocationFontSize": 32,
    "FontColor": "#FF0000",
    "WeatherFontSize": 48,
    "UnitSystem": "imperial",
    "WeatherLatLong": "<OMITTED>",
    "WeatherApiKey": "<OMITTED>",
    "Language": "en"
}

Logs

No response

Pre-Submission Checklist

3rob3 commented 3 months ago

Yeah, we noticed this too (see the Discord channel if you're interested https://discord.com/channels/979116623879368755/1217843270244372480). It looks like most of the discussion was in DM though. Anyway we noticed all the GitHub builds were broken with URL related errors, but what is strange is my local builds are fine. Makes no sense and definitely needs more investigation. Hard to troubleshoot When mine is working though.

All the current builds in releases should be fine.

ScottFries commented 3 months ago

Ah, glad to hear it's not isolated to me, but sad to hear it's happening! Would love to join the conversation on Discord, but the link isn't working for some reason (when it rains it pours). Have you tried purging everything locally? I'm wondering if this might be some weird caching issue with the OpenAPI generated files since that's where assembly of these URLs happens.

3rob3 commented 3 months ago

Yeah that definitely seems most likely. Weird with discord, I’ll try again: https://discord.com/channels/979116623879368755/1217843270244372480

3rob3 commented 3 months ago

Hey, wondering if you would be willing to help me (since you can reproduce issue locally)? I suspect a Nuget package upgrade to NSwag may be causing this. Would you mind rolling back that package to 13.18.2, building, and seeing if the issue goes away?

https://github.com/RicoSuter/NSwag/issues/4764

ScottFries commented 3 months ago

Of course! It actually seems to be a combination of that package and the Microsoft.Extensions.ApiDescription.Client package. Rolling both back to the versions you were using before your update to .Net8 resolves the issue locally. I'm going to try narrowing down what version(s) of these packages first exhibits this issue now.

https://github.com/3rob3/ImmichFrame/pull/101

ScottFries commented 3 months ago

Speaking of cache issues, I must have not purged the cache during one of my tests. Looking further, it is just an issue with the NSwag package and only that needs to be downgraded. In my PR I'm taking it back to version 13.18.2 where you had it, but note that 13.20.0 works as well. It's only with major release 14 that the issue starts (and 14.0.[0-3] have build failures).

3rob3 commented 3 months ago

Awesome, thanks for testing that and glad we figured it out! In your PR you mention cleaning solution is not enough. What did you do to fully purge?

ScottFries commented 3 months ago

I always take the nuclear approach of running git clean -xffd, but deleting your obj\ and bin\ dirs would work as well. When running Clean Solution if working on Windows though, you'll see it leaves obj\immich-openapi-specsClient.cs in tact.

ScottFries commented 3 months ago

Resolved by merge of https://github.com/3rob3/ImmichFrame/pull/101

3rob3 commented 3 months ago

got it. Thanks again for contributing!