New Raspberry OS 64-bit and dashboard issue on Chrome

Expected Behaviour:

I am running a Raspberry PI 4 8G board.
I had been running Raspberry OS 32-bit for months and had been running a number of services on the device including pi-hole and everything worked great.
I just did a fresh install of Raspberry OS 64-bit OS on a new SD card (release date 9/22/2022).
I have loaded nothing other than turning on VNC in raspi-config.
I then loaded the pi-hole using the curl command. I am using all the standard defaults from the install script.

I would expect the admin interface to work as before.

Actual Behaviour:

Pi-hole is working and blocking. the admin interface does load, but the dashboard screen looks like this in Chrome. It works fine in Edge and on pi-hole remote on iOS. I have disabled all extensions in chrome even though none of them interfered with pi-hole before. I have also rebooted the RPI:

Debug Token:

(https://tricorder.pi-hole.net/9AHtjIbu/)

any suggestions are welcome. Is this an incompatibility with the Raspberry 64-bit latest edition or just chrome? I have seen some very old issues that were unique to Chrome from years past on this site but none seem to apply to this.

LJ

I have the same permanent spinning arrows effect when accessing the web interface, but only on Safari 12.1 on iOS, on both an iPad and iPhone. However I do see numbers in the four coloured boxes and those numbers update in realtime as normal.

Accessing on macOS Safari 15 and any other desktop browser and it loads as normal.

Telling iOS Safari to fetch the desktop site doesn't fix it, nor does reloading without the ad-blocker extension, nor does private/non-private mode.

For completeness I'm using Pi OS 64-bit full version on a Pi 3B+, though I don't think it's related. I also have VNC enabled via raspi-config and it's never been connected to an HDMI display. I assume it means that the graph widgets are unable to connect to the data that feeds them, but since I only really access the web interface from the desktop I've never bothered to look further.

You have a damaged or missing gravity database:

   [2022-10-28 12:50:10.220 12419/T12435] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2022-10-28 12:50:10.220 12419/T12435] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2022-10-28 12:50:10.220 12419/T12435] gravityDB_count(0): Gravity database not available
   [2022-10-28 12:50:10.220 12419/T12435] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2022-10-28 12:50:10.221 12419/T12435] gravityDB_count(3): Gravity database not available
   [2022-10-28 12:50:10.221 12419/T12435] WARN: Database query failed, assuming there are no blacklist regex entries
   [2022-10-28 12:50:10.221 12419/T12435] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2022-10-28 12:50:10.221 12419/T12435] gravityDB_count(4): Gravity database not available
   [2022-10-28 12:50:10.221 12419/T12435] WARN: Database query failed, assuming there are no whitelist regex entries
   [2022-10-28 12:50:10.221 12419/T12435] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 1.2 msec
   [2022-10-28 12:50:10.221 12419/T12435] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2022-10-28 12:50:10.221 12419/T12435] check_inaccessible_adlists(): Gravity database not available

Try rebuilding the database with pihole -g

No. Pi-hole is compatible with both 32 bit and 64 bit RaspberryPi OS.

If it is working using other browsers, your installation is working correctly.
The problem must be on Chrome side.

Do you see any error messages on Chrome?

Open Developer Tools window (CTRL+SHIFT+I) and select the Console tab.

Done that and also downloaded another of Steven Black's lists and still no change.

LJ

That's what I thought, too.

Here are the Chrome errors. I am not sure they make sense to me. Any thoughts?

LJ

On the first image, the first item (marked in blue) is just informational and it's not an issue.

The second one (in red) is telling your browser is blocking some resources, but the second image shows only images (some SVG icons) are being blocked.

This shouldn't happen, but it doesn't look like it is causing the dashboard error.

Do you have any other errors or warnings? (reload the page while Developer Tools window is open)

Did that and the errors were the same. I am not and expert and page design but my read is that something in the security profile of the page design is not palatable to Chrome. Also, what troubles me is that it worked fine before the OS change and new setup of Pi-hole. There have been no changes to Chrome. I have a hard time thinking it is a problem with chrome. The only changes were OS and new install of pi-hole. The Chrome is running on a windows 10 machine that was unaffected by the changes.

An OS update could change A LOT more things than a pi-hole update.

Pi-hole did not change Content Security Policies recently.
Also, this problem is not happening for every one using Chrome. I don't see these errors here.

From my point of view, looks like the problem is on your side, but I'm trying to understand

We know:

  • Pi-hole is working on your system.
  • Only Chrome is failing (other browsers are fine).
  • I can't reproduce the error, not even using Chrome.

For clarity, are you using the 9/22/2022 release of 64-bit Raspberry OS? Are you using the latest Pi-hole? Are you using latest chrome on windows? I am just trying to keep track of your scenario vs mine. No slight intended.

