Cardboard game needs an arbitrary number of restarts before it starts working

So I made a simple endless runner for mobile VR some time ago and it worked on all the phones I tested on (Huawei P20, Xiaomi Redmi Note 5 Plus, Nokia 3.1) but it manifests weird behaviour on Huawei P30 Lite - namely, when you tap the icon, it tries to start, shows a weird distorted empty screen (as if it wanted to squeeze the horizontal view into the vertical mode the phone is in) and then crashes back to desktop. No matter the settings for auto-rotation of the device, the rotation of it when starting the game or whether you run it directly or through the Cardboard app. Here’s what it looks like: Launch fail - YouTube

As you can see, it crashes each time but after you do it enough times, it will eventually start up properly. Sometimes it needs two tries, sometimes 10, sometimes 20. What may be causing this weird behaviour and crashing? None of these issues happen on the other phones I’ve tested but it has to be a thing cause I also have some crash reports on my dev console from other phones :confused:

When I have android restart loops it is usually because I don’t have my storage permissions set up properly in my project settings.

It’s not wiring so much as setting them in the Android section of your Project Settings. You can do a web search for Android Permissions and find the ones related to storage like android.EXTERNAL_STORAGE or whatever it’s called (sorry I don’t have it memorized)

Make sure to use the full name of the permission when you add it to your required Android permissions list in your project’s Project Settings under Android section.

This was only an issue because I was storing stuff on the device, like savegame files, and doing that right when the game started up (in my Game Instance class)

@mightyenigma - thanks a lot! Would you share some tips on how you make sure the storage permissions are set up correctly? How do you wire them up for them to be “correct”? Thanks a lot in advance!