UserScripts icon indicating copy to clipboard operation
UserScripts copied to clipboard

"Failed sending chat request message. You must login to post" when attempting to send a CV request

Open Radiodef opened this issue 7 years ago • 7 comments

Here's an image of what I see when I click "Send" (always):

must-login

Here's a text copy of the error message from the console:

Stack Exchange CV Request Generator:724:17 Failed sending chat request message. You must login to post Object { context: null, finalUrl: "https://chat.stackoverflow.com/chats/41570/messages/new", lengthComputable: null, loaded: null, readyState: 4, response: "You must login to post", responseHeaders: "Cache-Control: no-cache\r\nContent-Length: 22\r\nContent-Type: text/html; charset=utf-8\r\nDate: Tue, 03 Jul 2018 19:23:38 GMT\r\nExpires: -1\r\nPragma: no-cache\r\nX-Frame-Options: SAMEORIGIN\r\nchat: error\r\n", responseText: "You must login to post", responseXML: null, status: 404, … } handleError user-script:https://github.com/SO-Close-Vote-Reviewers//Stack Exchange CV Request Generator:724:17 onload user-script:https://github.com/SO-Close-Vote-Reviewers//Stack Exchange CV Request Generator:746:33 GM_xmlHttpRequest/< user-script:https://github.com/SO-Close-Vote-Reviewers//Stack Exchange CV Request Generator:1162:13

I'm using Firefox 61.0, Mac OSX 10.11.6, Greasemonkey 4.5 and 1.6.1 of the CV request generator.

If you need something else, let me know.

Radiodef avatar Jul 03 '18 20:07 Radiodef

Thank you for the detailed report.

I was not able to duplicate the problem using FF61.0 (64-bit), GM4.5, and 1.6.1 of the CV request generator under Windows. I currently don't have a Mac OSX environment set up to test that aspect.

Suggest Tampermonkey or Violentmonkey

I'd suggest using Tampermonkey or Violentmonkey rather than Greasemonkey 4.X (GM4). While GM3 was great (I've used GM for years and still use GM3.17 on FF 52ESR), GM4 really isn't up to snuff yet, even for what's supposed to be supported. There are things which GM4 does not support, which significantly impact some scripts (e.g. does not auto-update scripts, does not run scripts in iframes, does not obey run-at document-start, etc.). Hopefully, those will, eventually, be supported.

In addition, you will have ongoing issues using scripts which have not been written/rewritten for GM4 compatibility, due to breaking changes which GM development has no plans to change (i.e. the userscript API, changed matches semantics).

Thus, from a user's point of view, you will likely be quite a bit happier with Tampermonkey or Violentmonkey, at least for the foreseeable future.

However, the CV Request Generator should work in GM4

OTOH, the CV Request Generator has been tested/changed for compatibility with GM4 and should be functional. However, there appears to be a problem with GM.xmlHttpRequest() which has been reported as an issue in the Greasemonkey repository when using GM4.5 (but not GM4.4). This is currently targeted to be fixed in GM4.6. I don't know that the problem is actually the same issue, but it's not unlikely.

Unfortunately, that issue does not state the OS in which they encountered the problem.

If you want to stay with Greasemonkey, I would recommend downgrading to Greasemonkey 4.4 and seeing if the problem persists.

makyen avatar Jul 03 '18 22:07 makyen

Thanks for the suggestions.

I've tried Tampermonkey 4.7.5788, Violentmonkey 2.9.5 and Greasemonkey 4.4 and they're failing as well. Here's the message from the console:

userscript.html:356:17
Failed sending chat request message. You must login to post 
{…}
finalUrl: "https://chat.stackoverflow.com/chats/41570/messages/new"
readyState: 4
response: Getter
responseHeaders: "Cache-Control: no-cache\r\nContent-Length: 22\r\nContent-Type: text/html; charset=utf-8\r\nDate: Tue, 03 Jul 2018 23:31:08 GMT\r\nExpires: -1\r\nPragma: no-cache\r\nX-Frame-Options: SAMEORIGIN\r\nchat: error\r\nset-cookie: .ASPXBrowserOverride=; expires=Mon, 02-Jul-2018 23:31:08 GMT; path=/\r\n"
responseText: Getter
responseXML: Getter
status: 404
statusText: "Not Found"
<prototype>: function c()

The page I used to test those was this one. Greasemonkey 4.5 also gives the above message on that page, so changing the extension doesn't seem to make a difference.

Radiodef avatar Jul 03 '18 23:07 Radiodef

Tampermonkey in Chrome works, so I guess that makes it seem more like a Firefox issue.

edit: And I clicked the wrong button while posting this and closed the issue by accident...

Radiodef avatar Jul 04 '18 00:07 Radiodef

I appreciate you doing additional testing. I have not been able to duplicate the problem. I'm able to post a request from that question without problem (FF61.0, GM4.5).

Hmmm... Given that Chrome works, please check your privacy settings in Firefox.

makyen avatar Jul 04 '18 00:07 makyen

I tried a fresh Firefox profile and it worked, so the problem does appear to be with my Firefox configuration. I'll need to experiment a bit and see if I can locate the exact setting. (I keep forgetting to do that though, so I thought I would go ahead and post what I do know.)

Radiodef avatar Jul 09 '18 01:07 Radiodef

One thing you could try is re-adding SOCVR as a room, and deleting the room you currently have defined. You do this by clicking on the SO Close Vote Reviewers menu option in the main popup. The popup will change to give you a dialog to add/remove rooms.

Alternately/additionally, you could also just try a different room. We normally use SOCVR Testing Facility for testing.

makyen avatar Jul 09 '18 03:07 makyen

I was getting this error when trying to use the script on Code Review. And found the following fixed it for me:

  • Enter privacy settings (about:preferences#privacy)
  • Find the "Cookies and Site Data" section
  • See "Block cookies and site data" was selected
  • Press the "Exceptions" button.
  • Add:
    • https://codereview.stackexchange.com
    • https://chat.stackexchange.com

Peilonrayz avatar Nov 05 '18 18:11 Peilonrayz

Thanks again for the report.

I'm closing this issue due to:

  • the age of the problem report and that there have been many browser updates since this time that affect userscript manager operation, even completely disabling it.
  • There's been a major update in the userscript since this time, although I don't think this issue would have been addressed.
  • Greasemonkey is, unfortunately, not supported for the Request Generator.
  • The issue appears to be at least affected by the privacy settings in the browser, which we can't do anything about from within the userscript. We could, however, document that such settings may be an issue, if it still is one.

If it's still an issue, please post a new comment here, reopen this issue, or create a new issue. Thanks.

makyen avatar Mar 04 '23 17:03 makyen