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

Main UI shows blank screen only on iOS 15.x #2153

Closed
hmerk opened this issue Oct 27, 2023 · 2 comments · Fixed by #2157
Closed

Main UI shows blank screen only on iOS 15.x #2153

hmerk opened this issue Oct 27, 2023 · 2 comments · Fixed by #2157
Labels
bug Something isn't working main ui Main UI

Comments

@hmerk
Copy link

hmerk commented Oct 27, 2023

The problem

After updating to SNAPSHOT #3686 (issue might have been introduced earlier), Main UI only shows a blank screen at iPadOS 15.8, so I can no longer use my older iPads.
No issue at iOS 17.1 as far as I could test.

Expected behavior

I would expect the same behavior like using iOS 17.1

Steps to reproduce

Nothing special, just use the above named iOS/iPadOS version with any browser or openHAB‘s app.

Your environment

I would post this information If I could see anything in MainUI

Browser console

not available at Apple mobile devices AFAIK

Browser network traffic

See above

Additional information

None

@hmerk hmerk added bug Something isn't working main ui Main UI labels Oct 27, 2023
@hmerk hmerk changed the title Main UI shows only blank screen Main UI shows blank screen only Oct 27, 2023
@florian-h05
Copy link
Contributor

I can reproduce this in BrowserStack on iOS 15.x and 16.x devices, where you can access the dev tools and browser console:

SyntaxError: Invalid regular expression: invalid group specifier name

Some googling said, that Safari seems to have a problem with lookbehind, I guess the issue is in a dependency of MainUI. Unfortunatyle I cannot track down the root cause of this ...

Do you know on which version it worked?

@florian-h05
Copy link
Contributor

florian-h05 commented Oct 29, 2023

You don't need to try to find out which snapshot version you came from. I luckily got an old iPhone 6s with iOS 15.8 to try out which of the latest MainUI commits broke it ... some good old try and error.

With #2055 MainUI broke for iOS 15.8 ... I just found out why:

const [command, ...segments] = payload.value.trim().split(/(?<!\\):/)

There we have the unsupported regex.

florian-h05 added a commit to florian-h05/openhab-webui that referenced this issue Oct 29, 2023
Fixes openhab#2153.
MainUI was not working on older iOS versions, e.g. 15.8, because RegEx lookbehind assertions were introduced with Safari 16.4.

Signed-off-by: Florian Hotze <[email protected]>
@florian-h05 florian-h05 changed the title Main UI shows blank screen only Main UI shows blank screen only on iOS 15.x Oct 29, 2023
florian-h05 added a commit that referenced this issue Oct 30, 2023
…ing (#2157)

Fixes #2153.
Regression from #2055.

MainUI was broken on older iOS versions, e.g. 15.8, because RegEx
lookbehind assertions were introduced with Safari 16.4.
This uses split by string instead and adds an ESLint rule to forbid
the usage of RegEx lookbehind assertions.

Signed-off-by: Florian Hotze <[email protected]>
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants