Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web interface: warning in logs when clicking on any button #52

Open
1 task done
35gh opened this issue Jul 3, 2024 · 2 comments
Open
1 task done

Web interface: warning in logs when clicking on any button #52

35gh opened this issue Jul 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@35gh
Copy link

35gh commented Jul 3, 2024

Troubleshooting Guide

  • I have followed the steps in the troubleshooting guide and my issue is either not listed or is not solved.

Description

The following warning are printed in logs when clicking on any button of the web interface.

Logs

[W][web_server_idf:070][httpd]: Only application/x-www-form-urlencoded supported for POST request

Which version of the Upsy Desky firmware config are you running?

4.0.0

How do you manage your Upsy Desky's updates?

ESPHome YAML Config

If you're using an ESPHome YAML config, which version of ESPHome are you running?

2024.6.6

ESPHome Config

substitutions:
  name: upsy-desky-xxxxxx
  friendly_name: Jarvis Fully 2

packages:
  tj_horner.upsy_desky: github://tjhorner/upsy-desky/firmware/[email protected]

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

api:
  encryption:
    key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  reboot_timeout: 0s
    
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:
  level: INFO

improv_serial:

web_server:
  port: 80
  version: 2
  js_url: "https://upsy-desky.tjhorner.dev/esphome-webserver/www.js"

ota:
  password: ""
  platform: esphome

external_components:
  - source: github://tjhorner/esphome-custom-components
    components: [ project_version ]

text_sensor:
  - platform: project_version
    name: "Upsy Desky Firmware Version"
    internal: true

dashboard_import:
  package_import_url: github://tjhorner/upsy-desky/firmware/[email protected]
@35gh 35gh added the bug Something isn't working label Jul 3, 2024
@35gh 35gh changed the title Warning in log when using web interface Warning in logs when clicking on buttons of the web interface Jul 3, 2024
@35gh 35gh changed the title Warning in logs when clicking on buttons of the web interface Web interface: warning in logs when clicking on any button Jul 3, 2024
@tjhorner
Copy link
Owner

tjhorner commented Jul 3, 2024

Can you provide any browser-side logs that appear as well? Thank you!

@35gh
Copy link
Author

35gh commented Jul 5, 2024

Tested with Firefox 127.0.2. Let me know if you want to capture anything specific.

I see the following error in console when loading the web interface:

Uncaught (in promise) Error: invalid template strings array
    kt https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    Mt https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    H https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    _$AC https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    g https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    _$AI https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    It https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    update https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    performUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    scheduleUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    _$Ej https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    requestUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    _$Eu https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    A https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    f https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    yt https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    u https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    g https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    _$AI https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    It https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    update https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    performUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    scheduleUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    _$Ej https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    requestUpdate https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    _$Eu https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    A https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:1
    f https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    N https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    R https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    R https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    F https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
    <anonymous> https://upsy-desky.tjhorner.dev/esphome-webserver/www.js:3
www.js:3:335

Here's a request generating the warning (turn off status led):

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "Firefox",
      "version": "127.0.2"
    },
    "browser": {
      "name": "Firefox",
      "version": "127.0.2"
    },
    "pages": [
      {
        "id": "page_1",
        "pageTimings": {
          "onContentLoad": -1,
          "onLoad": -1
        },
        "startedDateTime": "2024-07-05T09:00:29.178+02:00",
        "title": "http://upsy-desky-xxxxxx.local/"
      }
    ],
    "entries": [
      {
        "startedDateTime": "2024-07-05T09:00:29.178+02:00",
        "request": {
          "bodySize": 4,
          "method": "POST",
          "url": "http://upsy-desky-xxxxxx.local/light/status_led/turn_off",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Host",
              "value": "upsy-desky-xxxxxx.local"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Accept-Language",
              "value": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate"
            },
            {
              "name": "Referer",
              "value": "http://upsy-desky-xxxxxx.local/"
            },
            {
              "name": "Content-Type",
              "value": "text/plain;charset=UTF-8"
            },
            {
              "name": "Content-Length",
              "value": "4"
            },
            {
              "name": "Origin",
              "value": "http://upsy-desky-xxxxxx.local"
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Priority",
              "value": "u=1"
            }
          ],
          "cookies": [],
          "queryString": [],
          "headersSize": 460,
          "postData": {
            "mimeType": "text/plain;charset=UTF-8",
            "params": [],
            "text": "true"
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Content-Type",
              "value": "text/html"
            },
            {
              "name": "Content-Length",
              "value": "0"
            },
            {
              "name": "Accept-Ranges",
              "value": "none"
            },
            {
              "name": "Access-Control-Allow-Origin",
              "value": "*"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "text/html",
            "size": 0,
            "text": ""
          },
          "redirectURL": "",
          "headersSize": 116,
          "bodySize": 580
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 262,
          "receive": 1329
        },
        "time": 1591,
        "_securityState": "insecure",
        "serverIPAddress": "192.168.1.12",
        "connection": "80",
        "pageref": "page_1"
      }
    ]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants