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

Error after upgrading to 1.28.1 #1911

Closed
GDOR-11 opened this issue Nov 2, 2023 · 3 comments
Closed

Error after upgrading to 1.28.1 #1911

GDOR-11 opened this issue Nov 2, 2023 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@GDOR-11
Copy link

GDOR-11 commented Nov 2, 2023

Description

After upgrading to the newer version, there is a runtime error in dist/controllers/browser.js

Sorry if there isn't enough information, This is my first time creating an issue :'-)

Environment

  • WPPConnect version(s): 1.28.1
  • Browser: Chrome XX / Chromium XX (sorry I don't know how to check which version puppeteer is using)
  • OS: MacOS Sonoma 14.1 and Debian Bookworm 12 have errors, didn't check any other OS
  • Node version: Node 19.3.0
  • WhatsApp version: X.YYYY.ZZ (also not sure how to check, but I assume it would be 2.2347.x because I'm using the latest wppconnect version)
  • MultiDevice (BETA): yes/no (also don't know how to check)

Steps to Reproduce

  1. upgrade to 1.28.1
  2. run

Log Output

/directory/node_modules/@wppconnect-team/wppconnect/dist/controllers/browser.js:102
var ChromeLauncher = __importStar(require("chrome-launcher"));
                                  ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /directory/node_modules/chrome-launcher/dist/index.js from /directory/node_modules/@wppconnect-team/wppconnect/dist/controllers/browser.js not supported.
Instead change the require of index.js in /directory/node_modules/@wppconnect-team/wppconnect/dist/controllers/browser.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/controllers/browser.js:102:35)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/host.layer.js:69:17)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/community.layer.js:72:20)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/catalog.layer.js:72:25)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/labels.layer.js:72:23)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/status.layer.js:71:22)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/profile.layer.js:72:22)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/listener.layer.js:83:23)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/sender.layer.js:109:24)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/retriever.layer.js:72:22)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/group.layer.js:72:25)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/ui.layer.js:72:21)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/controls.layer.js:72:18)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/layers/business.layer.js:71:24)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/api/whatsapp.js:78:24)
    at Object.<anonymous> (/directory/node_modules/@wppconnect-team/wppconnect/dist/index.js:32:18) {
  code: 'ERR_REQUIRE_ESM'
}

Your Code

const wppconnect = require("@wppconnect-team/wppconnect");
wppconnect.create({
    session: "minimal example"
});
@voxsoftware
Copy link

Still a problem with 1.28.2
Chrome browser never started. With chromium works.

@icleitoncosta
Copy link
Contributor

Still a problem with 1.28.2

Chrome browser never started. With chromium works.

Please, reinstall.
npm install or yarn install

@voxsoftware
Copy link

voxsoftware commented Nov 12, 2023

Still a problem with 1.28.2
Chrome browser never started. With chromium works.

Please, reinstall. npm install or yarn install

I tested reinstalling, and not working.
Also I made a test, disabling headless, chrome browser starts, but never navigates to web.whatsapp webpage.

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

No branches or pull requests

3 participants