Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ManagerNotFound: Manager messages not found #121

Closed
gladimaz opened this issue Sep 27, 2019 · 18 comments
Closed

ManagerNotFound: Manager messages not found #121

gladimaz opened this issue Sep 27, 2019 · 18 comments
Labels
bug Something isn't working

Comments

@gladimaz
Copy link

gladimaz commented Sep 27, 2019

Monitor stream

Stream: Stream.DISCONNECTED
State: State.UNLAUNCHED
Stream value: Stream.DISCONNECTED
Stream value: Stream.SYNCING
Stream value: Stream.CONNECTED
Monitor new messages
Monitor message ack
Task exception was never retrieved
future: <Task finished coro=<GetMessages.monitor_new_messages() done, defined at bots/s****/s****.py:81> exception=ManagerNotFound('Manager messages not found',)>
Traceback (most recent call last):
  File "bots/s*****/s*****.py", line 83, in monitor_new_messages
    async for message in it:
  File "/home/*****/whalesong/whalesong/results.py", line 195, in __anext__
    evt: T = await super(MonitorResult, self).__anext__()
  File "/home/****/whalesong/whalesong/results.py", line 137, in __anext__
    raise item
whalesong.errors.ManagerNotFound: Manager messages not found
Task exception was never retrieved
future: <Task finished coro=<GetMessages.monitor_message_acks() done, defined at bots/s*****/s****.py:95> exception=ManagerNotFound('Manager messages not found',)>
Traceback (most recent call last):
  File "bots/s****/s*****.py", line 97, in monitor_message_acks
    async for ack in it
  File "/home/****/whalesong/whalesong/results.py", line 195, in __anext__
    evt: T = await super(MonitorResult, self).__anext__()
  File "/home/****/whalesong/whalesong/results.py", line 137, in __anext__
    raise item
whalesong.errors.ManagerNotFound: Manager messages not found

Today i have this issue. Whatsapp updates code?

@gladimaz gladimaz added the bug Something isn't working label Sep 27, 2019
@gladimaz
Copy link
Author

@alfred82santa help

@jesusvalverde
Copy link

Same here :-(

@gladimaz
Copy link
Author

i have just solved this problem, i just increase the wait time in driver_firefox.py (await sleep(1) to 20) at line 107 and 115.

@jesusvalverde
Copy link

not all the time... some reboot may work , some not
:-(

@victorriba
Copy link

i have just solved this problem, i just increase the wait time in driver_firefox.py (await sleep(1) to 20) at line 107 and 115.

it work thanks

async def connect(self):
    await self._run_async(self.driver.get, self._URL)
    self.result_manager.cancel_all()
    await sleep(20)
    await self.run_scriptlet()
    self._fut_running = Future()
    self._fut_polling = ensure_future(self._polling())

async def refresh(self):
    await self._run_async(self.driver.refresh)
    self.result_manager.cancel_all()
    await sleep(20)
    await self.run_scriptlet()

@dafner
Copy link

dafner commented Oct 1, 2019

I made the suggested changes but the problem persists
Any idea how to fix it?

Task exception was never retrieved
future: <Task finished coro=<WeBot.monitor_new_messages() done, defined at /home/administrador/workspace/whatsappx/webot/itas/webot/init.py:261> exception=ManagerNotFound('Manager messages not found',)>
Traceback (most recent call last):
File "/home/administrador/workspace/whatsappx/webot/itas/webot/init.py", line 278, in monitor_new_messages
async for message in it:
File "/home/administrador/workspace/whatsappx/webot/itas/whalesong/results.py", line 195, in anext
evt: T = await super(MonitorResult, self).anext()
File "/home/administrador/workspace/whatsappx/webot/itas/whalesong/results.py", line 137, in anext
raise item
whalesong.errors.ManagerNotFound: Manager messages not found

@dafner
Copy link

dafner commented Oct 1, 2019

I confirm that the problem occurs in both firefox and chrome

@dafner
Copy link

dafner commented Oct 1, 2019

I was testing other examples and found that, for example; The statemonitor.py demo has problems with other managers, not just messages.

I will appreciate a prompt solution to this problem

administrador@ubuntu:~/workspace/whalesong$ PYTHONPATH=.:$PYTHONPATH python3 examples/statemonitor.py
Monitor stream
Monitor state
Monitor ref
Monitor battery
Monitor storage
Task exception was never retrieved
future: <Task finished coro=<StatusMonitor.check_conn() done, defined at examples/statemonitor.py:33> exception=ManagerNotFound('Manager conn not found',)>
Traceback (most recent call last):
File "examples/statemonitor.py", line 34, in check_conn
stream = await self._driver.conn.get_model()
whalesong.errors.ManagerNotFound: Manager conn not found
Task exception was never retrieved
future: <Task finished coro=<StatusMonitor.monitor_ref() done, defined at examples/statemonitor.py:64> exception=ManagerNotFound('Manager conn not found',)>
Traceback (most recent call last):
File "examples/statemonitor.py", line 66, in monitor_ref
async for evt in self._driver.conn.monitor_field('ref'):
File "/home/administrador/workspace/whalesong/examples/whalesong/results.py", line 195, in anext
evt: T = await super(MonitorResult, self).anext()
File "/home/administrador/workspace/whalesong/examples/whalesong/results.py", line 137, in anext
raise item
whalesong.errors.ManagerNotFound: Manager conn not found
Task exception was never retrieved
future: <Task finished coro=<StatusMonitor.monitor_battery() done, defined at examples/statemonitor.py:79> exception=ManagerNotFound('Manager conn not found',)>
Traceback (most recent call last):
File "examples/statemonitor.py", line 81, in monitor_battery
async for evt in self._driver.conn.monitor_field('battery'):
File "/home/administrador/workspace/whalesong/examples/whalesong/results.py", line 195, in anext
evt: T = await super(MonitorResult, self).anext()
File "/home/administrador/workspace/whalesong/examples/whalesong/results.py", line 137, in anext
raise item
whalesong.errors.ManagerNotFound: Manager conn not found
Stream: Stream.DISCONNECTED
State: State.UNPAIRED

@gladimaz
Copy link
Author

gladimaz commented Oct 1, 2019

i think u should increse sleep to 60 or higher

@dafner
Copy link

dafner commented Oct 1, 2019

thanks gladimaz for your help!! It's working again.
I tried differents values and the best result was setting the delay in 90 seconds

For now, It's working only with firefox driver

@vasani-arpit
Copy link

It should be based on time. I don't know much about python but it should be based on selector.

basically, Script/python will wait until it sees "keep your phone connected" or some selector which indicates that the loading process is complete.

@yoeliguzman
Copy link

Hello dear folks;

after change sleep value i got the following issue:

2019-10-07 23:25:07,638 ERROR Task exception was never retrieved
future: <Task finished coro=<BaseWhalesongDriver.start_driver() done, defined at /usr/local/lib/python3.6/dist-packages/whalesong/driver.py:41> exception=WebDriverException('connection refused', None, None)>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/whalesong/driver.py", line 53, in start_driver
await self._fut_start
File "/usr/local/lib/python3.6/dist-packages/whalesong/driver_firefox.py", line 76, in _internal_start_driver
self.driver = await self._run_async(self._internal_start_driver_sync)
File "/usr/local/lib/python3.6/dist-packages/whalesong/driver_firefox.py", line 73, in _run_async
return await self.loop.run_in_executor(self._pool_executor, partial(method, *args, **kwargs))
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/dist-packages/whalesong/driver_firefox.py", line 98, in _internal_start_driver_sync
**self.options['extra_params'])
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: connection refused

@victorriba
Copy link

same problem

monitor.loop.run_until_complete(monitor.start())

File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/home/whalesong/examples/statemonitor.py", line 90, in start
await self._driver.start()
File "/usr/local/lib/python3.6/site-packages/whalesong/init.py", line 95, in start
await self._driver.start_driver()
File "/usr/local/lib/python3.6/site-packages/whalesong/driver.py", line 49, in start_driver
await self._fut_start
File "/usr/local/lib/python3.6/site-packages/whalesong/driver.py", line 53, in start_driver
await self._fut_start
File "/usr/local/lib/python3.6/site-packages/whalesong/driver_firefox.py", line 76, in _internal_start_driver
self.driver = await self._run_async(self._internal_start_driver_sync)
File "/usr/local/lib/python3.6/site-packages/whalesong/driver_firefox.py", line 73, in _run_async
return await self.loop.run_in_executor(self._pool_executor, partial(method, *args, **kwargs))
File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/whalesong/driver_firefox.py", line 98, in _internal_start_driver_sync
**self.options['extra_params'])
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
keep_alive=True)
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: connection refused

@victorriba
Copy link

statemonitor not work

@victorriba
Copy link

npm install --devDependencies
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @babel/plugin-syntax-class-properties@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none was installed.
npm WARN whalesong@0.1.0 No repository field.

@shmosta
Copy link

shmosta commented Nov 11, 2019

FWIW I too have been running into the same problem as of late. Tried changing the aforementioned sleep call args to 10, 20, 30, 60, 90, 100, and still no luck. Any tips/hints or ideas for a workaround are greatly appreciated. Let me know if there's anything I can do to help, thanks!

@shmosta
Copy link

shmosta commented Nov 20, 2019

thanks gladimaz for your help!! It's working again.
I tried differents values and the best result was setting the delay in 90 seconds

For now, It's working only with firefox driver

@dafner Is it still working for you? @alfred82santa any ideas on how to fix this or if you have time to do as much? Thanks all.

@victorriba
Copy link

thanks gladimaz for your help!! It's working again.
I tried differents values and the best result was setting the delay in 90 seconds
For now, It's working only with firefox driver

@dafner Is it still working for you? @alfred82santa any ideas on how to fix this or if you have time to do as much? Thanks all.

i can help you ws plus 573505620505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants