Webwhatsapp-wrapper: TypeError: window.Store.Msg is undefined

Created on 27 Sep 2019  路  50Comments  路  Source: mukulhase/WebWhatsapp-Wrapper

Today when I running my whatsapp machine, I get this error
Since I'm not really understand about scraping, I cant solve it

File "waapi_0.0.0.2/chat_page/command/gk_chat2.py", line 33, in
for contact in driver.get_unread(use_unread_count=True):
File "/usr/local/lib/python3.5/site-packages/webwhatsapi/__init__.py", line 349, in get_unread
raw_message_groups = self.wapi_functions.getUnreadMessages(include_me, include_notifications, use_unread_count)
File "/usr/local/lib/python3.5/site-packages/webwhatsapi/wapi_js_wrapper.py", line 44, in __getattr__
wapi_functions = dir(self)
File "/usr/local/lib/python3.5/site-packages/webwhatsapi/wapi_js_wrapper.py", line 67, in __dir__
self.driver.execute_script(script.read())
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 635, in execute_script
'args': converted_args})['value']
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: TypeError: window.Store.Msg is undefined

Most helpful comment

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.py (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

All 50 comments

Same error here since today, it worked before but now I'm getting this error everytime I run my script. I doubt that it is my code?

I think its not your code fault, cause when I find line window.Store.Msg on wapi.js, it used with main function, likes sending messages, and recieve messages
I m sure web whatsapp changed the API

At what line is the window.Store.Msg ?

its whatsapp web update issue
must be fixed on wapi.js

line 654
is function to get chat based on id
668
function for reply message
and 1127 is function for new message listeners

We have the same issue, but if we paste the wapi.js code in browser inspector, functions sometimes are created and sometimes dont.
We have this errors:

  • window.Store.Conn is undefined
  • window.Store.Msg is undefined

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.py (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

thanks @erickmourasilva

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.js (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

wapi_js_wrapper.py not .js :)
Thanks 馃憤

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.js (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

wapi_js_wrapper.py not .js :)
Thanks 馃憤

A little confusion in the extension, thanks for warning!

thid must be fixed in the release
time.sleep(20) is good

thid must be fixed in the release
time.sleep(20) is good

If it takes longer to charge or the phone has a bad connection, the exception will happen again. The time is at the discretion of each, I used 60 because it was the time I got better results.

Is it working in login page? I've reloaded in incognito mode, and window.Store.Msg is always missing. Am I wrong?

I mean where barcode is displayed.

I mean where barcode is displayed.

YAre you using the get_status function?

Is it working in login page? I've reloaded in incognito mode, and window.Store.Msg is always missing. Am I wrong?

Are you using the get_status function?

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.py (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

Do you mind sharing the wapi_js_wrapper.py
Because I've changed the file and it's still not working.
thanks in advance.

I use isLoggedIn function. I failed for wapi.js window.Store.Msg.off('add'); and window.Store.Msg.on.
I've disabled those in wapi.js and the isLoggedIn doesn't raise error any more. But still waiting for wait_for_login.

I use isLoggedIn function. I failed for wapi.js window.Store.Msg.off('add'); and window.Store.Msg.on.
I've disabled those in wapi.js and the isLoggedIn doesn't raise error any more. But still waiting for wait_for_login.

use get_status, is_logged_in not work to check and not block wapi load.

import os
import time
import collections
import numpy as np
from selenium.common.exceptions import WebDriverException, JavascriptException
from six import string_types
from threading import Thread
from .objects.message import factory_message
class JsException(Exception):
def init(self, message=None):
super(Exception, self).init(message)
class WapiPhoneNotConnectedException(Exception):
def init(self, message=None):
super(Exception, self).init(message)
class WapiJsWrapper(object):
"""
Wraps JS functions in window.WAPI for easier use from python
"""

def __init__(self, driver, wapi_driver):
    self.driver = driver
    self.wapi_driver = wapi_driver
    self.available_functions = None

    # Starts new messages observable thread.
    self.new_messages_observable = NewMessagesObservable(self, wapi_driver, driver)
    self.new_messages_observable.start()

def __getattr__(self, item):
    """
    Finds functions in window.WAPI

    :param item: Function name
    :return: Callable function object
    :rtype: JsFunction
    """
    wapi_functions = dir(self)

    if item not in wapi_functions:
        raise AttributeError("Function {0} doesn't exist".format(item))

    return JsFunction(item, self.driver, self)

def __dir__(self):
    """
    Load wapi.js and returns its functions

    :return: List of functions in window.WAPI
    """
    if self.available_functions is not None:
        return self.available_functions

    """Sleep wait until WhatsApp loads and creates webpack objects"""
    time.sleep(60)

    print("Loading WhatsApp API...")
    try:
        script_path = os.path.dirname(os.path.abspath(__file__))
    except NameError:
        script_path = os.getcwd()
    with open(os.path.join(script_path, "js", "wapi.js"), "r") as script:
        self.driver.execute_script(script.read())

    result = self.driver.execute_script("return window.WAPI")

    print("WhatsApp API Loaded...")
    if result:
        self.available_functions = result.keys()
        return self.available_functions
    else:
        return []

class JsArg(object):
"""
Represents a JS function argument
"""

def __init__(self, obj):
    """
    Constructor

    :param obj: Python object to represent
    """
    self.obj = obj

def __str__(self):
    """
    Casts self.obj from python type to valid JS literal

    :return: JS literal represented in a string
    """
    if isinstance(self.obj, string_types):
        return repr(str(self.obj))

    if isinstance(self.obj, bool):
        return str(self.obj).lower()

    return str(self.obj)

class JsFunction(object):
"""
Callable object represents functions in window.WAPI
"""

def __init__(self, function_name, driver, wapi_wrapper):
    self.driver = driver
    self.function_name = function_name
    self.wapi_wrapper = wapi_wrapper
    self.is_a_retry = False

def __call__(self, *args, **kwargs):
    # Selenium's execute_async_script passes a callback function that should be called when the JS operation is done
    # It is passed to the WAPI function using arguments[0]
    if len(args):
        command = "return WAPI.{0}({1}, arguments[0])" \
            .format(self.function_name, ",".join([str(JsArg(arg)) for arg in args]))
    else:
        command = "return WAPI.{0}(arguments[0])".format(self.function_name)

    try:
        return self.driver.execute_async_script(command)
    except JavascriptException as e:
        if 'WAPI is not defined' in e.msg and self.is_a_retry is not True:
            self.wapi_wrapper.available_functions = None
            retry_command = getattr(self.wapi_wrapper, self.function_name)
            retry_command.is_a_retry = True
            retry_command(*args, **kwargs)
        else:
            raise JsException("Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command))
    except WebDriverException as e:
        if e.msg == 'Timed out':
            raise WapiPhoneNotConnectedException("Phone not connected to Internet")
        raise JsException("Error in function {0} ({1}). Command: {2}".format(self.function_name, e.msg, command))

class NewMessagesObservable(Thread):
def init(self, wapi_js_wrapper, wapi_driver, webdriver):
Thread.init(self)
self.daemon = True
self.wapi_js_wrapper = wapi_js_wrapper
self.wapi_driver = wapi_driver
self.webdriver = webdriver
self.observers = []

def run(self):
    while True:
        try:
            new_js_messages = self.wapi_js_wrapper.getBufferedNewMessages()
            if isinstance(new_js_messages, (collections.Sequence, np.ndarray)) and len(new_js_messages) > 0:

                new_messages = []
                for js_message in new_js_messages:
                    new_messages.append(factory_message(js_message, self.wapi_driver))

                self._inform_all(new_messages)
        except Exception as e:
            pass

        time.sleep(2)

def subscribe(self, observer):
    inform_method = getattr(observer, "on_message_received", None)
    if not callable(inform_method):
        raise Exception('You need to inform an observable that implements \'on_message_received(new_messages)\'.')

    self.observers.append(observer)

def unsubscribe(self, observer):
    self.observers.remove(observer)

def _inform_all(self, new_messages):
    for observer in self.observers:
        observer.on_message_received(new_messages)

I solved it.
This error occurs because the algorithm tries to import the library before loading all whatsapp components (with the update, the components are loading slower). To solve this, simply increase the wait time in wapi_js_wrapper.py (time.sleep (5) to 60) approximately at line 61.
In addition, you now need to add page load validation to only inject wapi.js when everything is loaded.
Clearly it is an alternative, to the most understanding please offer a smarter fix.

Do you mind sharing the wapi_js_wrapper.py
Because I've changed the file and it's still not working.
thanks in advance.

Please post it on https://hastebin.com/ or https://pastebin.com/ and share the URL, thanks.

https://pastebin.com/unNFkMwn

Ok, I replaced my code with the code from pastebin and It's still not working, can anyone look into this please.

I use isLoggedIn function. I failed for wapi.js window.Store.Msg.off('add'); and window.Store.Msg.on.
I've disabled those in wapi.js and the isLoggedIn doesn't raise error any more. But still waiting for wait_for_login.

use get_status, is_logged_in not work to check and not block wapi load.

Thanks. You're right. I've changed to get_status and don't get Msg faults any more and qr_code is displayed :)

Error is happening when NewMessagesObservable instance is loaded.
In my case, I do a pooling so I don't use NewMessagesObservable. I disabled this (removing all self.new_messages_observable in wapy_js_wrapper.py).
Further I created a new method in wapy.js to check Chat is loaded:
window.WAPI.isLoaded = function (done) {
var loaded = window.Store && window.Store.Msg && true || false;
done(loaded);
return loaded;
};
I included this method to my pooling. I think is not necessary because when status is LoggedIn and driver is connected these objects are loaded. But is an additional check.

window.WAPI.isLoaded = function (done) {
  var loaded = window.Store && window.Store.Msg && true || false;
  if (done !== undefined) done(loaded);
  return loaded;
};

I've change to this but the store.msg is never loaded so it always back as False

And on my .py file i did

while True:
    loaded = driver.execute_script("return window.WAPI.isLoaded()")
        if not loaded:
            logging.info('Script Reload')
                driver.execute_script(open("./wapiStore.js").read())
                sleep(15)
            else:
                logging.info('Script loaded')
                break

I have the same problem, and my solution for load code qr and after login it was:

  1. change the functions in wapi.js

window.Store.Msg.off('add') for if( window.Store.Msg ) window.Store.Msg.off('add')

window.WAPI._newMessagesListener = window.Store.Msg.on('add', (newMessage) => {...})
for
window.WAPI._newMessagesListener = window.Store.Msg ? window.Store.Msg.on('add', (newMessage) => {}) : {}

  1. start the script and save session
  2. end the execution of script
  3. restart script and remember sesi贸n

link for my fork
https://github.com/g4w4/WebWhatsapp-Wrapper/blob/master/webwhatsapi/js/wapi.js

Based on @g4w4 idea of solution i made something on my personalized .py

def isLogged():
    try:
        driver.find_element(By.XPATH,xpaths.CHATLIST) #Xpath of chatlist (//div[@id="side"])
    except:
        result = False
    else:
        result = True

    if result:
        try:
            driver.execute_script("return window.WAPI.isLoaded()") #try to check if script is loaded
        except:
            try:
                driver.execute_script(open("./wapiStore.js").read())
            except Exception as scriptError:
                logging.info(scriptError)
            else:
                tryScript = True
                #here is a second check
                while(tryScript):
                    loaded = driver.execute_script("return window.WAPI.isLoaded()")
                    if not loaded:
                        logging.info('Recarregando script')
                        driver.execute_script(open("./wapiStore.js").read())
                        sleep(15)
                    else:
                        logging.info('Script carregado')
                        tryScript = False
                else:
                    return result
        else:
            #once the chatlist is True i made a second check with isLoggedIn
            try:
                result = driver.execute_script("return window.WAPI.isLoggedIn()")
            except Exception as errorStatus:
                result = errorStatus

            return result
    else:
        return result

Maybe this function could be more efficient but for now i have this.

I don't know why, but since today, you should execute the wapi.js script only when is paired, before this all the objects from window.Store will not be loaded.

till now there is no solution work 100%

I've made a 1 min pause in wapi.js to load the code and it works fine for me.
https://pastebin.com/qnguQHf9

Nothing yet? The pause didn't work.

The wapi.js should be executed after of the qrcode sync.
The pause works randomly.

To check if it is loggedIn use the XPATh of chatlist.

div[@id="side"]

And then, when the chatlist xpath were true, just then execute the wapi.js script

I have the same problem, and my solution for load code qr and after login it was:

  1. change the functions in wapi.js

window.Store.Msg.off('add') for if( window.Store.Msg ) window.Store.Msg.off('add')

window.WAPI._newMessagesListener = window.Store.Msg.on('add', (newMessage) => {...})
for
window.WAPI._newMessagesListener = window.Store.Msg ? window.Store.Msg.on('add', (newMessage) => {}) : {}

  1. start the script and save session
  2. end the execution of script
  3. restart script and remember sesi贸n

link for my fork
https://github.com/g4w4/WebWhatsapp-Wrapper/blob/master/webwhatsapi/js/wapi.js

This is the py example, with the solution.

Start webdriver

driver = WhatsAPIDriver(profile=config.pathSession, client='remote', command_executor=config.selemiunIP)

wait if there is a saved session

driver.wait_for_login(10)

`if driver.is_logged_in():

#start your program#

else:

#get the QR code#

idName = uuid4().hex
name = "{}{}".format(pathFiles,idName+'.png') 
if os.path.exists(name) : os.remove(name)
driver.get_qr(name)

print( "{}.png".format(idName) )

#expect to login#
driver.wait_for_login(120)
driver.save_firefox_profile()

#end execution for after restart, remember session#
sys.exit()`

Link in pastebin https://pastebin.com/ytJuY2ZW

Hey there. I found a solution that works 100% of the time. My codebase is Node-based, though it should be simple to convert it to Python.

1) Export the auto discovery function.

2) Call that auto discovery function, check if key modules are there. If not, wait for 3 seconds and retry (2).

3) Export initializing the new message listener as a function, call that after (2) succeeds.

This way you don't have to mindlessly wait for a minute. You just wait the minimum amount of time.

Here is the commit to my repo that does the changes described above.
https://github.com/gfaraj/super-bot/commit/982dd8e9290376cba286375c8e3b299c79e0ac16

FYI, to be able to call the auto discovery multiple times, the module passed to webpackJsonp function had to have a different name each time. That's why I had to add a number at the end. Otherwise it won't work.

Hey there. I found a solution that works 100% of the time. My codebase is Node-based, though it should be simple to convert it to Python.

  1. Export the auto discovery function.
  2. Call that auto discovery function, check if key modules are there. If not, wait for 3 seconds and retry #2.
  3. Export initializing the new message listener as a function, call that after #2 succeeds.

This way you don't have to mindlessly wait for a minute. You just wait the minimum amount of time.

Here is the commit to my repo that does the changes described above.
gfaraj/super-bot@982dd8e

FYI, to be able to call the auto discovery multiple times, the module passed to webpackJsonp function had to have a different name each time. That's why I had to add a number at the end. Otherwise it won't work.

Hi,
What do you mean by reffering to https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/2 ?

@w1-naserieh he means that second step. Not issue by number 2.

@w1-naserieh he means that second step. Not issue by number 2.

Okay, thanks :)
Did you fix it in Python?

Hey there. I found a solution that works 100% of the time. My codebase is Node-based, though it should be simple to convert it to Python.

  1. Export the auto discovery function.
  2. Call that auto discovery function, check if key modules are there. If not, wait for 3 seconds and retry #2.
  3. Export initializing the new message listener as a function, call that after #2 succeeds.

This way you don't have to mindlessly wait for a minute. You just wait the minimum amount of time.

Here is the commit to my repo that does the changes described above.
gfaraj/super-bot@982dd8e

FYI, to be able to call the auto discovery multiple times, the module passed to webpackJsonp function had to have a different name each time. That's why I had to add a number at the end. Otherwise it won't work.

Anyone converted this to Python?

@w1-naserieh he means that second step. Not issue by number 2.

Yes, sorry! Edited.

@w1-naserieh nothing need to convert. Just update your wapi.js like @gfaraj and modify function call until modules loaded. When modules loaded, exit from try cycle and thats all

@w1-naserieh nothing need to convert. Just update your wapi.js like @gfaraj and modify function call until modules loaded. When modules loaded, exit from try cycle and thats all

Hi, thanks for your response, what do you mean by 'Modify function call'?
Which function do you mean?

could someone make a pr with the fix if its working?

could someone make a pr with the fix if its working?

Still not working. I am trying to fix it also.

Do we have a final solution? We need a PR

@VictorGaiva like I said before, my solution works 100% of the time. It's just a matter of seeking the modules until after Whatsapp Web is done loading. Unfortunately I don't have time right now to make a PR but I will try in a few days (my Python isn't strong as well).

Ok, Im working on a solution based on @gfaraj 's
The issue I'm facing is that it looks like the autodiscovery function only works after you are logged in, and if you call the autodiscovery function before you are logged in (i.e when you are asked to scan the QR), then it doesn't work when you call it after you are logged in... So it looks like you must call it only once you are logged in. Please correct me if someone finds out otherwise, I really hope I'm wrong on this

And the issue that this arises is how to properly find out if you are logged in before calling the autodiscovery function..

I'd love if someone with some more experience on this could help out with these 2 issues

The simplest solution I have found. Used at https://github.com/vasani-arpit/WBOT/

async function injectScripts(page) {
        return await page.waitForSelector('[data-icon=laptop]')
            .then(async () => {
                var filepath = path.join(__dirname, "WAPI.js");
                await page.addScriptTag({ path: require.resolve(filepath) });
                filepath = path.join(__dirname, "inject.js");
                await page.addScriptTag({ path: require.resolve(filepath) });
                return true;
            })
            .catch(() => {
                console.log("User is not logged in. Waited 30 seconds.");
                return false;
            })
    }

Hello guys! The problem was fixed. I created a new pull request #731

thanks @kaykyr
it solved and no need to wait for a minute like before

I think it fixed for a while, so I'll close the issue

Hi,
I had 2 additional problems:

error serializing cyclic value here:
# result = self.driver.execute_script("return window.WAPI")

Which I was able to workaround by only adding the methods that are actually being called:

result = self.driver.execute_script("return { areAllMessagesLoaded: window.WAPI.areAllMessagesLoaded, asyncLoadAllEarlierMessages: window.WAPI.asyncLoadAllEarlierMessages, checkNumberStatus: window.WAPI.checkNumberStatus, contactBlock: window.WAPI.contactBlock, contactUnblock: window.WAPI.contactUnblock, deleteConversation: window.WAPI.deleteConversation, deleteMessage: window.WAPI.deleteMessage, demoteParticipantAdminGroup: window.WAPI.demoteParticipantAdminGroup, downloadFile: window.WAPI.downloadFile, downloadFileWithCredentials: window.WAPI.downloadFileWithCredentials, getAllChatIds: window.WAPI.getAllChatIds, getAllChats: window.WAPI.getAllChats, getAllContacts: window.WAPI.getAllContacts, getAllMessageIdsInChat: window.WAPI.getAllMessageIdsInChat, getAllMessagesInChat: window.WAPI.getAllMessagesInChat, getBatteryLevel: window.WAPI.getBatteryLevel, getChatById: window.WAPI.getChatById, getCommonGroups: window.WAPI.getCommonGroups, getContact: window.WAPI.getContact, getGroupAdmins: window.WAPI.getGroupAdmins, getGroupParticipantIDs: window.WAPI.getGroupParticipantIDs, getMessageById: window.WAPI.getMessageById, getMyContacts: window.WAPI.getMyContacts, getProfilePicFromId: window.WAPI.getProfilePicFromId, getProfilePicSmallFromId: window.WAPI.getProfilePicSmallFromId, getUnreadMessages: window.WAPI.getUnreadMessages, getUnreadMessagesInChat: window.WAPI.getUnreadMessagesInChat, leaveGroup: window.WAPI.leaveGroup, loadAllEarlierMessages: window.WAPI.loadAllEarlierMessages, loadEarlierMessages: window.WAPI.loadEarlierMessages, markDefaultUnreadMessages: window.WAPI.markDefaultUnreadMessages, 'new_messages_observable.subscribe': window.WAPI.new_messages_observable, 'new_messages_observable.unsubscribe': window.WAPI.new_messages_observable, promoteParticipantAdminGroup: window.WAPI.promoteParticipantAdminGroup, quit: window.WAPI.quit, removeParticipantGroup: window.WAPI.removeParticipantGroup, ReplyMessage: window.WAPI.ReplyMessage, sendImage: window.WAPI.sendImage, sendMessage: window.WAPI.sendMessage, sendMessageToID: window.WAPI.sendMessageToID, sendSeen: window.WAPI.sendSeen }")

And in get_chat_from_phone_number, the creation failed to find the chat (even though it really was being added). If I tried to add the phone again it would work.

I workarounded it by running this twice:

        if createIfNotFound:
            self.create_chat_by_number(number)
            self.wait_for_login()
            for chat in self.get_all_chats():
                if not isinstance(chat, UserChat) or number not in chat.id:
                    continue
                return chat
            # try again... (workaround since it didn't find it in the first try for some reason)
            for chat in self.get_all_chats():
                if not isinstance(chat, UserChat) or number not in chat.id:
                    continue
                return chat

I still have this problem with the newest version of webwhatsapi.

My code is as follows:

from webwhatsapi import WhatsAPIDriver

driver = WhatsAPIDriver(client="firefox", headless=False, loadstyles=True, profile="test.profile")

print('Wainting for QRCode...')
print(driver.wait_for_login())
print('Bot Started!')
driver.save_firefox_profile()

print(driver.get_all_chats())

The error message I receive origins from where the wapi.js is loaded.
It is the following error message:

Traceback (most recent call last):
  File "C:/Users/marco/PycharmProjects/wa_analyze/test.py", line 11, in <module>
    print(driver.get_all_chats())
  File "C:\Python37-32\lib\site-packages\webwhatsapi\__init__.py", line 304, in get_all_chats
    return [factory_chat(chat, self) for chat in self.wapi_functions.getAllChats()]
  File "C:\Python37-32\lib\site-packages\webwhatsapi\wapi_js_wrapper.py", line 27, in __getattr__
    wapi_functions = dir(self)
  File "C:\Python37-32\lib\site-packages\webwhatsapi\wapi_js_wrapper.py", line 45, in __dir__
    self.driver.execute_script(script.read())
  File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script
    'args': converted_args})['value']
  File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: TypeError: window.Store.ChatClass is undefined

@marcokloeckler.
In Linux (latest centos 7)
Using firefox 61.0 (prevent auto updates!!!!) and geckodriver 0.21 and python 3
driver.get_all_chats() work for me.
Please see: #748

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wallysonn picture wallysonn  路  3Comments

Zingers-ZA picture Zingers-ZA  路  6Comments

dafner picture dafner  路  6Comments

desstannoz picture desstannoz  路  4Comments

drsoporte picture drsoporte  路  5Comments