aenany / google-hangouts-chat-linux

Unofficial Linux client for Google Hangouts Chat
MIT License
4 stars 0 forks source link

405. That’s an error. The server cannot process the request because it is malformed. It should not be retried. That’s all we know. #44

Open averyfreeman opened 4 years ago

averyfreeman commented 4 years ago

Describe the bug

  1. That’s an error.

The server cannot process the request because it is malformed. It should not be retried. That’s all we know.

To Reproduce Steps to reproduce the behavior:

  1. Go to freshly-built "Google-hangouts-chat-linux" client
  2. Install .deb file using gdebi
  3. start client using kmenu
  4. Enter gmail account
  5. hit "next"
  6. See error in browser:

image

Expected behavior expected to be able to log in using gmail account

Screenshots This is what I was doing right before receiving the error in browser: image

Desktop (please complete the following information):

Operating System: Kubuntu 20.10 KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2 Kernel Version: 5.8.0-21-generic OS Type: 64-bit Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 630

 - Browser: `chrome Version 86.0.4240.75 (Official Build) (64-bit)`
 - Version:

$ cat package.json { "author": "https://github.com/aenany", "build": { "appId": "com.linux.chat.google", "asar": false, "linux": { "target": [ "appimage", "deb", "rpm", "freebsd", "pacman", "apk", "zip" ], "icon": "icon.png", "synopsis": "Chat Client", "category": "Office", "desktop": { "Name": "Google Hangouts Chat", "Type": "Application" }, "maintainer": "https://github.com/aenany" }, "publish": [ { "provider": "github", "owner": "aenany", "repo": "google-hangouts-chat-linux", "vPrefixedTagName": true, "protocol": "https", "releaseType": "draft" } ] }, "dependencies": { "crypto": "1.0.1", "electron-context-menu": "0.9.1", "electron-localshortcut": "3.1.0", "fs": "0.0.1-security", "path": "0.12.7", "snyk": "^1.290.1" }, "description": "Unofficial Desktop Client for Google Hangouts Chat for Teams.", "devDependencies": { "electron": "8.5.1", "electron-builder": "22.3.0" }, "keywords": [], "license": "MIT", "main": "src/index.js", "name": "google-hangouts-chat", "productName": "google-hangouts-chat", "repository": { "type": "git", "url": "https://github.com/aenany/google-hangouts-chat-linux/" }, "scripts": { "clean": "rm -rf dist/", "dist": "DEBUG=electron-builder electron-builder", "lint": "echo \"No linting configured\"", "pack": "electron-builder --dir", "prepublish": "npm run snyk-protect", "release": "DEBUG=electron-builder electron-builder publish", "snyk-protect": "snyk protect", "start": "npx electron src/index.js", "test": "snyk test" }, "snyk": true, "version": "0.0.6"


**Additional context**
This same error occurs when running dev build w/ `yarn`

If there's something fairly trivial going on, I could probably fix it.  I <3 javascript.
squalou commented 4 years ago

Hi, I had the same issue on my version (it's based on a common fork)

I 'll try to submit a PR

squalou commented 4 years ago

Sorry, can't seem to push a branch, here's the fix in case somenone can.

it also fixes #37

In file src/window.js

replace this line 51

const handleRedirect = (e, url) => {
    shell.openExternal(url);
    e.preventDefault();
};

by

const handleRedirect = (e, url) => {
    // leave redirect for google auth mechanism, trap crappy blocked url link
    if (url.includes("about:blank")) {
        e.preventDefault();
    } else if (! url.includes("accounts/SetOSID?authuser=0&continue=https%3A%2F%2Fchat.google.com") && ! url.includes("accounts.google.com/signin")){
        shell.openExternal(url);
        e.preventDefault();
    }
};
squalou commented 4 years ago

@averyfreeman you may want to try this debian package https://github.com/squalou/google-chat-linux/releases/tag/0.5.5-1

it's a slightly different fork with the patch above. You may consider it as a workaround

averyfreeman commented 4 years ago

Great, I'm kind of curious to try the patch and check out the API reference, but if I get super frustrated I appreciate that there's a package, too. thank you :) 👍🏼