android – Errors whereas utilizing firebase

0
20
android – Errors whereas utilizing firebase


Hello i’m creating on ionic cordova and we’re utilizing firebase to take heed to occasions. The prevailing circulation is, we generate a cost hyperlink , open it utilizing a inapp browser (for android) or SFViewController (for ios), and take heed to firebase occasions for present standing. When the standing is beneficial we shut the inapp browser.

Nonetheless, whereas the android implementaiton works high quality. We get the next errors

@firebase/firestore: Firestore (8.6.2): FIRESTORE (8.6.2) INTERNAL ASSERTION FAILED: Surprising state

I’ve tried looking for the above subject received some hyperlinks which inform to improve or downgrade the verions for firebase which i attempted and it failed
please assist.

code snippet

perform startListeningMultisafePayUpdatesIos(information) {
                $timeout(() => {
                    const orderId = information.orderId;
                    firebase.firestore().assortment("multisafepayPayments").doc(orderId).set({
                        financialStatus: "",
                        orderId: orderId,
                        transactionJson: {}
                    }).then(() => {
                        unsubscribeMultisafePayListener = firebase.firestore()
                            .assortment("multisafepayPayments")
                            .doc(orderId)
                            .onSnapshot(perform (doc) {
                                if (doc.exists) {
                                    console.log("doc information exisits");
                                    console.log(doc.information);
                                    // let message = doc.information();
                                    // if (typeof message.paymentKeyData !== "undefined" && message.paymentKeyData !== null) {
                                    //     let paymentJsonData = decodeURIComponent(message.paymentKeyData);
                                    //     if (paymentJsonData !== null) {
                                    //         submitPayment(JSON.parse(paymentJsonData));
                                    //         SafariViewController.disguise();
                                    //     }
                                    // } else if (typeof message.reloadFrame !== "undefined" && message.reloadFrame === 'True') {
                                    //     SafariViewController.disguise();
                                    //     reloadControls();
                                    // }
                                }
                            });
                    }).catch((error) => {
                        console.error("Multisafepay Cost error: ", error);
                        // navigator.notification.alert(
                        //     error.message || error,
                        //     perform () { },
                        //     capitalizeFirstLetter("There was an error utilizing apple pay for this cost"),
                        //     $translate.instantaneous("OK")
                        // );
                    });

                    let loadFrameUrl = information.url;

                    SafariViewController.isAvailable(perform (accessible) {
                        if (accessible) {
                            SafariViewController.present({
                                url: loadFrameUrl,
                                hidden: false,
                                animated: false
                            }, perform (consequence) {
                                if (consequence.occasion === 'opened') {
                                    console.log('opened');
                                } else if (consequence.occasion === 'loaded') {
                                    console.log('loaded');
                                } else if (consequence.occasion === 'closed') {
                                    console.log('closed');
                                }
                                $scope.freedompayInterimLoading = false;
                            }, perform (msg) {
                                navigator.notification.alert(
                                    msg,
                                    perform () { },
                                    capitalizeFirstLetter("There was an error utilizing multisafepay for this cost"),
                                    $translate.instantaneous("OK")
                                );
                                // $scope.freedompayInterimLoading = false;
                            });
                        } else {
                            navigator.notification.alert(
                                "SFViewController not accessible",
                                perform () { },
                                capitalizeFirstLetter("There was an error utilizing apple pay for this cost"),
                                $translate.instantaneous("OK")
                            );
                            // $scope.freedompayInterimLoading = false;
                        }
                    });
                }, 1000);
            }

LEAVE A REPLY

Please enter your comment!
Please enter your name here