leesj-dev / classroom-notifier

Classroom Notifier aims to send automated notification emails when any post in a Google Classroom is edited or deleted.
1 stars 0 forks source link

New error detected; related to our new bug detect algorithm #17

Open museyooni opened 2 years ago

museyooni commented 2 years ago

Today, I detected another type of bug, which seems related to our new bug detection code. Please check the error message below. Furthermore, just for enhancement, putting timestamp next to printed messages will help us find exactly when this error happened, and check it with email sent before using timestamp. I got 3 error mails and it seems related to this issue.

변경된 게시물 감지.
Traceback (most recent call last):
  File "/home/ubuntu/classroom-notifier-main/src/main.py", line 441, in <module>
    MsgEdited(pdict_1, pdict_3)
  File "/home/ubuntu/classroom-notifier-main/src/main.py", line 380, in MsgEdited
    elementFinder(key_str, "main", "/div[1]/div[1]/div[4]/div/div/div", "click")
  File "/home/ubuntu/classroom-notifier-main/src/main.py", line 120, in elementFinder
    result = driver.find_element(By.XPATH, total).click()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 88, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 396, in _execute
    return self._parent.execute(command, params)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 435, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div jsshadow="" role="button" class="U26fgb JRtysb WzwrXb I12f0b K2mXPb" jscontroller="iSvg6e" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue; focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc(preventMouseEvents=true|preventDefault=true); touchcancel:JMtRjd;keydown:I481le" jsname="LgbsSe" tabindex="0" aria-haspopup="true" aria-expanded="false" data-dynamic="true" data-alignright="true" aria-label="공지 옵션">...</div> is not clickable at point (930, 840). Other element would receive the click: <div class="QSj8ac pdYghb">...</div>
  (Session info: chrome=103.0.5060.134)
Stacktrace:
#0 0x564f178bbcd3 <unknown>
#1 0x564f176c3968 <unknown>
#2 0x564f17702675 <unknown>
#3 0x564f17700212 <unknown>
#4 0x564f176fd864 <unknown>
#5 0x564f176fc4a5 <unknown>
#6 0x564f176f0189 <unknown>
#7 0x564f17718bb2 <unknown>
#8 0x564f176efa43 <unknown>
#9 0x564f17718cbe <unknown>
#10 0x564f1772bea8 <unknown>
#11 0x564f17718aa3 <unknown>
#12 0x564f176ee3fa <unknown>
#13 0x564f176ef555 <unknown>
#14 0x564f179032bd <unknown>
#15 0x564f17907418 <unknown>
#16 0x564f178ed36e <unknown>
#17 0x564f17908078 <unknown>
#18 0x564f178e1bb0 <unknown>
#19 0x564f17924d58 <unknown>
#20 0x564f17924ed8 <unknown>
#21 0x564f1793ecfd <unknown>
#22 0x7f1e72715609 <unknown>
leesj-dev commented 2 years ago

Did you actually edit the posts? If you did, it shouldn’t be a big issue, because the ElementClickIntrceptedException is likely to occur if you hide part of the Chrome window with another window, or if the window is too small. I don’t think it has something to do with the code itself.

leesj-dev commented 2 years ago

Could you clarify what you mean by timestamp? I would like to hear a brief example.

museyooni commented 2 years ago

Did you actually edit the posts? If you did, it shouldn’t be a big issue, because the ElementClickIntrceptedException is likely to occur if you hide part of the Chrome window with another window, or if the window is too small. I don’t think it has something to do with the code itself.

Ah, no. I didn't edit anything. Emails were typical errors.

museyooni commented 2 years ago

Could you clarify what you mean by timestamp? I would like to hear a brief example.

The program prints ’수정된 게시물 감지‘ or ’삭제된 게시물 감지‘ when change exists When these messages come with timestamp, like '수정된 게시물 감지 [09:55:17]’, it will be much easier to relate recieved email and printed message. I think this is needed because I got three emails from different classroom, even though Indidn't changed it at all, but '수정된 게시물 감지’ message was just two I remember. Otherwise, we can set to print classroom number written in yaml file, like '수정된 게시물 감지 [no.1]'

leesj-dev commented 2 years ago

Ok adding that functionality shouldn’t be too hard. I’ll update the code soon.

leesj-dev commented 2 years ago

Did you actually edit the posts? If you did, it shouldn’t be a big issue, because the ElementClickIntrceptedException is likely to occur if you hide part of the Chrome window with another window, or if the window is too small. I don’t think it has something to do with the code itself.

Ah, no. I didn't edit anything. Emails were typical errors.

Well then, this implies that the bug detecting code by checking one more time isn’t that useful enough. We’ll find for a more reliable solution.

leesj-dev commented 2 years ago

Could you clarify what you mean by timestamp? I would like to hear a brief example.

The program prints ’수정된 게시물 감지‘ or ’삭제된 게시물 감지‘ when change exists When these messages come with timestamp, like '수정된 게시물 감지 [09:55:17]’, it will be much easier to relate recieved email and printed message. I think this is needed because I got three emails from different classroom, even though Indidn't changed it at all, but '수정된 게시물 감지’ message was just two I remember. Otherwise, we can set to print classroom number written in yaml file, like '수정된 게시물 감지 [no.1]'

Added timestamp. I added timestamps for every log, regardless of whether the post is edited/deleted/added. I also added the name of the classroom on the timestamp.

museyooni commented 2 years ago

Could you clarify what you mean by timestamp? I would like to hear a brief example.

The program prints ’수정된 게시물 감지‘ or ’삭제된 게시물 감지‘ when change exists When these messages come with timestamp, like '수정된 게시물 감지 [09:55:17]’, it will be much easier to relate recieved email and printed message. I think this is needed because I got three emails from different classroom, even though Indidn't changed it at all, but '수정된 게시물 감지’ message was just two I remember. Otherwise, we can set to print classroom number written in yaml file, like '수정된 게시물 감지 [no.1]'

Added timestamp. I added timestamps for every log, regardless of whether the post is edited/deleted/added. I also added the name of the classroom on the timestamp.

Checked, and it is working very well as intended!