baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

auth/operation-not-supported-in-this-environment Error #118

Open alexookah opened 3 years ago

alexookah commented 3 years ago

Hello, I have built an angular ionic project and i use capacitor with this plugin in order to login with firebase using Phone auth. It works as intended in android, but in iOS i get this error: ⚡️ [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."}

I recently updated my package.json, so i am not really sure what exactly the problem is. Maybe firebase has changed something? Has anyone else the same issue?

julienkermarec commented 3 years ago

Same problem here, maybe since the last Xcode update ?

alexookah commented 3 years ago

@julienkermarec No, i figured it out. The problem is only with angularFire 6.0.3 version in iOS only (works in android). Downgrade to 6.0.2 and it will work in both iOS and android. I am not really sure if the capacitor-firebase-auth plugin is related with angularFire 6.0.3 update. Maybe we should also make an issue in AngularFire repository.

julienkermarec commented 3 years ago

Same problem after downgrading @angular/fire to 6.0.2. I use Ionic 5 and cordova-ios 6.1.1. So strange, last week it is working.

alexookah commented 3 years ago

make sure to npm install specific version like this: npm install angularFire@6.0.2 (this will also update the package.lock) delete the node_modules and then run npm i.

julienkermarec commented 3 years ago

Solved, thank you @Alexookah !

shidil commented 3 years ago

Im getting this error on an ionic react project following instructions from the Readme file.

shidil commented 3 years ago

Got it working, there was an issue with the capacitor plugin installation for me.

ray1295 commented 3 years ago

Got it working, there was an issue with the capacitor plugin installation for me.

@Shidil What was the issue with the capacitor plugin and how did you solve it?

MNorgren commented 3 years ago

Got it working, there was an issue with the capacitor plugin installation for me.

@Shidil Also interested in how you resolve the capacitor plugin issue

MNorgren commented 3 years ago

I am also having this problem, but with @angular/fire 6.1.4 . Reading other threads, it appears it should have been resolved in @angular/fire 6.0.4. Not sure why I am still encountering this on iOS

seetharamadurbha commented 3 years ago

hi @MNorgren, could you find any solution for this with @angular/fire 6.1.4 (I am using 6.1.5)?

julienkermarec commented 3 years ago

it is working with 6.1.5 for me, just a problem on iPad with the both methods (signInWithPopup,signInWithRedirect), i receive this 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."}

bastifix commented 2 years ago

it is working with 6.1.5 for me, just a problem on iPad with the both methods (signInWithPopup,signInWithRedirect), i receive this 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."}

Got any solutions here?