Reputation: 73
So for about 2 days now, Back4App doesn't work with any of my apps. They all produce the same response:
Reading: Uncaught (in promise) TypeError: this is undefined
Writing: No response, error or info at all
Updating: Uncaught (in promise) TypeError: this is undefined
It was just working yesterday morning, and now none of my apps are working.
I have the free plan, and my plan usage isn't even half way, so that's not the problem.
I've tried it with several apps, they all do the same thing. I've even tried apps I hadn't touched in months.
Is Back4App's servers down, or is it something I did?
Here's the URLs for 2 of the main apps:
www.fps5.ml
www.fps2.ml
And one more strange thing, when querying to find all rows in the class, it will return:
Uncaught (in promise) Error: Object not found.
When using
new Parse.Query(Parse.Object.extend("Lobby")).get("objectId")
Which that class/object does exist for sure.
Here's the code for what happens in the picture:
function findLobby(selected) {
(async() => {
let e = !1;
const t = Parse.Object.extend("Lobby");
const n = new Parse.Query(t);
const s = await n.find();
for (let t = 0; t < s.length; t++) {
const n = Parse.Object.extend("Lobby");
new Parse.Query(n).get(s[t].id).then((t => {
const n = { name: t.get("name"), time: t.get("createdAt"), code: t.get("code") };
if (e) {
document.querySelector(".swal-content").innerHTML += n.code.length > 0 ? "" : '<div class="lobby" id="' + btoa(encodeURIComponent(n.name)).replace(/\=/gi,"") + '">"<a onclick="location.assign(\'./src.html?lobby=' + encodeURIComponent(n.name) + '\')">' + (n.name.trim() == "" ? ("(blank space)") : n.name.trim()) + '</a>" : ' + n.time.toString().split(" ").reverse().splice(4).reverse().splice(1).join(" ").split(":").reverse().splice(1).reverse().join(":") + "</div>";
} else {
e = !0;
let content = document.createElement("div");
content.innerHTML = n.code.length > 0 ? "" : '<br><div class="lobby" id="' + btoa(encodeURIComponent(n.name)).replace(/\=/gi,"") + '">"<a onclick="location.assign(\'./src.html?lobby='+encodeURIComponent(n.name)+'\')">' + n.name+'</a>" : ' + n.time.toString().split(" ").reverse().splice(4).reverse().splice(1).join(" ").split(":").reverse().splice(1).reverse().join(":") + "</div>";
swal({
title: "FIND A LOBBY",
content: content
});
}
}));
setTimeout(() => {
if (selected) {
document.querySelector("#"+btoa(encodeURIComponent(selected)).replace(/(\=)/gi,"")).style.outline = "2px solid #38b6ff";
document.querySelector("#"+btoa(encodeURIComponent(selected)).replace(/(\=)/gi,"")).scrollIntoView();
}
}, 1000);
}
})();
setTimeout(() => {
swal.getState().isOpen || swal({
icon: "error",
title: "Error",
text: "Sorry, it looks like our lobby servers are down. Try again later to check if the issue is resolved."
});
}, 5000);
}
I've even went into Back4App and made a row there. It works fine directly but won't work at all remotely.
It looks like the "Users" class works fine on all of the apps, "Lobby" is a custom one made by me.
Upvotes: 0
Views: 406
Reputation: 576
How are you installing the Parse SDK?
It looks like there's a new release made 2/3 days ago, and it could be the reason for this behavior.
Can you roll it back to a previous version?
The latest version is 3.5.0. So, try the previous one 3.4.4.
If you are installing the minified SDK, you can install this version by updating this part of your code:
<script type="text/javascript" src="https://npmcdn.com/parse/dist/parse.min.js"></script>
to:
<script type="text/javascript" src="https://npmcdn.com/[email protected]/dist/parse.min.js"></script>
Upvotes: 3