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

Notifications are not working with docker image (armv7) #217

Closed
tjarbo opened this issue Sep 6, 2021 · 13 comments
Closed

Notifications are not working with docker image (armv7) #217

tjarbo opened this issue Sep 6, 2021 · 13 comments

Comments

@tjarbo
Copy link

tjarbo commented Sep 6, 2021

Hi,
unfortunately I was not able to test the notifications as I get always the following error:

>> Process Notification: AppRise notifying ifttt://xxxxxxxxxxx@changedetection_io/
Exception ignored in: <function BaseEventLoop.__del__ at 0x6fb49580>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 654, in __del__
Watch URL: http://www.quotationspage.com/random.php  Error [Errno 1] Operation not permitted
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 416, in __repr__
    f'<{self.__class__.__name__} running={self.is_running()} '
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1878, in get_debug
    return self._debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'

This seems to be not limited to ifttt, because discord does not work as well.
I am running the app on a raspberry pi using the lasted docker image for armv7.

Best regards!
tjarbo

@tjarbo
Copy link
Author

tjarbo commented Sep 8, 2021

Looks like the problem appears in the current latest docker image. Using the latest release tag 0.39 'solved' the problem for me.
Now it is time to see what changedetection.io can do, but the first results looks great! - Thank you!

@tjarbo tjarbo closed this as completed Sep 8, 2021
@dgtlmoon
Copy link
Owner

@tjarbo does the problem exist in the new latest 0.39.1 ?

@tjarbo
Copy link
Author

tjarbo commented Sep 20, 2021

Hi @dgtlmoon,
I put this on my todo list, but I think I will not be able to test it before mid of next week. Just so you know.

@dgtlmoon
Copy link
Owner

@tjarbo thanks, any help is appreciated

@dgtlmoon
Copy link
Owner

@tjarbo also please try to send notifications from arm7 directly from the command line https://github.com/caronc/apprise/releases

also, please attach the docker logs when you try 0.39.1 as there's a LOT more debug output present there..

@queeup
Copy link

queeup commented Jan 16, 2022

@dgtlmoon, same issue here on 0.39.7 docker image. Notification is not working.

root@changedetection:/app# cat /proc/cpuinfo | apprise -t 'cpu info' 'mailto://***:***@gmail.com'
Traceback (most recent call last):
  File "/usr/local/bin/apprise", line 8, in <module>
    sys.exit(main())
  File "/usr/local/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/apprise/cli.py", line 399, in main
    result = a.notify(
  File "/usr/local/apprise/Apprise.py", line 369, in notify
    return py3compat.asyncio.tosync(
  File "/usr/local/apprise/py3compat/asyncio.py", line 66, in tosync
    return asyncio.run(cor, debug=debug)
  File "/usr/local/lib/python3.8/asyncio/runners.py", line 39, in run
    loop = events.new_event_loop()
  File "/usr/local/lib/python3.8/asyncio/events.py", line 758, in new_event_loop
    return get_event_loop_policy().new_event_loop()
  File "/usr/local/lib/python3.8/asyncio/events.py", line 656, in new_event_loop
    return self._loop_factory()
  File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 54, in __init__
    super().__init__(selector)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 55, in __init__
    super().__init__()
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 397, in __init__
    self._clock_resolution = time.get_clock_info('monotonic').resolution
PermissionError: [Errno 1] Operation not permitted
Exception ignored in: <function BaseEventLoop.__del__ at 0x75d4c028>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 654, in __del__
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 416, in __repr__
    f'<{self.__class__.__name__} running={self.is_running()} '
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1878, in get_debug
    return self._debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
sys:1: RuntimeWarning: coroutine 'notify' was never awaited
sys:1: RuntimeWarning: coroutine 'AsyncNotifyBase.async_notify' was never awaited
root@changedetection:/app#
>> Process Notification: AppRise notifying mailto://****:****@gmail.com
TRACE:apprise:E-Mail URL mailto://****:****@gmail.com unpacked as:
user="****"
password="****"
port="None"
host="gmail.com"
fullpath="None"
path="None"
query="None"
schema="mailto"
url="mailto://****:****@gmail.com"
qsd="{}"
secure="False"
verify="True"
targets="[]"
from_addr=""
smtp_host=""
headers="{}"
TRACE:apprise:Scanning ****@gmail.com against Google Mail

INFO:apprise:Applying Google Mail Defaults

DEBUG:apprise:Loaded E-Mail URL: mailtos://****:****@gmail.com/?from=****%40gmail.com&mode=starttls&smtp=smtp.gmail.com&user=****%40gmail.com&format=html&overflow=upstream&rto=4.0&cto=15&verify=yes

Exception ignored in: <function BaseEventLoop.__del__ at 0x7325a928>

Traceback (most recent call last):

  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 654, in __del__

    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)

  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 416, in __repr__

    f'<{self.__class__.__name__} running={self.is_running()} '

  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1878, in get_debug

Watch URL: Test from changedetection.io!  Error [Errno 1] Operation not permitted

    return self._debug

AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'

@dgtlmoon
Copy link
Owner

@queeup obviously you're using the apprise CLI, so you shouldnt expect me to solve the bug in apprise for you :)

please file an issue over with the apprise crew

@dgtlmoon
Copy link
Owner

i used google (the same one you have), some interesting results synesthesiam/opentts#11

@queeup
Copy link

queeup commented Jan 16, 2022

@queeup obviously you're using the apprise CLI, so you shouldnt expect me to solve the bug in apprise for you :)

please file an issue over with the apprise crew

I was using apprise CLI inside the changedetection docker image to see if it works without changedetection itself. The second log is from changedetection notification test. There is a problem on the docker image with apprise I guess. Maybe a permission issue.

I tried what you suggest with localtime but that is also not solve my problem.

Unfortunately changedetection notification is not usable with docker for me atm.

@queeup
Copy link

queeup commented Jan 16, 2022

I tested with raspberry pi 3 and 4.
armv7 = Not working (rp3)
aarch64 (arm64) = It works (rp4)

Problem is in armv7 architecture image.
Probably same issue: #366

@dgtlmoon
Copy link
Owner

@queeup thats for trying on those devices - I added that info to the wiki https://github.com/dgtlmoon/changedetection.io/wiki/Notification-configuration-notes#armv7-raspberrypi-3-etc

@vanalmsick
Copy link

I am running changedetection on a RPi3 in a docker and it works.

My docker-compose setup:

  changedetection:
    image: lscr.io/linuxserver/changedetection.io:latest
    container_name: changedetection
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /mnt/ssd/changedetection:/config
    ports:
      - 5000:5000
    links:
      - signalapi
    restart: always
  
  signalapi:
    image: bbernhard/signal-cli-rest-api
    container_name: signal-api
    restart: always
    environment:
      - MODE=normal
    volumes:
      - /mnt/ssd/secrets/signal:/home/.local/share/signal-cli
    ports:
      - 9922:8080
    # Go to this address to link the signal account
    # http://raspberrypi.local:9922/v1/qrcodelink?device_name=signal-api

Notification URL:
signal://signalapi:8080/44123456789

Maybe my setup helps to resolve the issue.

@dgtlmoon
Copy link
Owner

AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'

I believe this is because of python 3.8, best to try 3.9 or 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants