Error with screen orientation lock on mobile

I’ve noticed when I preview my game on mobile, I get the error below.

I’ve tried using JavaScript codes to work around this but I believe it causes all my Javascript to error out and not execute. My project is set to Portrait for mobile screen orientation. I don’t use any extensions or actions that affect screen orientation.

I’m using the Safari app on iPhone 14.

Has anybody encountered this before, and how can I fix it?

If you wrote window.screen.orientation.lock() try replacing it with window.screen.orientation.lock

I didn’t write this line anywhere. It’s not in any of my JavaScript blocks.

What are your events?

My event sheet is a little big. I’m not on my PC and can only do screenshots but as a new member I can only post 1 image. Here is the start of the event sheet which I think is most likely where the error would occur.

A better screenshot.

The browser does not fully support the Screen Orientation API.

You’re currently in the preview mode of your GDevelop project. Start a build and test it directly on your mobile device—not the preview.