'How to fix "This operation is not supported in the environment this application is running on. "location.protocol" ..." error running Xcode?

I am trying to run an Ionic Capacitor app with an iPhone simulator via Xcode. It worked fine for the last couple of weeks. Also running the app with local host (ionic serve) still works fine.

However, since yesterday I am getting the following error when running it on the simulator or directly on an iPhone via Xcode:

[error] - ERROR {"code":"auth/operation-not-supported-in-this-environment","message":"This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled."}

For authentication I simply use Firebase Email and Password Auth. No Facebook or Google Auth.

I already tried to use other Firebase libraries as suggested in this post. But that didn't help.

Anyone an idea how to fix that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source