Jump to content

Recommended Posts

Posted (edited)
15 hours ago, Magd Almuntaser said:

here are some pictures of my version (enjoy watching)
==============Check Whatsapp Port===============

image.thumb.png.7d6e4c7d88ba03b32764e319502d8ea7.png

==============THEMES===============

image.png.037bc5c11aa862162b4dfff7defda507.png

image.thumb.png.6a800a886e8c1c3d7577b36b1b43d3a8.png

image.thumb.png.ebee3202997e1aed9b5d813ad9af1ebf.png

==============ChatGPT Bot API===============

image.png.883403fb20c06cdfcf161592192c6273.png

==============Location Message===============

image.png.e5ee68d34627fc630191e26f65020a7e.png

==============VCard Message===============

image.png.2dcedbb48f574b5b8714926c00d9126b.png

==============API-Docs===============

image.png.be6d030d8421802b6955684873b938f9.png

==============2FA Two-Factory===============

image.png.654ce81ca76c48332fba61b34a049744.png

image.png.8469c4c06ca11aa846080d88b961a283.png

image.png.c5f25ec41ea8edb1dc43ee158b3d6b4e.png

==============Recovery Code===============

image.png.8d032f36b62f105f511386cd2f994220.png

==============Read Message===============

image.png.beaf0b3978f6c9cb1767a5f2dd2e4301.png

I have tasted, this for result:
---
Precond:
1. Using aaPanel
2. Php 8+
3. Mysql 8+
4. Node 16+
5. PM2, running
6. Cron job, execute
7. Firewall, Off
---
1. Error Reconnecting after 1 night stand-by.
---

[32mINFO[39m [2024-08-03 02:28:32.373 +0700]: [36mconnection errored[39m
trace: "Error: Connection Terminated\n at WebSocketClient.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:437:30)\n at WebSocketClient.emit (node:events:390:28)\n at WebSocket.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100)\n at WebSocket.emit (node:events:390:28)\n at WebSocket.emitClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:272:10)\n at TLSSocket.socketOnClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:1341:15)\n at TLSSocket.emit (node:events:402:35)\n at node:net:687:12\n at TCP.done (node:_tls_wrap:580:7)"

Need update:
a. Error Handling WebSocket
b. Reconnecting WebSocket (after 1-5 second).


2. Sending Test image
---
Result: Success, but show error like this:
Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db_mpwa_xxx`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, Image sending., 628xxxxxx, {"_token":"PwtuXjk1QsYUAokZyU8YM8SwCAt0sARZtilCCuIT","sender":"628xxxxxx","number":"628xxxxxx","type":"media","url":"http:\/\/xxxxxxxxxxx\/storage\/files\/1\/SAMPLE\/SUPER.png","media_type":"document","caption":"Image sending."}, web, success, media, 1))

Thanks.
 

Edited by MURASAKI.
41 minutes ago, MURASAKI. said:

I have tasted, this for result:
---
Precond:
1. Using aaPanel
2. Php 8+
3. Mysql 8+
4. Node 16+
5. PM2, running
6. Cron job, execute
7. Firewall, Off
---
1. Error Reconnecting after 1 night stand-by.
---

[32mINFO[39m [2024-08-03 02:28:32.373 +0700]: [36mconnection errored[39m
trace: "Error: Connection Terminated\n at WebSocketClient.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:437:30)\n at WebSocketClient.emit (node:events:390:28)\n at WebSocket.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100)\n at WebSocket.emit (node:events:390:28)\n at WebSocket.emitClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:272:10)\n at TLSSocket.socketOnClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:1341:15)\n at TLSSocket.emit (node:events:402:35)\n at node:net:687:12\n at TCP.done (node:_tls_wrap:580:7)"

Need update:
a. Error Handling WebSocket
b. Reconnecting WebSocket (after 1-5 second).


2. Sending Test image
---
Result: Success, but show error like this:
Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db_mpwa_xxx`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, Image sending., 628xxxxxx, {"_token":"PwtuXjk1QsYUAokZyU8YM8SwCAt0sARZtilCCuIT","sender":"628xxxxxx","number":"628xxxxxx","type":"media","url":"http:\/\/xxxxxxxxxxx\/storage\/files\/1\/SAMPLE\/SUPER.png","media_type":"document","caption":"Image sending."}, web, success, media, 1))

Thanks.
 

Use Node.js v.20.xx

@MURASAKI. same problem, 

lluminate\Database\QueryException

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`sql_whatsapp`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, The current version is[v20.12.2], 62xxxxx, {"_token":"Pyfkls60BvJkhvPp3uIekVMd2GpcpdiQ502oG3Zg","sender":"62xxxxxx","number":"62xxxxx","type":"media","url":"http:\/\/xxxxx\/storage\/files\/1\/d2d4c52f-ef06-486e-bbba-c7b6ff08f43c.jpg","media_type":"document","caption":"The current version is[v20.12.2]"}, web, success, media, 1))
16 hours ago, askim net said:


