whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Sending a location message doesn't work!

Open quicode opened this issue 2 years ago • 42 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

No working send to location Example after working client.sendMessage(numId,new Location(37.422, -122.084, 'Googleplex\nGoogle Headquarters')) other example var loc = await new Location(Number(lati),Number(long), '') client.sendMessage(numId,loc)

Expected behavior

Send to location in the whatsapp

Steps to Reproduce the Bug or Issue

client.sendMessage(numId,new Location(37.422, -122.084, 'Googleplex\nGoogle Headquarters'))

Relevant Code

client.sendMessage(numId,new Location(37.422, -122.084, 'Googleplex\nGoogle Headquarters')) other example var loc = await new Location(Number(lati),Number(long), '') client.sendMessage(numId,loc)

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

linux, [email protected]

Additional context

No response

quicode avatar Jul 19 '22 06:07 quicode

I have the same problem

amrdesign avatar Jul 19 '22 12:07 amrdesign

Me too

pedropuppim avatar Jul 20 '22 18:07 pedropuppim

It began to stop sending map location since 2 days ago. Any progress for this bugs report?

indokecapi avatar Jul 21 '22 10:07 indokecapi

It doesn't work in my project.

augustosvm avatar Jul 21 '22 14:07 augustosvm

Same here

AlbertoBorgesAlmeida avatar Jul 21 '22 14:07 AlbertoBorgesAlmeida

I guess I'm having the same issue... No error thrown and the location is never sent.

joaopaulovb avatar Jul 21 '22 14:07 joaopaulovb

I don't have any error in the return.... but the location doesn't send it.

Message {
  _data: {
    id: {
      fromMe: true,
      remote: [Object],
      id: '3EB0B57B146C4E5F****,
      _serialized: 'true_552799924****@c.us_3EB0B57B146C4E5F****'
    },
    body: '',
    type: 'location',
    t: 1658413933,
    from: {
      server: 'c.us',
      user: '552799933****',
      _serialized: '552799933****@c.us'
    },
    to: {
      server: 'c.us',
      user: '552799924****',
      _serialized: '552799924****@c.us'
    },
    self: 'out',
    ack: 0,
    isNewMsg: true,
    star: false,
    kicNotified: false,
    loc: 'Rua Abiail do Amaral Carneiro 84',
    lat: '-20.3154123',
    lng: '-40.293625',
    isFromTemplate: false,
    mentionedJidList: [],
    isVcardOverMmsDocument: false,
    isForwarded: false,
    labels: [],
    hasReaction: false,
    disappearingModeInitiator: 'chat',
    productHeaderImageRejected: false,
    lastPlaybackProgress: 0,
    isDynamicReplyButtonsMsg: false,
    isMdHistoryMsg: false,
    requiresDirectConnection: null,
    pttForwardedFeaturesEnabled: true
  },
  mediaKey: undefined,
  id: {
    fromMe: true,
    remote: {
      server: 'c.us',
      user: '552799924****',
      _serialized: '552799924****@c.us'
    },
    id: '3EB0B57B146C4E5F****',
    _serialized: 'true_55279992****@c.us_3EB0B57B146C4E5F****'
  },
  ack: 0,
  hasMedia: false,
  body: '',
  type: 'location',
  timestamp: 1658413933,
  from: '552799933****@c.us',
  to: '552799924****@c.us',
  author: undefined,
  deviceType: 'web',
  isForwarded: false,
  forwardingScore: 0,
  isStatus: undefined,
  isStarred: false,
  broadcast: undefined,
  fromMe: true,
  hasQuotedMsg: false,
  duration: undefined,
  location: Location {
    latitude: '-20.3154123',
    longitude: '-40.293625',
    description: 'Rua Abiail do Amaral Carneiro 84'
  },
  vCards: [],
  inviteV4: undefined,
  mentionedIds: [],
  orderId: undefined,
  token: undefined,
  isGif: false,
  isEphemeral: undefined,
  links: undefined
}

pedropuppim avatar Jul 21 '22 14:07 pedropuppim

I have same issue

asefsoft avatar Jul 24 '22 13:07 asefsoft

I have same issue

michaelloliveira avatar Jul 25 '22 00:07 michaelloliveira

me too =)

pedroherpeto avatar Jul 25 '22 01:07 pedroherpeto

Me too

