SO-Close-Vote-Reviewers / UserScripts

Various user scripts that add features to the review queue or to the chat room
Other
57 stars 41 forks source link

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

Closed Radiodef closed 1 year ago

Radiodef commented 6 years ago

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.

makyen commented 6 years ago

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.

Radiodef commented 6 years ago

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 commented 6 years ago

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...

makyen commented 6 years ago

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.

Radiodef commented 6 years ago

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.)

makyen commented 6 years ago

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.

Peilonrayz commented 5 years ago

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

makyen commented 1 year ago

Thanks again for the report.

I'm closing this issue due to:

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