Skip to content

Commit f7a949e

Browse files
committed
Change to wait 200ms between mod installs. Seems to be a race condition in QAVS
1 parent 5525e5d commit f7a949e

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

QuestAppVersionSwitcher/Assets/html/flows/beat_saber_modding.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -631,19 +631,21 @@ <h2>Upload logs</h2>
631631
}
632632
}).then(mods => {
633633
// For each mod's download link, perform a POST request
634-
mods.forEach(async url => {
635-
await fetch(start + "/api/mods/installfromurl", {
636-
method: "POST",
637-
body: url
638-
})
639-
.then(postRes => {
640-
if (!postRes.ok) {
641-
console.error(`Failed to post link: ${postRes.status} ${postRes.statusText}`);
642-
} else {
643-
console.log(`Successfully posted link: ${url}`);
644-
}
645-
})
646-
.catch(error => console.error("Error posting link:", error));
634+
mods.forEach((url, index) => {
635+
setTimeout(() => {
636+
fetch(start + "/api/mods/installfromurl", {
637+
method: "POST",
638+
body: url
639+
})
640+
.then(postRes => {
641+
if (!postRes.ok) {
642+
console.error(`Failed to post link: ${postRes.status} ${postRes.statusText}`);
643+
} else {
644+
console.log(`Successfully posted link: ${url}`);
645+
}
646+
})
647+
.catch(error => console.error("Error posting link:", error));
648+
}, 200 * index);
647649
});
648650
}).then(() => {
649651
localStorage.openMainDefault = true

0 commit comments

Comments
 (0)