So if the problems is on my side, do you have any suggestions on what might causing it when it wasn’t a problem before this change? I think I am going to put in my old SD card and see if everything still works.

My first suspect is the OS upgrade to 64-bit since it is fairly new to whole equation with Pi-hole and Chrome.

Yes, I'm using the latest pi-hole. Also using the latest Chrome on windows. I'm using Raspberry Pi. The only difference is I'm using docker, but this shouldn't be causing these differences.

I'm trying to figure this out... Please, be patient.


Hmmmm...

Maybe a recent change could be causing this issue, but I still don't understand why only happens in your case.

Can you test one thing, please?

  • open the file /etc/lighttpd/lighttpd.conf;

  • find and edit the line starting with "Content-Security-Policy". Change the line to:

        "Content-Security-Policy" => "default-src 'self' 'unsafe-inline'; 
img-src 'self' data:;",
  • save the file and restart lighttpd.

Are the error messages gone? Does this solves the issue?

I don't know if my symptoms (same spinner effect but on iOS only) have the same cause as @LJ_inFLA's so I'll lie low and watch, but in case it's useful to know, trying that didn't fix it for me. I also had a look in /var/log/lighttpd to see if anything was being logged while these spinners were starting up.

error.log is empty, error-pihole.log just has stuff relating to the server restart and a config-key warning, and access-pihole.log shows normal api access to the summary data, and all the HTTP response codes are 200 or 304, no errors. Debug log in case any use https://tricorder.pi-hole.net/basWmryb/

We couldn't really identify what is the issue here, but looks like your issue is not exactly the same.
Your install have a lot of modified files (from your PR testing).

@LJ_inFLA @chrislph

Are you trying to access the Dashboard using the hostname or IP?

Does the attempt to access the page appear on the /var/log/lighttpd/access-pihole.log file?

I do have numbers in the coloured boxes and they update, LJ's screenshot shows dashes (however that may be related to his db errors). The endless spinners on the Dashboard when viewed on iOS started for me when I did a fresh install of Pi OS 64-bit, and the Pi-hole version that was current as of mid-Sep last month, no mods.

It's iOS 12.5.6 and Safari 12.1.something which is not current but the latest version available for this iOS.

I was using IP. Using http://pihole.lan/admin or http://pi.hole/admin gives the same result.

Yes. All 200 and 304 responses for buttons, logos, charts etc and then a steady stream of calls, ~1 per second while the page is open, all 200 responses.

/admin/api.php?summaryRaw HTTP/1.1|200|685

For comparison on the desktop browser, which works fine, I see the same steady stream of calls, plus additional calls every ~12 seconds for the below. These ones don't show up when on the iOS browser.

GET /admin/api.php?summaryRaw&topItems HTTP/1.1|200|1205
GET /admin/api.php?summaryRaw&getQuerySources&topClientsBlocked HTTP/1.1|200|1293

I'm inclined to think that Pi-hole is working okay and that this older version of Safari on iOS is unable to fully support some newer minimum level of security imposed by Pi-hole's webserver config. If that's the case it's an odd fail since it's just the same graph/chart elements as shown in LJ's screenshot that don't work, while the numbers do and the rest of the admin and sidebar functions work okay.

I'm conscious of sidetracking from LJ's Chrome issue, so the above is just for reference incase useful or common themes emerge.

I was using the IP address. BUT...

SOMETHING STRANGE HAPPENED. I had plans last night and wasn't able to get back to this thread and to my machine until now. When I woke up my Windows computer from sleep the Chrome browser was still the first screen up. It was on Pi-hole. LO-and-behold...the dashboard appeared to work just fine. I made none of the changes to the Security policy that you asked about in the Lighttpd.conf file.

Very strange behavior. Don't get me wrong, I am thrilled but confused. I am going to reboot things again and see if I can recreate the issue, but if not I may just move on. I will let you all know.

LJ

I'm not too fond of this. I cannot recreate the issue! I would have preferred to find a problem, so I know I could get around it. Now I am just waiting for the strangeness to come back sometime.

Oh well, never look a gift horse in the mouth.

Thank you all for the incredible support in trying to identify this thing. Hopefully, It won't come back.

LJ

I wonder if Chrome did an update overnight and fixed some issue which happened to be causing the problem.

I don't have auto-updates turned on, so It shouldn't have changed my system. I get notifications of updates and have to manually restart my browser to take the update.

LJ

If I understood you correctly, your system is working correctly, right?

I tested again. This change is NOT necessary.

We didn't really change CSP (Content-Security-Policy), but we changed how the policies are delivered.
Before they were sent on the HTML code of the page. Now they are send by the web server, as a file header.

I think this issue was probably a temporary thing.
Maybe old files (from before the pi-hole update) cached by Chrome were conflicting with the new server response.

I wasn't able to reproduce it too.

If you saw the same issue again, please let us know.