capacitor-firebase-auth icon indicating copy to clipboard operation
capacitor-firebase-auth copied to clipboard

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

Open alexookah opened this issue 4 years ago • 13 comments

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?

alexookah avatar Oct 03 '20 14:10 alexookah

Same problem here, maybe since the last Xcode update ?

julienkermarec avatar Oct 06 '20 18:10 julienkermarec

@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.

alexookah avatar Oct 06 '20 18:10 alexookah

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.

julienkermarec avatar Oct 06 '20 18:10 julienkermarec

make sure to npm install specific version like this: npm install [email protected] (this will also update the package.lock) delete the node_modules and then run npm i.

alexookah avatar Oct 06 '20 18:10 alexookah

Solved, thank you @Alexookah !

julienkermarec avatar Oct 06 '20 19:10 julienkermarec

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

shidil avatar Nov 24 '20 18:11 shidil

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

shidil avatar Nov 25 '20 03:11 shidil

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?

ray1295 avatar Jan 22 '21 09:01 ray1295

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 avatar Mar 18 '21 15:03 MNorgren

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

MNorgren avatar Mar 18 '21 15:03 MNorgren

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

seetharamadurbha avatar May 26 '21 03:05 seetharamadurbha

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."}

julienkermarec avatar Aug 22 '21 17:08 julienkermarec

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?

bastifix avatar Jun 01 '22 07:06 bastifix