Giter VIP home page Giter VIP logo

wa-version's Introduction

WPPConnect/WA-Version

npm version Downloads Average time to resolve an issue Percentage of issues still open Build Status Lint Status release-it

WPPConnect/WA-Version is an open-source project to help WhatsApp Web navigation automation tools, making it possible to access older versions of the pages, thus allowing more time to adapt to the updates.

Our online channels

Discord Telegram Group WhatsApp Group YouTube

License

Copyright 2022 WPPConnect Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

wa-version's People

Contributors

bgastaldi avatar dependabot[bot] avatar edgardmessias avatar gekkedev avatar github-actions[bot] avatar icleitoncosta avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wa-version's Issues

Issues with github repo exodus whatsapp version

Hello, hope you are all doing great. I have tried following the steps of deleting the package files and then installing whatsapp web js from pedros github repo.

It resolves the evaluation issue for me but now I am limited to only sending text messages. Whenever I try sending audio, video, or any image it doesn't work and just stuck at client.sendMessage.

Thank you for looking,
Arsal

Whatsapp version 2.2412.54 has been removed

Recently I have been testing the application using WhatsApp web js.

But since version 2.2412.54 was removed, my app crashes after QR scan:

Initialize error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')
 at __puppeteer_evaluation_script__:5:95

What has been done is to replace the version to the most recent version::

2.3000.1014550396-alpha.html

But it still doesn't work. Any update refer to whatsapp version?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • build(deps-dev): update dependency @types/node to ^16.18.105
  • build(deps-dev): update dependency @types/node-fetch to ^2.6.11
  • build(deps-dev): update dependency ts-node to ^10.9.2
  • ci(deps): update actions/setup-node action to v3.8.2
  • build(deps): update dependency semver to ^7.6.3 (semver, @types/semver)
  • build(deps-dev): update commitlint monorepo to ^17.8.1 (@commitlint/cli, @commitlint/config-conventional, @commitlint/cz-commitlint)
  • build(deps-dev): update dependency eslint to ^8.57.0
  • build(deps-dev): update dependency pretty-quick to ^3.3.1
  • build(deps-dev): update dependency typescript to ^5.5.4
  • ci(deps): update wagoid/commitlint-github-action action to v5.5.1
  • build(deps-dev): update commitlint monorepo to v19 (major) (@commitlint/cli, @commitlint/config-conventional, @commitlint/cz-commitlint)
  • build(deps-dev): update dependency conventional-changelog-cli to v5
  • build(deps-dev): update dependency eslint to v9
  • build(deps-dev): update dependency husky to v9
  • build(deps-dev): update dependency pretty-quick to v4
  • build(deps-dev): update dependency release-it to v17
  • build(deps-dev): update typescript-eslint monorepo to v8 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • ci(deps): update actions/cache action to v4
  • ci(deps): update actions/checkout action to v4
  • ci(deps): update actions/setup-node action to v4
  • ci(deps): update wagoid/commitlint-github-action action to v6
  • chore(deps): lock file maintenance
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/commitlint.yml
  • actions/checkout v3
  • wagoid/commitlint-github-action v5.4.3
.github/workflows/lint.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/publish.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/create-release v1
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3.8.1
  • actions/cache v3
.github/workflows/wa-update.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • sarisia/actions-status-discord v1
  • sarisia/actions-status-discord v1
npm
package.json
  • node-fetch ^2.7.0
  • semver ^7.5.4
  • @commitlint/cli ^17.7.1
  • @commitlint/config-conventional ^17.7.0
  • @commitlint/cz-commitlint ^17.7.1
  • @types/node ^16.18.69
  • @types/node-fetch ^2.6.10
  • @types/semver ^7.5.6
  • @typescript-eslint/eslint-plugin ^5.62.0
  • @typescript-eslint/parser ^5.62.0
  • commitizen ^4.3.0
  • conventional-changelog-cli ^4.1.0
  • eslint ^8.49.0
  • eslint-config-prettier ^8.10.0
  • eslint-plugin-header ^3.1.1
  • eslint-plugin-prettier ^4.2.1
  • execa ~5.1.1
  • husky ^8.0.3
  • prettier ^2.8.8
  • pretty-quick ^3.1.3
  • release-it ^15.11.0
  • shx ^0.3.4
  • ts-node ^10.9.1
  • typescript ^5.2.2

  • Check this box to trigger a request for Renovate to run again on this repository

the event ready is broken

class ConnectionWhatsApp extends ConnectionWhatsAppInterface {
  constructor(clientId) {
    super(clientId);
    this.connection = null
    this.timeout = 2000
    this.code = null
    this.validConnection = false
  }

  getConnection() {
    if (this.connection) {
      return this.connection
    } else {
      console.log("Não há conexão para obter")
    }
  }

  setConnection(connection) {
    if (connection) {
      this.connection = connection
    } else {
      console.log("Erro no set da conexão")
    }
  }

  setValidConnection() {
    this.validConnection = true
  }

  hasValidConnection() {
    return this.validConnection
  }

  isInvalidConnection() {
    return !this.validConnection
  }

  setConnectionCodeStatus(code) {
    this.code = code
  }

  getConnectionCodeStatus() {
    if (this.code) {
      return this.code
    }
  }

  async createConnection() {
    return new Promise(async (resolve, reject) => {
      const clientId = this.clientId;
      console.log('DADOS OBTIDOS DA CHAMADA API CLIENT:', clientId);
      console.log('CRIANDO CLIENTE WEBJS');

      if (clientId === undefined) {
          console.log("NÃO FOI POSSÍVEL OBTER O CLIENTE ID");
          reject("Erro ao obter o cliente ID");
      }

      const mongoURI = process.env.MONGO_URI ?? 'mongodb://mongo-uri.local/';
      await mongoose.connect(mongoURI);
      const store = new MongoStore({ mongoose: mongoose });

      const client = new Client({
          puppeteer: {
              args: ['--no-sandbox'],
          },
          authStrategy: new RemoteAuth({
              clientId: `${clientId}`,
              store: store,
              backupSyncIntervalMs: 300000
          })
      });

      
    client.on('qr', (qr) => {
      console.log('QR CODE SOLICITADO BOT ID: ', clientId);
      reject();
    });
      
    client.on('authenticated', (session) => {
        console.log('Authenticated');
    });

    client.on('ready', async () => {
      const version = await client.getWWebVersion();
      console.log(`WWeb v${version}`);
      resolve();
  });

    client.on('message_create', (message) => {
      console.log("Mensagem evento ")
      console.log(message.body)
    })

    await client.initialize();
    
    })}

  destroyConnection() {
    if (this.connection) {
      return new Promise((resolve, reject) => {
        setTimeout(() => {
          console.log("Encerrando cliente...")
          this.connection.destroy()
            .then(data => {
              console.log("Client destruido com sucesso");
              resolve(data);
            })
            .catch(error => {
              console.error("Erro ao destruir cliente:", error);
              reject(error);
            });
        }, this.timeout);
      });
    }
  }
}

After the authenticated event is successfully triggered, the code encounters an error and does not reach the ready event. The reported error is:

Error: Execution context was destroyed, most likely because of a navigation.
    at rewriteError (/src/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:284:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext._ExecutionContext_evaluate (/src/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:227:56)
    at async ExecutionContext.evaluate (/src/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
    at async Client.inject (/src/node_modules/whatsapp-web.js/src/Client.js:101:13)
    at async /src/node_modules/whatsapp-web.js/src/Client.js:350:13

I'm using the version "whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#webpack-exodus".

When the authenticated event happens on my phone, it appears active, but the ready event never occurs.

File missing in wa-version/html

Latest version has been specified in versions.json file but it's missing in the html folder ... And so we're still getting the Evaluation failed error.

Is there an automation to pull latest version

Firstly, thank you for your hard work in keeping this package updated.
Kindly two questions:

  1. Is there a way to automatically pull the latest html version?
  2. After pulling an update, is there a way to automatically restart whatsapp-web?

Latest version

I can see that all the versions available in versions.json are expiring by the end of this month.

What is the recommended action?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.