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

OH3: Unsupported request method HEAD #888

Closed
balajisraghavan opened this issue Feb 7, 2021 · 6 comments · Fixed by #908
Closed

OH3: Unsupported request method HEAD #888

balajisraghavan opened this issue Feb 7, 2021 · 6 comments · Fixed by #908
Labels
bug Something isn't working main ui Main UI question Further information is requested

Comments

@balajisraghavan
Copy link

balajisraghavan commented Feb 7, 2021

Connecting via myopenhab.com to OH3 results in [WARN ] [io.openhabcloud.internal.CloudClient] - Unsupported request method HEAD

==> /var/log/openhab/openhab.log <==
2021-02-07 17:15:51.944 [WARN ] [io.openhabcloud.internal.CloudClient] - Unsupported request method HEAD

Expected behavior

myopenhab.com displays the UI, as was the case in OH2

Steps to reproduce

  1. Install OH3 and openhab cloud connector
  2. add the UUID and secret to myopenhab
  3. Go to dashboard
  4. Displays empty page in browser. Sitemaps takes 3 minutes to timeout. UI loads after that

Screenshot 2021-02-07 at 5 32 59 PM

Your environment

Ubuntu 20 LTS

@balajisraghavan balajisraghavan added bug Something isn't working main ui Main UI labels Feb 7, 2021
@ghys
Copy link
Member

ghys commented Feb 7, 2021

This looks related to https://github.com/openhab/openhab-cloud then, not the UI.
Ping @openhab/openhab-cloud-maintainers

@ghys ghys added the question Further information is requested label Feb 7, 2021
@candiesdoodle
Copy link

Bump. Got the same issue. Have to try many times to get this working. When it doesn't work, I get the Unsupported request method HEAD error

ghys added a commit that referenced this issue Feb 14, 2021
Fix #888.
openHAB Cloud doesn't seem to support forwarding HTTP HEAD requests.
So do a GET /rest/sitemaps instead to determine whether the user operations are
allowed anonymously, which is a little bit of overhead but since it's only the _list_
of sitemaps it should be acceptable in most cases.

Signed-off-by: Yannick Schaus <github@schaus.net>
@lolodomo
Copy link
Contributor

Just for information, I discovered that the page is finally displayed after several ... minutes !
Hopefully @ghys just proposed a fix.

@ghys
Copy link
Member

ghys commented Feb 14, 2021

This seems consistent with the screenshot in the OP (the request lasts 3 minutes).
I figure openHAB Cloud logs the "unsupported method" message but keeps the connection open until it eventually timeouts, then the UI continues loading.
#908 will hopefully fix this.

@ghys ghys closed this as completed in #908 Feb 22, 2021
ghys added a commit that referenced this issue Feb 22, 2021
Fix #888.
openHAB Cloud doesn't seem to support forwarding HTTP HEAD requests.
So do a GET /rest/sitemaps instead to determine whether the user operations are
allowed anonymously, which is a little bit of overhead but since it's only the _list_
of sitemaps it should be acceptable in most cases.

Signed-off-by: Yannick Schaus <github@schaus.net>
@bf8392
Copy link

bf8392 commented Apr 13, 2021

I have the same issue on multiple instances...how can I help fix this?

ghys added a commit that referenced this issue Apr 18, 2021
Fix #888.
openHAB Cloud doesn't seem to support forwarding HTTP HEAD requests.
So do a GET /rest/sitemaps instead to determine whether the user operations are
allowed anonymously, which is a little bit of overhead but since it's only the _list_
of sitemaps it should be acceptable in most cases.

Signed-off-by: Yannick Schaus <github@schaus.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants