Closed TheDK closed 2 years ago
It is already implemented?
Anyways, I don't have this issue myself š¤· Although your issue description is kinda generic, so maybe be more specific.
(My last issue was deleted without comment - anything I am missing with regard to etiquette?)
Issues don't get deleted. They can be closed, however, the bot warns for that. A response will prevent that (as written in the message). Not responding = closed stale / no longer valid. You didn't respond to the bot in that case.
It is already implemented?
Anyways, I don't have this issue myself š¤· Although your issue description is kinda generic, so maybe be more specific.
Sure - here is the environment:
HA: core-2022.3.5 Home Assistant OS 7.5 Grafana Current version: 7.5.0
version | core-2022.3.5 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.9 |
os_name | Linux |
os_version | 5.10.103 |
arch | x86_64 |
timezone | Europe/Berlin |
If I directly connect to Grafana it looks like this:
(http://192.168.23.15:80/api/hassio_ingress/57ASMUVXUTGabMn4GzqIdrCXvpk3fG7-2P6-wDuHKxk/d/kOuP_Fggz/overview?orgId=1&refresh=30s)
If I open it through HA (http://192.168.23.15:8123/hassio/ingress/a0d7b954_grafana):
One more:
Any idea what the problem might be?
Edit: If I roll back to 7.4.1 ist works fine both ways.
(My last issue was deleted without comment - anything I am missing with regard to etiquette?)
Issues don't get deleted. They can be closed, however, the bot warns for that. A response will prevent that (as written in the message). Not responding = closed stale / no longer valid. You didn't respond to the bot in that case.
Alright - maybe I really just forgot to post the issue and closed the window prematurely. I was certain I got it logged and it was gone 2 hours later without any comment or trace, but might be user error on my side. Nevermind.
Hi.
I have the same issue, just noticed it today. No idea if it is related to Grafana or InfluxDB or both :( But it used to work.
It has nothing to do with the data source as far as I can tell (I have the problem with a Postgres DB), but not with every dashboard. Also, the errors occur if I try to do something in Grafana (say: move a dashboard to a folder). Problem is I donāt see any pattern to the problem so far - just that itās definitely connected to the Grafana updateā¦
I have tested some more and have found out, that for me the problem only occurs on Win10 with FireFox 98.01 - it does not occur on Chrome and Edge, also not Safari on iOS, also not on FireFox on MacOS.
The combination Win10 / FireFox also does work with version 7.4.1 of the addon. It also does work in all combinations when accessing Grafana directly and not as a "frame" in Home Assistant.
It appears that something changend in Grafana that FireFox does not seem to be able to handle in this specific combination. As FireFox is probably not very common anymore most people will not not encounter this problem...
Having mentioned the bowser... i changed from Chrome to Edge and it works. On Chrome it doesn't. I'm on win 11, Chrome Version 99.0.4844.82 (Official Build) (64-bit).
I checked again - everything works fine for me in Chrome (most recent version) on Windows Server 2019 as well as MacOS. Will test again on Win10 tomorrow, but that should not make a difference. For me Firefox is the problem on Win10 as well as Win2019 Srv.
I get a lot of errors in the Grafana add-on log when trying to access from Firefox on windows:
server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67)
logger=context t=2022-03-27T20:27:23.98+0200 lvl=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr="192.168.23.11, 172.30.32.1" time_ms=165 size=272 referer="http://192.168.23.15:8123/api/hassio_ingress/57ASMUVXUTGabMn4GzqIdrCXvpk3fG7-2P6-wDuHKxk/d/kOuP_Fggz/overview?orgId=1&refresh=30s"
server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67)
logger=context t=2022-03-27T20:27:24.03+0200 lvl=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr="192.168.23.11, 172.30.32.1" time_ms=11 size=398 referer="http://192.168.23.15:8123/api/hassio_ingress/57ASMUVXUTGabMn4GzqIdrCXvpk3fG7-2P6-wDuHKxk/d/kOuP_Fggz/overview?orgId=1&refresh=30s"
server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67)
logger=context t=2022-03-27T20:27:24.03+0200 lvl=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr="192.168.23.11, 172.30.32.1" time_ms=22 size=459 referer="http://192.168.23.15:8123/api/hassio_ingress/57ASMUVXUTGabMn4GzqIdrCXvpk3fG7-2P6-wDuHKxk/d/kOuP_Fggz/overview?orgId=1&refresh=30s"
server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67)
logger=context t=2022-03-27T20:27:24.04+0200 lvl=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr="192.168.23.11, 172.30.32.1" time_ms=95 size=354 referer="http://192.168.23.15:8123/api/hassio_ingress/57ASMUVXUTGabMn4GzqIdrCXvpk3fG7-2P6-wDuHKxk/d/kOuP_Fggz/overview?orgId=1&refresh=30s"
192.168.23.11 is the client running FireFox, .15 is the HA instance. Those errors are not in the log if I access with a different browser or FireFox on MacOS.
@frenck: As this does not happen when Grafana is accessed directly (only in HA "frame") not quite sure if this is something for you / the add-on? Anything else I can provide with regard to logs?
And the detailed error in Grafana:
origin not allowed {"results":{"A":{"error":"db query error: pq: Syntaxfehler bei Ā»ORDERĀ«","frames":[{"schema":{"refId":"A","meta":{"executedQueryString":"WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = \n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n date AS \"time\",\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;"},"fields":[]},"data":{"values":[]}}]}}}
Object
status:403
statusText:"Forbidden"
data:Object
message:"origin not allowed
{\"results\":{\"A\":{\"error\":\"db query error: pq: Syntaxfehler bei Ā»ORDERĀ«\",\"frames\":[{\"schema\":{\"refId\":\"A\",\"meta\":{\"executedQueryString\":\"WITH charging_process AS (\\n SELECT id, end_date\\n FROM charging_processes\\n WHERE car_id = \\n ORDER BY start_date DESC\\n LIMIT 1\\n)\\nSELECT\\n date AS \\\"time\\\",\\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\\n ELSE 0\\n END AS \\\"Power [kW]\\\"\\nFROM charges, charging_process\\nWHERE charging_process.id = charging_process_id\\nORDER BY date DESC\\nLIMIT 1;\"},\"fields\":[]},\"data\":{\"values\":[]}}]}}}
"
error:"Forbidden"
response:"origin not allowed
{\"results\":{\"A\":{\"error\":\"db query error: pq: Syntaxfehler bei Ā»ORDERĀ«\",\"frames\":[{\"schema\":{\"refId\":\"A\",\"meta\":{\"executedQueryString\":\"WITH charging_process AS (\\n SELECT id, end_date\\n FROM charging_processes\\n WHERE car_id = \\n ORDER BY start_date DESC\\n LIMIT 1\\n)\\nSELECT\\n date AS \\\"time\\\",\\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\\n ELSE 0\\n END AS \\\"Power [kW]\\\"\\nFROM charges, charging_process\\nWHERE charging_process.id = charging_process_id\\nORDER BY date DESC\\nLIMIT 1;\"},\"fields\":[]},\"data\":{\"values\":[]}}]}}}
"
config:Object
url:"api/ds/query"
method:"POST"
data:Object
requestId:"Q144"
retry:0
headers:Object
hideFromInspector:false
message:"origin not allowed
{\"results\":{\"A\":{\"error\":\"db query error: pq: Syntaxfehler bei Ā»ORDERĀ«\",\"frames\":[{\"schema\":{\"refId\":\"A\",\"meta\":{\"executedQueryString\":\"WITH charging_process AS (\\n SELECT id, end_date\\n FROM charging_processes\\n WHERE car_id = \\n ORDER BY start_date DESC\\n LIMIT 1\\n)\\nSELECT\\n date AS \\\"time\\\",\\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\\n ELSE 0\\n END AS \\\"Power [kW]\\\"\\nFROM charges, charging_process\\nWHERE charging_process.id = charging_process_id\\nORDER BY date DESC\\nLIMIT 1;\"},\"fields\":[]},\"data\":{\"values\":[]}}]}}}
"
whne trying to access from Chrome i get the same error repeating multiple times in the Grafan addon log:
server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67) server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67) server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67) server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67) server.go:3160: http: superfluous response.WriteHeader call from github.com/grafana/grafana/pkg/web.(*responseWriter).WriteHeader (response_writer.go:67)
When accesing through Edge the log stays clear, no error
@frenck Just a question: Is that something you want to have a look at or do we chalk that up to strange browser behaviour and all use Chrome? :)
A quick update as this gets stranger over time:
Prod environment:
version | core-2022.4.7 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.9 |
os_name | Linux |
os_version | 5.10.108 |
arch | aarch64 |
timezone | Europe/Berlin |
Test environment:
version | core-2022.4.7 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.9 |
os_name | Linux |
os_version | 5.10.108 |
arch | x86_64 |
timezone | Europe/Berlin |
Grafana has the same dashboard imported an running against the same PostgreSQL DB (not installed on either of the HA environments, different server). Results:
FireFox 100.0 (64-Bit) on Win10: Prod Error as above, Test working fine (tested on two different machines) FireFox 100.0 (64-Bit) on Win Server 2019: All working fine
Chrome and Edge working generally just fine...
I can't figure out what the difference is that produces the error above...
Getting closer: Accessing it over the Nabu Casa cloud feature also works, accessing it directly with the local IP of HA without SSL does not work.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment š This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Problem still persists on latest versions. It was also reproduced by others (see linked issue).
I've today tried to reproduce this once again, and I'm simply not capable of reproducing this on various setups and browsers.
It seems Windows is a common theme? Anyways, I'm not able to test that as I do not own or have access to Windows machines (also refuse to touch one).
If i can help let me know how please.
On thing is for sure. It used to work, after it did not.
Here is the error as it is now.
It seems Windows is a common theme? Anyways, I'm not able to test that as I do not own or have access to Windows machines (also refuse to touch one).
Yes, I believe it is only the combination Windows 10 (not 2019 Srv btw) / FireFox / delivery via HA using NGINX. All other combinations seem to work fine, even this one using Chrome. So I understand if that is not something you want to sink time in...
I have no proof , nor the knowledge to be sure, but i think it is not browser related. For me the error above is on Chrome. Edge works fine.
Also , accesing Grafana directly on the 3000 port on Chrome works also.
Standard HA OS install with influx and grafana, no customizations.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment š This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Problem/Motivation
When updating the add-on to the newest version of Grafana, this problem occurs: https://community.grafana.com/t/origin-not-allowed-messages-after-upgrade-to-8-3-6/60550 https://community.grafana.com/t/after-update-to-8-3-5-origin-not-allowed-behind-proxy/60598/2 https://github.com/grafana/grafana/issues/45261
Expected behavior
Grafana working through nginx as part of the HA OS setup.
Actual behavior
Dashboards not working, GUI not working, lots of errors...
Steps to reproduce
Just update and try to create / move / delete a dashboard.
Proposed changes
Implement the fix mentioned in the issues linked above in the add-on.
(My last issue was deleted without comment - anything I am missing with regard to etiquette?)