simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.9k stars 55 forks source link

Receiving Immich ping API Error on Immich Version v1.118.1 #511

Closed oleh11 closed 1 month ago

oleh11 commented 1 month ago

On immich-go Windows x86_64 version 0.22.1 when using query

./immich-go -server=http://LOCALIP:2283 -key=S0SnfjgKtNot_real_key2232Jubaul6KJnTvjkFUsZZA upload -create-albums -google-photos takeout-*.zip

Receiving the following error

INFO | Connection to the server http://LocalIP:2283 | time= ERROR | unexpected response to the immich's ping API at this address: http://LocalIp:2283/api/server-info/ping: | time=

calvinthefreak commented 1 month ago

Same here, they announced some breaking changes to the API few days ago in V1.118.0 https://github.com/immich-app/immich/releases/tag/v1.118.0

2. Remove deprecated API endpoints

The following endpoints were previously deprecated and have been removed, if you are a community project maintainer and using one of the endpoints below, please make sure to make changes to your project:

[!NOTE]
This includes /api/server-info/ping, /api/server-info/version, /api/server-features, /api/server-info/config, /api/server-info/statistics, and others.

calvinthefreak commented 1 month ago

And just to Add: This happens on each platform. Not just Windows. I can confirm that the ARCH AUR Version has the same issue, since it's obvious.

simulot commented 1 month ago

I downloaded the latest version for linux here https://github.com/simulot/immich-go/releases/tag/0.22.1

gl65:~/Downloads/immich-go_Linux_x86_64(3)$ ./immich-go -server=http://localhost:2283 -key=zs2gDFLFgxsK2XOPKJtHWW3JUdV59pRvCJYsWtyw4g -api-trace upload "/home/jfcassan/Dev/test-data/demo takeout/Takeout"
immich-go  0.22.1, commit 35982819550c81ab615424cc10dd710d455e9952, built at 2024-10-15T19:49:03Z
. _ _  _ _ . _|_     _  _ 
|| | || | ||(_| | ─ (_|(_)
            v 0.22.1 _)   

Input analysis:
---------------
scanned image file                      :     338
scanned video file                      :       9
scanned sidecar file                    :       0
discarded file                          :       0
unsupported file                        :     346
file duplicated in the input            :       0
associated metadata file                :       0
missing associated metadata file        :       0

Uploading:
----------
uploaded                                :       0
upload error                            :       0
file not selected                       :       0
server's asset upgraded with the input  :       0
server has same asset                   :     347
server has a better asset               :       0

Check the log file:  /home/user/.cache/immich-go/immich-go_2024-10-16_08-14-33.log
Check the trace file:  /home/user/.cache/immich-go/immich-go_2024-10-16_08-14-33.trace.log

And here is the API trace:

2024-10-16T08:14:33+02:00 QUERY 1 PingServer GET http://localhost:2283/api/server/ping
   Accept [application/json]
   X-Api-Key redacted
-- Empty body or binary body not dumped --
2024-10-16T08:14:33+02:00 RESPONSE 1 PingServer GET http://localhost:2283/api/server/ping
  Status: 200 OK
-- response body --
{
 "res": "pong"
}
-- response body end --

Are you sure you are running the version 0.22.1?

oleh11 commented 1 month ago

Not sure what happened, i redownloaded and extracted the zip from here - https://github.com/simulot/immich-go/releases/tag/0.22.1 to a new file instead of overriding, and it looks like it worked.

Thanks to all

oleh11 commented 1 month ago

Thank you all

SwissArmyWrench commented 2 weeks ago

I am getting this same exact error right now today, immich-go version 0.22.1, immich version 1.120.1.

simulot commented 2 weeks ago

What is the version of your immich server?

SwissArmyWrench commented 2 weeks ago

1.120.1. Pulled about 30 minutes ago

simulot commented 2 weeks ago

I have check with immich go 0.22.1, and immich 1.120.1, no problem

Have you checked that the server is actually running the last pulled version?

simulot commented 2 weeks ago

Can you provide the -api-trace result as well?

SwissArmyWrench commented 2 weeks ago
immich-go  0.22.1, commit 35982819550c81ab615424cc10dd710d455e9952, built at 2024-10-15T19:49:03Z
. _ _  _ _ . _|_     _  _ 
|| | || | ||(_| | ─ (_|(_)
            v 0.22.1 _)   

Check the log file:  /home/truepenny/.cache/immich-go/immich-go_2024-11-07_20-27-27.log
Check the trace file:  /home/truepenny/.cache/immich-go/immich-go_2024-11-07_20-27-27.trace.log
unexpected response to the immich's ping API at this address: immich.swissarmywrench.com/api/server/ping:

Here is the output. The bottom left corner of my Immich web UI confirms that it is actually running v1.120.1.

SwissArmyWrench commented 2 weeks ago

ope, I think this is what you wanted:

2024-11-07T20:27:27-05:00 QUERY 1 PingServer GET immich.domain.com/api/server/ping
   Accept [application/json]
   X-Api-Key redacted
-- Empty body or binary body not dumped --
simulot commented 2 weeks ago

have you tried with the prefix http://immich.domain.com?

ahrorkosimi commented 2 days ago

have you tried with the prefix http://immich.domain.com?

Thank you! This worked. Instead of https wrote http.