freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
392 stars 162 forks source link

Web interface: build.html: Invalid request or no data available yet. #875

Open grahamperrin opened 3 years ago

grahamperrin commented 3 years ago

Prerequisites

Describe the bug

At (for example):

file:///usr/local/poudriere/data/logs/bulk/main-default/2021-05-28_14h04m32s/build.html

– whilst packages are built:

Invalid request or no data available yet.

How to reproduce

Steps to reproduce the behaviour:

  1. poudriere ports -u
  2. put in place the four files from https://codeberg.org/Alexander88207/FreeBSD-Ports/src/branch/main/print/pdfarranger
  3. poudriere bulk -b latest -J 3 -j 13 print/pdfarranger
  4. in Firefox, visit:

/usr/local/poudriere/data/logs/bulk/main-default/latest/build.html

Expected behaviour

  1. build progress.

Screenshot

image

Environment

root@mowa219-gjp4-vm-freebsd-13-zfs:~ # poudriere jail -i -j 13
Jail name:         13
Jail version:      13.0-RELEASE-p1
Jail arch:         amd64
Jail method:       http
Jail mount:        /usr/local/poudriere/jails/13
Jail fs:           zroot/poudriere/jails/13
Jail updated:      2021-05-27 12:57:17
Jail pkgbase:      disabled

Additional context

I get the same – Invalid request or no data available yet. – with poudriere-devel-3.3.99.20210521 on 14.0-CURRENT.

bdrewery commented 3 years ago

It's a Firefox restriction on file://. From what I recall it is against javascript and cross-site requests.

@bsdjhb What did you do to fix this?

grahamperrin commented 3 years ago

Thanks, now I see:

file:///usr/local/poudriere/data/logs/bulk/main-default/latest/build.html

/usr/local/poudriere/data/logs/bulk/main-default/latest/build.html

That's enough for me, but if there's a reasonably simple workaround for e.g. Firefox it'll be welcome.

lherschi commented 2 years ago

In Firefox the following setting in about:config helps. security.fileuri.strict_origin_policy=false

fearedbliss commented 2 years ago

Just wanted to write that this is also happening on Chromium - Version 106.0.5249.119 (Official Build) (64-bit) (I'm guessing for similar reasons). Besides disabling these security settings (or using a different browser), would it be possible to have an easier/official way to get access to all build information? Essentially it would be nice to get some sort of print out like synth. I don't use synth (just poudriere on both my server and my laptop, but the synth ui output list was nice ;D - showing packages currently being built, and a list of pending packages). I do know "Ctrl + t" displays a list of the current ports it is looking at, and it shows the queue number as well, but doesn't show a easy to list of of queued ports).

Schamschula commented 1 year ago

Just a quick note: the issue can also be server side: I ran into this issue using Safari on the Mac.

When I looked at the page using the Developer Console, I found that apache24 was throwing 403s for */.data.json files, as my server is locked down to prevent serving most files that start with a dot.

I tweaked my httpd-vhosts.conf file to permit these files, and all is well.

rdunkle34 commented 2 months ago

My solution was this: /usr/local/share/poudriere/include/html.sh seems two lines calling paste command are the problem: paste -s -d , - change to: /usr/bin/paste -s -d , -