image.thumb.jpeg.4079afe4e8fd256ce0a66d07d7083de9.jpeg
solusinya bagaimana ya?

I also got same issues when do clean install on cpanel.

I have try previouse version working well, barcode also shown. But this version cant work. Pls help @Magd Almuntaser

 

I have trying clean install got same issues.

also trying update script also same issues.

1 hour ago, MURASAKI. said:

I have tasted, this for result:
---
Precond:
1. Using aaPanel
2. Php 8+
3. Mysql 8+
4. Node 16+
5. PM2, running
6. Cron job, execute
7. Firewall, Off
---
1. Error Reconnecting after 1 night stand-by.
---

[32mINFO[39m [2024-08-03 02:28:32.373 +0700]: [36mconnection errored[39m
trace: "Error: Connection Terminated\n at WebSocketClient.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:437:30)\n at WebSocketClient.emit (node:events:390:28)\n at WebSocket.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100)\n at WebSocket.emit (node:events:390:28)\n at WebSocket.emitClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:272:10)\n at TLSSocket.socketOnClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:1341:15)\n at TLSSocket.emit (node:events:402:35)\n at node:net:687:12\n at TCP.done (node:_tls_wrap:580:7)"

Need update:
a. Error Handling WebSocket
b. Reconnecting WebSocket (after 1-5 second).


2. Sending Test image
---
Result: Success, but show error like this:
Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db_mpwa_xxx`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, Image sending., 628xxxxxx, {"_token":"PwtuXjk1QsYUAokZyU8YM8SwCAt0sARZtilCCuIT","sender":"628xxxxxx","number":"628xxxxxx","type":"media","url":"http:\/\/xxxxxxxxxxx\/storage\/files\/1\/SAMPLE\/SUPER.png","media_type":"document","caption":"Image sending."}, web, success, media, 1))

Thanks.
 

Problem 1:

The issue is not with the script, the problem lies with the network connection on the server or the site you are using. The error "Error: Connection Terminated" indicates that the connection to the WhatsApp server has been completely terminated due to a network outage on your server, and it cannot be re-established. Node.js cannot reconnect once the internet connection is lost on the network.

38 minutes ago, anet id said:

@MURASAKI. same problem, 

lluminate\Database\QueryException

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`sql_whatsapp`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, The current version is[v20.12.2], 62xxxxx, {"_token":"Pyfkls60BvJkhvPp3uIekVMd2GpcpdiQ502oG3Zg","sender":"62xxxxxx","number":"62xxxxx","type":"media","url":"http:\/\/xxxxx\/storage\/files\/1\/d2d4c52f-ef06-486e-bbba-c7b6ff08f43c.jpg","media_type":"document","caption":"The current version is[v20.12.2]"}, web, success, media, 1))

Problem 2:

This is because the MySQL on your site does not automatically create a timestamp upon sending. The solution is to replace the attached file in the following path:
 

app\Http\Controllers\

 

MessagesController.php

7 hours ago, anet id said:

@MURASAKI. same problem, 

lluminate\Database\QueryException

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`sql_whatsapp`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, The current version is[v20.12.2], 62xxxxx, {"_token":"Pyfkls60BvJkhvPp3uIekVMd2GpcpdiQ502oG3Zg","sender":"62xxxxxx","number":"62xxxxx","type":"media","url":"http:\/\/xxxxx\/storage\/files\/1\/d2d4c52f-ef06-486e-bbba-c7b6ff08f43c.jpg","media_type":"document","caption":"The current version is[v20.12.2]"}, web, success, media, 1))

Apakah anda mengimport dari database bawaanya v7.0.0.1?

53 minutes ago, nikokenzo said:

I also got same issues when do clean install on cpanel.

I have try previouse version working well, barcode also shown. But this version cant work. Pls help @Magd Almuntaser

 

I have trying clean install got same issues.

also trying update script also same issues.

try to change port from 3100 to 4100 and check again .. and make sure you use your site without https .. only http
if you want to use https you can see my post on page number 43

Posted (edited)
23 minutes ago, Magd Almuntaser said:

try to change port from 3100 to 4100 and check again .. 

done. i change node js version into V20.xx and works

 

but still shown disconnected

Screenshot 2024-08-03 183924.png

Edited by nikokenzo

Could you share how to install it on aApanel? I've been trying for 3 months without success and no help.

 

8 horas atrás, MURASAKI. disse:

I have tasted, this for result:
---
Precond:
1. Using aaPanel
2. Php 8+
3. Mysql 8+
4. Node 16+
5. PM2, running
6. Cron job, execute
7. Firewall, Off
---
1. Error Reconnecting after 1 night stand-by.
---

[32mINFO[39m [2024-08-03 02:28:32.373 +0700]: [36mconnection errored[39m
trace: "Error: Connection Terminated\n at WebSocketClient.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:437:30)\n at WebSocketClient.emit (node:events:390:28)\n at WebSocket.<anonymous> (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/@whiskeysockets/baileys/lib/Socket/Client/web-socket-client.js:46:100)\n at WebSocket.emit (node:events:390:28)\n at WebSocket.emitClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:272:10)\n at TLSSocket.socketOnClose (/www/wwwroot/xxxxxxxxxx/mpwa/node_modules/ws/lib/websocket.js:1341:15)\n at TLSSocket.emit (node:events:402:35)\n at node:net:687:12\n at TCP.done (node:_tls_wrap:580:7)"

Need update:
a. Error Handling WebSocket
b. Reconnecting WebSocket (after 1-5 second).


2. Sending Test image
---
Result: Success, but show error like this:
Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db_mpwa_xxx`.`message_histories`, CONSTRAINT `message_histories_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE) (SQL: insert into `message_histories` (`device_id`, `message`, `number`, `payload`, `send_by`, `status`, `type`, `user_id`) values (1, Image sending., 628xxxxxx, {"_token":"PwtuXjk1QsYUAokZyU8YM8SwCAt0sARZtilCCuIT","sender":"628xxxxxx","number":"628xxxxxx","type":"media","url":"http:\/\/xxxxxxxxxxx\/storage\/files\/1\/SAMPLE\/SUPER.png","media_type":"document","caption":"Image sending."}, web, success, media, 1))

Thanks.
 

 

2 minutes ago, badas said:

Walahh, tak kira gratis mas bro.
Nunggu yang versi gratisnya saja kalo begitu 😆

Haha dulu openai ada free balance $5, skrg susah register biar dpt.

coba beli di shopee aja murah mas tp ya resiko sering abis krn dihajar rame-rame.

kita menunggu bro @Magd Almuntaser give update for free Ai like gemini

1 minute ago, badas said:

Walahh, tak kira gratis mas bro.
Nunggu yang versi gratisnya saja kalo begitu 😆

I think OpenAI gives it to you for free for a limited time 🤨
It seems they changed their system 😅
======
Yes, I have now tried a new account, you really need to pay a minimum of $5


Well don't worry, in the next version there will be gemini and claude.

3 minutes ago, nikokenzo said:

Haha dulu openai ada free balance $5, skrg susah register biar dpt.

coba beli di shopee aja murah mas tp ya resiko sering abis krn dihajar rame-rame.

kita menunggu bro @Magd Almuntaser give update for free Ai like gemini

Siap mas bro, nunggu versi zodiak aja kalo begitu.
Sekalian nanya mas bro, kalo top up yang 5$ bisa tahan berapa lama itungannya?

Just now, askim net said:

@nikokenzo kendala yang sebelumnya sudah bisa?

Bisa bro tinggal ganti aja Nodejs ke versi V20.

clean install. Hapus nodejs sebelumnya, DB dan filenya. 
statusnya masih disconnect tapi bisa scan dll

1 minute ago, badas said:

Siap mas bro, nunggu versi zodiak aja kalo begitu.
Sekalian nanya mas bro, kalo top up yang 5$ bisa tahan berapa lama itungannya?

Lama tidaknya tergantung penggunaan.

karena hitungannya per request, makin kompleks akan memakan banyak credit

2 minutes ago, Magd Almuntaser said:

I think OpenAI gives it to you for free for a limited time 🤨
It seems they changed their system 😅
======
Yes, I have now tried a new account, you really need to pay a minimum of $5


Well don't worry, in the next version there will be gemini and claude.

Syukron ya akhi.
All fitur v7.0.0.1 work, onlychatgpt which I can't use now 😅

On 8/2/2024 at 6:20 PM, Magd Almuntaser said:

Whatsapp Gateway Multi Device (Magd Version) v7.0.0.1

 

This version is separate from the original version. It contains many additions and fixes.

You can update your existing version on your site or do a fresh install, but I prefer a fresh install and re-linking your phone to ensure the new session works without conflict and to avoid losing connection.


Installation Instructions:
Extract the compressed file to your site and open your site.

You will be redirected to the installation page. Complete the installation, and after finishing, you need to run the following command:

http://yourwebsite/storage-link
And you will see white page with (0) number that mean works


Add these two links to the cronjob (Every 3 min):

Every 1 or 2 minutes as you like:
curl "http://yourwebsite/schedule-run" >/dev/null 2>&1

And Every 1 or 2 minutes:
curl "http://yourwebsite/blast-start" >/dev/null 2>&1

 

You can now start Node.js using aaPanel, cPanel, or SSH for this path:

/yoursitepath/whatsapp/server.js


My advice for (VPS & aaPanel) users:
Install PM2.js on your server and run the WhatsApp server through it. This will make your version stable without disconnections. PM2.js automatically reconnects when the script stops and provides a link to monitor all issues, restart, and other information such as CPU status and bandwidth used by the script remotely.
 

npm install pm2@latest -g
# OR
yarn global add pm2

Start your whatsapp server:
pm2 start server.js



You can check if the WhatsApp server is running by going to your site and navigating to Admin -> Settings Server. There, you will find a new feature that displays the port status. If it is green, it is running; if it is red, it is not running.


image.thumb.png.31001e1548d17d70b68d635e40e52bcd.png

 

Installation is complete, and you can use the site...

Here is the list of additions and fixes in this version:
-
Adding ChatGPT Bot
-
Adding the 2FA (two-factor authentication) feature.
-
Adding Rcovery Codes (Login)
-
Adding VCard message
-
Adding VCard message API and api-docs
-
Adding the location message feature.
-
Adding location message API and api-docs
-
Adding the feature to create a new user via API.
-
Adding the (message read) feature, which can be enabled or disabled from the control panel.
-
Adding 3 Themes (semi-dark | light-theme | dark-theme)
- Adding check whatsapp server port
-
Fixing Connect Via Code
-
Fixing the connection issue.
-
Fixing the timeout issue.
-
Fixing the logout issue.
-
Fixing the list message issue.
-
Fixing the poll message issue.
-
Fixing template message API (input correct format)
-
Fixing the issue with (Waiting for this message. Check your phone).
-
Fixing the fetching of non-English group names.
-
Fixing the fetching of groups from the phone.
-
Fixing the autorply issue.
And more...

wpma-magd-v7.0.0.1.zip 77.81 MB · 60 downloads

Thank you very much, this is very helpful.   

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...