Jump to content
Get 20% off with our White Friday Deal🥳 ×

Whatsapp Gateway | Multi Device v8.5.1


Magd Almuntaser

Recommended Posts

19 hours ago, Magd Almuntaser said:

Are you running the node through pm2 or directly from the node?
If you have terminal or ssh, can you type this command and make a screenshot:

top

 

Does your node use SSL?
Which control panel do you use, cpanel or aapanel?
Are you running the node through pm2 or directly from the node?

I had debuging for resource issue on my server (aaPanel v 7.0.7) and this issue on my case and recomendation to solved.
---
1. Issue: Resource CPU 100% on MPWA v.7.0.0.5
- It happend couse PM2 on V.7.0.0.5. This PM2 will eat your resource allot.

2. Recomendation:
a. You need change the server.js with v.7.0.0.4 or v.7.0.0.2 (in my case change to v.7.0.0.4)
b. Before you change the server.js on your path/folder, you must stop the all service Node JS and PM2 if running
c. In my case, i use "ps aux | grep node" for find the node running (Terminal)
d. Find the parent process of a Node.js process with "pstree -p (you PID)"
e. Kill the proses: "sudo pkill -u www or sudo pkill node"
f.  Update NPM (optional, but in case all NPM must be update) from your terminal
g. Composer Update (optional, but in case all NPM must be update) from your terminal
h. Start your node project on aaPanel:
image.thumb.png.46a392517ef6fb4f152b34925a5c325d.png
i. See the LOG Node and See the Apps MPWA on Setting Server "Port (3100) Is Connected Your site is working properly"

Note:
1. Using PM2 is optional (from my case), couse its had already running on node. If you want to running PM2, your resources will rise again, make sure you have enaugh resource for running PM2.

I hope this will help with setup on aaPanel. Thanks.

  • Like 2
Link to comment
Share on other sites

  • DW Members
19 minutes ago, The Billionaire said:

@Gusik Prasetyo @Magd Almuntaser 


image.png.17ee5d09de3c69d485f948ff0b93478e.png

that is the error I get, so I try to manually migrate I get Nothing to migrate

You can download the full version 7.0.0.5. Do not extract it on your site; instead, open it on your PC, delete the .env file, then upload it to your site and extract it.

After that, run the migration.

This will update the version without the need to reinstall.

Be careful with server.js as it has pm2, which can be a big problem. It takes up a lot of resources from your server. You can see my post on page number 72 with the new server.js version that doesn't use pm2; you can use it instead.

Today, I will release update 7.0.0.6, which only includes changes to server.js and some new features. This update is very important.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, Magd Almuntaser said:

You can download the full version 7.0.0.5. Do not extract it on your site; instead, open it on your PC, delete the .env file, then upload it to your site and extract it.

After that, run the migration.

This will update the version without the need to reinstall.

Be careful with server.js as it has pm2, which can be a big problem. It takes up a lot of resources from your server. You can see my post on page number 72 with the new server.js version that doesn't use pm2; you can use it instead.

Today, I will release update 7.0.0.6, which only includes changes to server.js and some new features. This update is very important.

am using CPanel in a shared host server

 

Link to comment
Share on other sites

10 minutes ago, Magd Almuntaser said:

Anda dapat mengunduh versi lengkap 7.0.0.5. Jangan mengekstraknya di situs Anda; sebaliknya, buka di PC Anda, hapus file .env, lalu unggah ke situs Anda dan ekstrak.

Setelah itu, jalankan migrasi.

Ini akan memperbarui versi tanpa perlu menginstal ulang.

Berhati-hatilah dengan server.js karena memiliki pm2, yang dapat menjadi masalah besar. Ia menghabiskan banyak sumber daya dari server Anda. Anda dapat melihat posting saya di halaman nomor 72 dengan versi server.js baru yang tidak menggunakan pm2; Anda dapat menggunakannya sebagai gantinya.

Hari ini, saya akan merilis pembaruan 7.0.0.6, yang hanya mencakup perubahan pada server.js dan beberapa fitur baru. Pembaruan ini sangat penting.

Menunggu update

Link to comment
Share on other sites

1 hour ago, MURASAKI. said:

I had debuging for resource issue on my server (aaPanel v 7.0.7) and this issue on my case and recomendation to solved.
---
1. Issue: Resource CPU 100% on MPWA v.7.0.0.5
- It happend couse PM2 on V.7.0.0.5. This PM2 will eat your resource allot.

2. Recomendation:
a. You need change the server.js with v.7.0.0.4 or v.7.0.0.2 (in my case change to v.7.0.0.4)
b. Before you change the server.js on your path/folder, you must stop the all service Node JS and PM2 if running
c. In my case, i use "ps aux | grep node" for find the node running (Terminal)
d. Find the parent process of a Node.js process with "pstree -p (you PID)"
e. Kill the proses: "sudo pkill -u www or sudo pkill node"
f.  Update NPM (optional, but in case all NPM must be update) from your terminal
g. Composer Update (optional, but in case all NPM must be update) from your terminal
h. Start your node project on aaPanel:
image.thumb.png.46a392517ef6fb4f152b34925a5c325d.png
i. See the LOG Node and See the Apps MPWA on Setting Server "Port (3100) Is Connected Your site is working properly"

Note:
1. Using PM2 is optional (from my case), couse its had already running on node. If you want to running PM2, your resources will rise again, make sure you have enaugh resource for running PM2.

I hope this will help with setup on aaPanel. Thanks.

thanks very helpfull

Link to comment
Share on other sites

Help

Node.js v20.14.0

/home3/ojiapmyid/ojiap.my.id/server.js:25

{{{SSL}}}

   ^

 

ReferenceError: SSL is not defined

    at Object.<anonymous> (/home3/ojiapmyid/ojiap.my.id/server.js:25:4)

    at Module._compile (node:internal/modules/cjs/loader:1358:14)

    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

    at Module.load (node:internal/modules/cjs/loader:1208:32)

    at Module._load (node:internal/modules/cjs/loader:1024:12)

    at Module.require (node:internal/modules/cjs/loader:1233:19)

    at require (node:internal/modules/helpers:179:18)

    at startApplication (/usr/local/lsws/fcgi-bin/lsnode.js:48:15)

    at Object.<anonymous> (/usr/local/lsws/fcgi-bin/lsnode.js:16:1)

    at Module._compile (node:internal/modules/cjs/

loader:1358:14)

Link to comment
Share on other sites

  • DW Members
17 minutes ago, Avina Kefin said:

Help

Node.js v20.14.0

/home3/ojiapmyid/ojiap.my.id/server.js:25

{{{SSL}}}

   ^

 

ReferenceError: SSL is not defined

    at Object.<anonymous> (/home3/ojiapmyid/ojiap.my.id/server.js:25:4)

    at Module._compile (node:internal/modules/cjs/loader:1358:14)

    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

    at Module.load (node:internal/modules/cjs/loader:1208:32)

    at Module._load (node:internal/modules/cjs/loader:1024:12)

    at Module.require (node:internal/modules/cjs/loader:1233:19)

    at require (node:internal/modules/helpers:179:18)

    at startApplication (/usr/local/lsws/fcgi-bin/lsnode.js:48:15)

    at Object.<anonymous> (/usr/local/lsws/fcgi-bin/lsnode.js:16:1)

    at Module._compile (node:internal/modules/cjs/

loader:1358:14)

This issue means that the update was interrupted before it was completed. Because this particular file {{SSL}} is supposed to be programmatically replaced automatically for people using Node SSL.
You need to replace the attached file

3 minutes ago, Serpul Cloud said:

🤲 Alhamdulillah Webhook berjalan dengan baik lancar, kecuali saat memasukan database seperti username, email reaksi menjadi null

Bener2 dah laravel 😰

Screenshot_20240813-195938.jpg

Bagaimana kamu mencoba mengambil API key dan email? Tidak ada opsi di webhook untuk menampilkan email atau API key!! Masalahnya ada pada cara kamu memprogram untuk mengambil data dari database.

server.js

Link to comment
Share on other sites

1 hour ago, Magd Almuntaser said:

This issue means that the update was interrupted before it was completed. Because this particular file {{SSL}} is supposed to be programmatically replaced automatically for people using Node SSL.
You need to replace the attached file

Bagaimana kamu mencoba mengambil API key dan email? Tidak ada opsi di webhook untuk menampilkan email atau API key!! Masalahnya ada pada cara kamu memprogram untuk mengambil data dari database.

server.js 3.07 kB · 2 downloads

😰 Ok, terimakasih Master @Magd Almuntaser atas pencerahannya

Link to comment
Share on other sites

1 minute ago, Enno The Explorer said:

saya request tuan @Magd Almuntaser agar AInya di sempurnakan

1. User memberikan Pertanyaan dalam bentuk Voice note, dibalas AI dengan Voice note juga

2. AI bisa membaca isi File seperti Doc atau menganalisa Foto

3. AI bisa mengenerate Foto sesuai permintaan 😀

untuk Ai seperti ini kalopun bisa pasti pake chatgpt dan DALE yg versi terbaru serta tentu tidak gratis

Link to comment
Share on other sites

14 hours ago, Magd Almuntaser said:

This issue means that the update was interrupted before it was completed. Because this particular file {{SSL}} is supposed to be programmatically replaced automatically for people using Node SSL.
You need to replace the attached file

Bagaimana kamu mencoba mengambil API key dan email? Tidak ada opsi di webhook untuk menampilkan email atau API key!! Masalahnya ada pada cara kamu memprogram untuk mengambil data dari database.

server.js 3.07 kB · 11 downloads

file Server.Js ini setelah saya coba stabil untuk Node.js Versi v16.20.2 atau v16.xx.x

sedangkan untuk V18.xx.x tidak stabil

Link to comment
Share on other sites

  • DW Members
1 hour ago, Enno The Explorer said:

saya request tuan @Magd Almuntaser agar AInya di sempurnakan

1. User memberikan Pertanyaan dalam bentuk Voice note, dibalas AI dengan Voice note juga

2. AI bisa membaca isi File seperti Doc atau menganalisa Foto

3. AI bisa mengenerate Foto sesuai permintaan 😀

1- chatgpt masih dalam tahap percobaan di openAI untuk perekaman suara, tetapi saya tidak keberatan untuk mencobanya.
2- Juga fitur yang membaca gambar dan berkas, saya belum mencobanya, tetapi saya tidak keberatan untuk mencobanya.
3- Fitur ini masih belum tersedia di chatgpt atau gemini. Tetapi tersedia di DALL-E dan juga digunakan di copilot tetapi dengan biaya bulanan, tetapi saya akan menambahkan DALL-E segera

==========================
I was very late on 7.0.0.6 because of a very simple thing, the autoreply edit. In my stupidity, I tried not to modify the autoreply system and just add the edit feature in the same way, but it's a lot of work and I'm still working on it because of the ajax and dealing with it. 🥲

  • Thanks 2
  • Care 1
Link to comment
Share on other sites

async function sendGemini({
  command,
  senderNumber,
  chatgptKey,
  participantNumber,
}) {
  try {
    const geminiUrl = process.env.GEIMINI_URL;
    const geminiData = {
      contents: [
        {
          parts: [
            { text: `Tolong balas dengan bahasa yang santai: ${command}` }
          ]
        }
      ],
      model_parameters: {
        language: "id-ID" // GANTI KE BAHASA KELEAN
      }
    };
    const headers = {
      'Content-Type': 'application/json'
    };
    
    const response = await axios.post(`${geminiUrl}?key=${chatgptKey}`, geminiData, { headers: headers }).catch(() => {
      return false;
    });

    if (response && response.data && response.data.candidates && response.data.candidates.length > 0) {
      let content = response.data.candidates[0].content.parts[0].text;
      content = content.replace(/["']/g, '');
      let resText = JSON.stringify({ text: content, quoted: false });
      return resText;
    } else {
      return false;
    }
  } catch (error) {
    console.log('error send Gemini', error);
    return false;
  }
}

Gemini lebih santai buat ngebales. udh w coba bahasa nya gak terlalu baku

Link to comment
Share on other sites

On 8/12/2024 at 11:02 PM, Magd Almuntaser said:

The file that I put for you is not the same as 7.0.0.5 or 7.0.0.2, it is a file for the new version 7.0.0.6, which does not have pm2 and does not take up any server resources.
Anyway, you can use whatever you see fit.

Hey can I get the link to the 7.0.0.5 or 7.0.0.6?

I will replace the server.js with the 7.0.0.4 version or whatever you have stable.

Thanking you in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...