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

Uncaught TypeError: Cannot read properties of undefined (reading 'VERSION') #1851

Closed
HereOrCode opened this issue Apr 21, 2024 · 3 comments
Closed

Comments

@HereOrCode
Copy link

WA-JS Version

3.1.1

WhatsApp Version

2.3000.1012938617

Browser Version

Chrome 124.0.6367.62

Operation System

macOS 13.3.3

Steps to reproduce

  1. Install the Demo extension
  2. Open URL: https://web.whatsapp.com/

Demo.zip

What is expected?

it doesn't fail and inject the code successfully

it points to this line in the code (self.Debug is undefined)
https://github.com/wppconnect-team/wa-js/blob/main/src/webpack/index.ts#L163

#1801

What is actually happening?

fails and keeps WPP global object undefined

Any additional comments?

No response

@javix64
Copy link

javix64 commented Apr 21, 2024

+1 to this issue.
Actually I want to open a issue about this.

Also I would like to point out that if you copy & paste the entire code from: wppconnect-wa.js in the terminal of Chrome, you are able to access to all functions and use it.

@HereOrCode
Copy link
Author

@javix64

you are right.

Paste the wppconnect-wa.js code in the console, and it should run smoothly.

It won't work properly when injected using Tampermonkey and Chrome extensions.

@javix64
Copy link

javix64 commented Apr 22, 2024

Hey @code4you2021 I have found a low quality solution for this issue.

If you search in the entire project self.Debug.VERSION, it will appear only two result, change it for a higher version. For example:

compare(self.Debug.VERSION, '2.3000.0', '>=') ==> compare('2.3000.1', '2.3000.0', '>=')

Let's see what the maintainers need to say about this issue. 😄

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

2 participants