guesma-hassan avatar Jul 26 '22 11:07 guesma-hassan

Any progress for this bugs report?

michaelloliveira avatar Jul 26 '22 12:07 michaelloliveira

This feacture is no longer present in whatsapp web. So I think we will run out =(

pedropuppim avatar Jul 26 '22 17:07 pedropuppim

Negative! Let's put our heads to work. Anyone who finds a solution will post it here.

michaelloliveira avatar Jul 26 '22 17:07 michaelloliveira

anybody having button issue? if working for all of you please help me.. button not working for me

Julie4ganesh avatar Jul 28 '22 07:07 Julie4ganesh

Same problem too, looks like whatsapp removed this feature from whatsapp web

mbnaj avatar Jul 28 '22 10:07 mbnaj

Is there no solution for this bug?

pratamaid avatar Jul 28 '22 11:07 pratamaid

I think the project was abandoned! No response on this and other threads.

michaelloliveira avatar Aug 01 '22 23:08 michaelloliveira

Really, I hope the project is not abandoned, it started a week ago and I am delighted with Pedro's work, I see that there have been updates in the main branch in the last month.

CesarLuisGC avatar Aug 03 '22 04:08 CesarLuisGC

I have the same problem, and it doesn't return an error either, it just doesn't send the location.

CesarLuisGC avatar Aug 03 '22 04:08 CesarLuisGC

I will be investigating this soon, no reason for it to stop working unless the functions we are using are outdated

purpshell avatar Aug 04 '22 00:08 purpshell

no funciona el enviar Location, hay solucion?

loginweb-dev avatar Aug 05 '22 16:08 loginweb-dev

Same here

Aromakelapa avatar Aug 09 '22 16:08 Aromakelapa

Hi every one, I know is not same, but you can send a text message with a link to google maps:

var locationLink = '*Ubicación* \n https://www.google.com/maps/search/?api=1&query='+MyLatitude+','+MyLongitude;
await spbWhats.waC.sendMessage(g, locationLink);

OddJoe avatar Aug 16 '22 00:08 OddJoe

same here

tasaddaq-rana avatar Aug 18 '22 05:08 tasaddaq-rana

Same here

d0v3riz avatar Aug 19 '22 02:08 d0v3riz

Also experiencing this issue - the promise resolves and it reckons the message was sent successfully (no exceptions thrown or anything), but there is no further info of anything going wrong nor does the location actually come through

Nacnudge avatar Aug 19 '22 05:08 Nacnudge

same here

Armanzahedi avatar Aug 21 '22 05:08 Armanzahedi

If you guys read the first line of the readme of this project: "A WhatsApp API client that connects through the WhatsApp Web browser app". If the feature was removed from whatsapp web (the official one you access through the browser normally), there is no way this project is going to make it work, it is impossible...

HiramNeto avatar Aug 23 '22 15:08 HiramNeto

If you guys read the first line of the readme of this project: "A WhatsApp API client that connects through the WhatsApp Web browser app". If the feature was removed from whatsapp web (the official one you access through the browser normally), there is no way this project is going to make it work, it is impossible...

It should work yes, I'm using the venom-bot that uses the same technology as this one and it's working correctly.

I still prefer this project, much better to develop than venom-bot.

I'll be waiting for Pedro to solve this problem and I'll use this bot again.

michaelloliveira avatar Aug 23 '22 17:08 michaelloliveira

If an action that is not possible for a human user on whatsapp web, starts to be performed by a bot automatically and consistently, good luck on not being blocked by whatsapp... They basically use this kind of behavior on their algorithms to detect bots and ban users on their plataform... We should remember that bots are not allowed by their user agreement...

For example, it was possible (I don't know if it still is because I don't use it anymore) to remove a list of users from a group all at once using whatsapp-web.js, instead of doing this one by one as a normal user would. I tried this functionality once and I was immediately blocked by them, and the telephone number I was using at the time was not able to use whatsapp anymore...

It can be that you are not blocked now, using tools that allow you to do so, because it is kind of recent that they removed the location sharing functionality on whatsapp web. But I would not be surprised if they start to block users doing this in a near future...

I would stick to the solution @OddJoe suggested and use google maps links with the coordinates attached to them, it's basically the same... Unless you need live tracking with automatic location updates, then it would not work...

HiramNeto avatar Aug 23 '22 22:08 HiramNeto