Pwa. On deferredPrompt.prompt() DOMException - progressive-web-apps

While trying to install a PWA with this code:
btnAddPwa.addEventListener('click', (e) => {
deferredPrompt.prompt();
})
Is throwing a error message
This is still a problem. Anyone have idea of how to solve this?

Related

Email verification flutter firebase exception

Here's my home_view.dart file
Figure 1 Figure 2
I'm getting an exception... And here it is...
Help me to how to do email verification.
Try using addPostFrameCallback
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Navigator.of(context)...
});

How to present a modal when Axios catch gives a 404 error

If there is a coms failure axios will throw a 404 error. The below code nicely puts up an error message on my page:
["catch"](function (error) {
$("div.comsAlert").addClass("alert alert-danger").text('There is a communications failure. Please Refresh the page, and try again');
});
Great, however, what I really want is a Bootstrap modal to be presented on my page. There is quite a bit of HTML. I have tried Jquery append with no luck.
Any ideas?
Bootstrap 5 modals

Flutter app is crashing although I wrote it in try catch block

I am using Firebase Auth for my app and for login and to handle errors I wrote it in a try-catch block, but when I enter an incorrect password the app just crashes and throws "PlatformException (PlatformException(ERROR_WRONG_PASSWORD, The password is invalid or the user does not have a password., null))" this error.
How can I fix this?
Here is the code, and the same is for registering users.
try {
final newUser = await _auth.signInWithEmailAndPassword(email: email, password: password);
if (newUser != null) {
Navigator.pop(context);
}
} catch (e) {
print(e);
}
If the solution with VSCode's "All Exceptions" didn't work for you...
Keep in mind that the debug version may throw exceptions while the same code in a release version may not.
If you are sure that your code is failing within the try block and you are handling the catch correctly (like OP is), then try running your app with flutter run --release and check to see if it works.
Check this question/answer here for a bit more information: Flutter catching all unhandled exceptions

Ionic + Account kit phone number = crash on android

I want to user accountkit on ionic for connection but when i press the button the app is crashing with no errors
Method :
(<any>window).AccountKitPlugin.loginWithPhoneNumber({
useAccessToken: true,
defaultCountryCode: "IN",
facebookNotificationsEnabled: true,
}, data => {
(<any>window).AccountKitPlugin.getAccount(
info => this.userInfo = info,
err => console.log(err));
});
Someone can help me ?
I also get this error today and waste so much time to find a solution for it. But all question has no answer. Finally, I got a solution that is work for me. I post here for someone who need.
Add this line
cordova.system.library.9=com.google.android.gms:play-services-auth:16.0.0
into platforms/android/project.properties
Hope it is useful

React Native Facebook logInWithReadPermissions not working

I'm trying to use the react-native-fbsdk to get a user's access token. Upon calling the logInWithReadPermissions method, I keep getting an error that says "undefined is not an object (evaluating 'LoginManager.logInWithReadPermissions')"
I installed the npm dependency and imported it:
import { LoginManager, AccessToken } from 'react-native-fbsdk'
The class method loginWithFacebook looks like this:
logInWithFacebook = () => {
LoginManager.logInWithReadPermissions([ 'public_profile', 'user_friends' ]).then(
(result) => {
if(result.isCanceled) {
alert('Login cancelled')
} else {
AccessToken.getCurrentAccessToken().then(({ accessToken }) => {
console.log('Access Token : ', accessToken)
})
}
},
(error) => {
console.error('error : ', error)
}
)
}
I've tried clearing my cache, moving the project to my Documents directory, re-installing all npm packages... and still, I keep getting this error. Click here to see the Expo debugging screen.
Any suggestions would be greatly appreciated. Thank you!
You can not use libraries that require native code configuration via react-native link with a standard Expo project. In order to use said libraries, you need to detach and use ExpoKit. Here are the docs regarding ExpoKit: https://docs.expo.io/versions/latest/guides/detach.html
With that said, we do have a Facebook API that may do what you need that is built into the Expo SDK. https://docs.expo.io/versions/latest/sdk/facebook.html
Additionally, logInWithReadPermissions is a method from old react-native-fbsdk version 0.8.0.
Now you should use logInWithPermissions since you have react-native-fbsdk version 0.10.0.