Charcoal-SE / SmokeDetector

Headless chatbot that detects spam and posts links to it in chatrooms for quick deletion.
https://metasmoke.erwaysoftware.com
Apache License 2.0
474 stars 182 forks source link

Smokey Fails to Run on Windows #555

Closed teward closed 7 years ago

teward commented 7 years ago

Excluding the test failures issue in #540 (and the now-merged fix in #544 that will fix the failure in the 'tests' sections which was necessary for these tests and running into this issue), we have a reproducible runtime failure in Windows environments. That is, we get errors such as these repeatedly:

Git support not available in Windows.
teward/Aurora
https://metasmoke.erwaysoftware.com
Git support not available in Windows.
LoginError: failed to get `usr` cookie from Stack Exchange OpenID
2017-02-26 18:45:08.642000 UTC
  File "ws.py", line 97, in <module>
    GlobalVars.wrap.login(username, password)

  File "C:\Users\Administrator\Documents\SmokeDetector\ChatExchange\chatexchange\client.py", line 138, in login
    self._br.login_se_openid(email, password)

  File "C:\Users\Administrator\Documents\SmokeDetector\ChatExchange\chatexchange\browser.py", line 154, in login_se_openid
    "failed to get `usr` cookie from Stack Exchange OpenID")

I have gotten this error four separate times - in Windows 10, in Windows 7, in Windows Server 2012, and in Windows Server 2016 (which was on EC2 just to make sure it wasn't my environments). In all four cases, this error has occurred, preventing Smokey from running.

This suggests to me that SmokeDetector is incapable of running on a Windows environment as a result of something in ChatExchange. I'd like to propose allowing us to run the "tests" on Windows, but actually exit if someone tries to actually execute SmokeDetector on a Windows environment, given that I've had these ChatExchange-originating errors in four separate Windows test environments.

AWegnerGitHub commented 7 years ago

Chat exchange works fine on Windows. I am using it in another application.

The only thing I asked for a fix, because the only spot I am getting an error, is the "sh" module. If I comment out the sh import, smokey will log in and run just fine under my account. All I want is a way to eliminate the git tests on a windows environment.

The discussions about production smokey run locations are way out of scope in my issue. All I need/want is a development environment that will run the tests without hacky workarounds like commenting out an import.

On Feb 26, 2017 12:57 PM, "Thomas Ward" notifications@github.com wrote:

Excluding the test failures issue in #540 https://github.com/Charcoal-SE/SmokeDetector/issues/540 (and the fix in

544 https://github.com/Charcoal-SE/SmokeDetector/pull/544 that will

fix the failure in the 'tests' sections which was necessary for these tests and running into this issue), we have a reproducible runtime failure in Windows environments. That is, we get errors such as these repeatedly:

Git support not available in Windows. teward/Aurorahttps://metasmoke.erwaysoftware.com Git support not available in Windows. LoginError: failed to get usr cookie from Stack Exchange OpenID 2017-02-26 18:45:08.642000 UTC File "ws.py", line 97, in GlobalVars.wrap.login(username, password)

File "C:\Users\Administrator\Documents\SmokeDetector\ChatExchange\chatexchange\client.py", line 138, in login self._br.login_se_openid(email, password)

File "C:\Users\Administrator\Documents\SmokeDetector\ChatExchange\chatexchange\browser.py", line 154, in login_se_openid "failed to get usr cookie from Stack Exchange OpenID")

I have gotten this error four separate times - in Windows 10, in Windows 7, in Windows Server 2012, and in Windows Server 2016 (which was on EC2 just to make sure it wasn't my environments). In all four cases, this error has occurred, preventing Smokey from running.

This suggests to me that SmokeDetector is incapable of running on a Windows environment as a result of something in ChatExchange. I'd like to propose allowing us to run the "tests" on Windows, but actually exit if someone tries to actually execute SmokeDetector on a Windows environment, given that I've had these ChatExchange-originating errors in four separate Windows test environments.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Charcoal-SE/SmokeDetector/issues/555, or mute the thread https://github.com/notifications/unsubscribe-auth/AGKb5zHcS28pda2M5NlqeXl8HBQ_vhkKks5rgcsxgaJpZM4MMej0 .

teward commented 7 years ago

@AWegnerGitHub We're beyond the scope of your issue since I already merged a fix for yours - that's not why this was referencing the other posts you made. The scope of your issue was #540 which was fixed in #544 and is already merged. We're on additional discussions taken place in CharcoalHQ about "Wanting to rule out Windows as a viable runtime target entirely."

It also seems the CE issues being observed here happen randomly or are environment specific, nevertheless clean Windows environments can't 'run' this currently.

teward commented 7 years ago

no-repro by others.

AWegnerGitHub commented 7 years ago

We haven't determined why it doesn't run on @teward's system, but it does work on Windows.

http://chat.stackexchange.com/transcript/message/35702709#35702709