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

openTrialPage creates an infinity loop and continuously opens in dev mode #237

Open
job-tracker-git opened this issue Sep 5, 2024 · 1 comment

Comments

@job-tracker-git
Copy link

Describe the bug
A clear and concise description of what the bug is.
I've tried tried a simple instance of invoking the trail page, and it is getting called in an infinite loop: if (!window.location.href.startsWith('chrome://extensions/')){ extpay.getUser().then(user => { if (user.trialStartedAt == null){ try{ extpay.openTrialPage("7-day"); } catch(e){ console.log("error", e); } } else if(user.trialStartedAt != null && (now - user.trialStartedAt) > sevenDays && (!user.paid)) { extpay.openPaymentPage() userGood = false } }); }
To Reproduce
Steps to reproduce the behavior:
try and use openTrialPage, and you will get the popup stuck in an infinity loop of opening itself up.

Expected behavior
This should only open up once
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [iOS]
  • Browser [chrome]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. macOS]
  • OS:14.0 (23A344)
  • Browser [chrome]
  • Version [latest]

Additional context
Add any other context about the problem here.

@job-tracker-git
Copy link
Author

Screenshot 2024-09-07 at 10 33 49 AM
I think this code is the issue, I'm already listening to messages on the chrome runtime, and doing things that sends messages like taking screenshots, hence the infinite loop that it gets stuck in, is there a way I can edit this so I can send a message in a different way?

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

1 participant