flatpak / flat-manager

Manager for flatpak repositories
Apache License 2.0
187 stars 43 forks source link

Failed to install applications from flat-manager: "GET /repo/summary.idx HTTP/1.1" - 400 68 Flatpak 1.12.7 0.000590 #124

Open iamfoolberg opened 8 months ago

iamfoolberg commented 8 months ago

I have followed the commands in README.md, the flat-manager is installed.

When i "upload" the build application:

./flat-manager-client push --commit $(./flat-manager-client create http://192.168.2.151:8280 stable) /home/berg/flatpak/localrepo/

The flat-manager server "accept" the application.

root@netsrv:/home/berg/flatpak/flat-manager/repo# ls
config  extensions  objects  refs  state  tmp

root@netsrv:/home/berg/flatpak/flat-manager/build-repo/4# ls
appstream  config  extensions  objects  org.flatpak.Hello.flatpakref  parent  refs  state  summaries  summary  summary.idx  tmp

Then, i created a remote hub

flatpak remote-add --if-not-exists myflathub http://192.168.2.151:8280/repo

and try to install

flatpak install myflathub org.flatpak.Hello

both client and server complain:

flatpak install myflathub org.flatpak.Hello
Looking for matches…
error: Unable to load summary from remote myflathub: Server returned status 400: Bad Request

2024-03-29T02:57:53Z INFO  flatmanager::logger] 192.168.2.151:41358 "GET /repo/summary.idx HTTP/1.1" - 400 68 Flatpak 1.12.7 0.00059

however, when i changed the url of myflathub,

flatpak remote-modify myflathub --url=http://192.168.2.151:8280/build-repo/4

it works...

Now, my question is, what is the URL of my selfhosted repo in flat-manager. the version 4 in "build-repo/4" will change by "flat-manager-client push..."

--url=http://192.168.2.151:8280/build-repo/4
iamfoolberg commented 8 months ago

Well, the answer is

root@netsrv:/home/berg/flatpak/flat-manager# cat org.flatpak.Hello.flatpakref 
[Flatpak Ref]
Name=org.flatpak.Hello
Branch=master
Title=org.flatpak.Hello build nr 4
IsRuntime=false
Url=http://192.168.2.151:8280/build-repo/4
#RuntimeRepo=http://192.168.2.151:8280/repo/flathub.flatpakrepo

root@netsrv:/home/berg/flatpak/flat-manager# flatpak install org.flatpak.Hello.flatpakref 

Nice work, nice day:)