Open Wasfgsd opened 13 hours ago
Even trying older builds that worked, going into the appdata/local folder and deleting any cache and playwright files and it still no longer works, I'm unsure what's gone wrong.
Even trying older builds that worked, going into the appdata/local folder and deleting any cache and playwright files and it still no longer works, I'm unsure what's gone wrong.
Disable puchcards, it should work
May be this can help if you update Workers.ts
// Punch Card async doPunchCard(page: Page, data: DashboardData) { // Filter uncompleted punch cards, ensuring parentPromotion exists const punchCardsUncompleted = data.punchCards?.filter(x => x.parentPromotion && !x.parentPromotion.complete) ?? [];
if (!punchCardsUncompleted.length) {
this.bot.log('PUNCH-CARD', 'All "Punch Cards" have already been completed');
return;
}
for (const punchCard of punchCardsUncompleted) {
// Ensure parentPromotion exists before proceeding
if (!punchCard.parentPromotion) {
this.bot.log('PUNCH-CARD', 'Skipping punchcard: Parent promotion is missing or null');
continue; // Skip this punch card
}
// Get latest page for each card
page = await this.bot.browser.utils.getLatestTab(page);
const activitiesUncompleted = punchCard.childPromotions.filter(x => !x.complete); // Only return uncompleted activities
// Solve Activities
this.bot.log('PUNCH-CARD', `Started solving "Punch Card" items for punchcard: "${punchCard.parentPromotion.title}"`);
// Go to punch card index page in a new tab
await page.goto(punchCard.parentPromotion.destinationUrl, { referer: this.bot.config.baseURL });
// Wait for new page to load, max 10 seconds, however try regardless in case of error
await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(() => {});
await this.solveActivities(page, activitiesUncompleted, punchCard);
page = await this.bot.browser.utils.getLatestTab(page);
const pages = page.context().pages();
if (pages.length > 3) {
await page.close();
} else {
await this.bot.browser.func.goHome(page);
}
this.bot.log('PUNCH-CARD', `All items for punchcard: "${punchCard.parentPromotion.title}" have been completed`);
}
this.bot.log('PUNCH-CARD', 'All "Punch Card" items have been completed');
}
Never seen this happen before, but I will add a check for it, most likely exactly as given above.
The program closes as soon as it logs in and gets to the reward page, these are my settings in .config. I tried uninstalling/deleting the program and rebuilding it, but it does the same thing.