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

[BUG] TypeError: this.refreshToken is not a function #80

Closed
ghostzero opened this issue Jul 30, 2023 · 3 comments
Closed

[BUG] TypeError: this.refreshToken is not a function #80

ghostzero opened this issue Jul 30, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ghostzero
Copy link

ghostzero commented Jul 30, 2023

Describe the bug
TypeError: this.refreshToken is not a function

To Reproduce
Steps to reproduce the behavior:

  1. Configure identity with id, secret, acessToken & refreshToken, set listener to type websocket.
  2. Run the application and subscribe to channel.follow & channel.update
  3. Wait like 2-4 hours to run into this exception.

Expected behavior
No exception, refresh token get's renewed without issues.

Screenshots

C:\Users\XXXXXXXXX\git\XXXXXXXXX\node_modules\tesjs\lib\auth.js:121
            this.refreshToken();
                 ^

TypeError: this.refreshToken is not a function
    at Timeout._validateToken [as _onTimeout] (C:\Users\XXXXXXXXX\git\XXXXXXXXX\node_modules\tesjs\lib\auth.js:121:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.6.1

Environment:

  • OS:
  • Node Version: v19.6.1
  • TESjs Version: 1.0.2

Additional context
No additional content.

@ghostzero ghostzero added the bug Something isn't working label Jul 30, 2023
@ghostzero ghostzero changed the title [BUG] [BUG] TypeError: this.refreshToken is not a function Jul 30, 2023
@mitchwadair
Copy link
Owner

Thank you for the report! I'll look into this ASAP

@mitchwadair
Copy link
Owner

I believe I have found the issue, but repro is slow so hopefully I'll have the fix published in the next couple of days

mitchwadair added a commit that referenced this issue Aug 1, 2023
mitchwadair added a commit that referenced this issue Aug 1, 2023
* #80: bind this in interval callback

* #80: update build

* fix test
@mitchwadair
Copy link
Owner

Fix is now live in v1.0.3. Bump your version to that and you should be good to go 👍 Thanks again for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants