Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.5] The script collected xxx points missing from logs #226

Closed
mgrimace opened this issue Feb 7, 2025 · 13 comments
Closed

[1.5] The script collected xxx points missing from logs #226

mgrimace opened this issue Feb 7, 2025 · 13 comments

Comments

@mgrimace
Copy link
Contributor

mgrimace commented Feb 7, 2025

I no longer get 'the script collected xxx points today' log item. I have parallel=true and clusters=2.

Adding await log does not fix it. Perhaps because of parallel being true, or due to it appearing in the mobile part of index.ts? Potentially worth a look as it would make a great notification. Adding as a separate issue because I buried it in my notification testing issue #90

        const afterPointAmount = await this.browser.func.getCurrentPoints()

        log(this.isMobile, 'MAIN-POINTS', `The script collected ${afterPointAmount - this.pointsInitial} points today`)

        // Close mobile browser
        await this.browser.func.closeBrowser(browser, account.email)
        return
    }

}
@TheNetsky
Copy link
Owner

I think that's fixed by #228

@mgrimace
Copy link
Contributor Author

mgrimace commented Feb 8, 2025

I think that's fixed by #228

Tested the fix above, and I still don't have any log line that says 'the script collected'. Would it make sense to move it out of mobile and into runTasks instead in the index.ts?

I do have parallel and clusters on in case that's messing with things.

@AariaX
Copy link
Contributor

AariaX commented Feb 9, 2025

Screenshot_2025-02-09-12-28-57-50_64ef5fc2000c1caa954c114bb372e1d5.jpg

Working fine for me

@mgrimace
Copy link
Contributor Author

mgrimace commented Feb 9, 2025

Screenshot_2025-02-09-12-28-57-50_64ef5fc2000c1caa954c114bb372e1d5.jpg

Working fine for me

huh, are you using parallels and/or clusters? I can't imagine why it wouldn't even show in my logs if it should be

@AariaX
Copy link
Contributor

AariaX commented Feb 9, 2025

Screenshot_2025-02-09-12-28-57-50_64ef5fc2000c1caa954c114bb372e1d5.jpg

Working fine for me

huh, are you using parallels and/or clusters? I can't imagine why it wouldn't even show in my logs if it should be

4 clusters non parallel

@mgrimace
Copy link
Contributor Author

mgrimace commented Feb 9, 2025

4 clusters non parallel

confirming now that the issue is with parallel enabled/true. I tested it off, and it generated the log item and notification.

When parallel is enabled, the log entry for 'the script collected...' does not appear

@TheNetsky
Copy link
Owner

4 clusters non parallel

confirming now that the issue is with parallel enabled/true. I tested it off, and it generated the log item and notification.

When parallel is enabled, the log entry for 'the script collected...' does not appear

Is there any other message you get instead?
Example Unable to complete mobile searches, bad User-Agent? Increase search delay? Retrying... instead?

@mgrimace
Copy link
Contributor Author

mgrimace commented Feb 9, 2025

4 clusters non parallel

confirming now that the issue is with parallel enabled/true. I tested it off, and it generated the log item and notification.
When parallel is enabled, the log entry for 'the script collected...' does not appear

Is there any other message you get instead? Example Unable to complete mobile searches, bad User-Agent? Increase search delay? Retrying... instead?

As far as I can tell it just doesn't appear, no errors or other messages. I'll double check
edit: confirming no error messages, the log item simply doesn't exist when parallels are on

@AariaX
Copy link
Contributor

AariaX commented Feb 10, 2025

Tested with parallels on, log still appear for me

@mgrimace
Copy link
Contributor Author

Tested with parallels on, log still appear for me

Huh, well that’s odd. AFAIK the only change to index.ts that I made was to add await log before the two ‘completed’ lines (for ALL, and for email). I’ll double check that I didn’t break anything by accident. Are you using your ntfy branch index?

@mgrimace
Copy link
Contributor Author

Ah ok, I think I narrowed it down: the initial run DOES show the points with parallels on/off. Subsequent runs on the same day, do not show points (for me). I was testing the script so much I had already gained points, and the following runs weren't showing anything. I'll close the issue but I have two suggestions:

  • consider moving this out of 'mobile' and into tasks in index.ts
  • consider a 'zero' points if it's not in there already

Unfortunately, I don't know enough about the syntax of index.ts to do this myself without hopelessly breaking it.

@TheNetsky
Copy link
Owner

I mean Mobile is always ran after Desktop, regardless if it's set up to do searches or not.

And if it cannot gather points, since they've all been completed it should show "No points to earn and "runOnZeroPoints" is set to "false", stopping!" unless of course "runOnZeroPoints" is enabled, if that is enabled it should show the final count.

@mgrimace
Copy link
Contributor Author

I mean Mobile is always ran after Desktop, regardless if it's set up to do searches or not.

And if it cannot gather points, since they've all been completed it should show "No points to earn and "runOnZeroPoints" is set to "false", stopping!" unless of course "runOnZeroPoints" is enabled, if that is enabled it should show the final count.

That makes sense, and I'll add a notification for 'no points to earn', appreciate that lead thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants