Coder Social home page Coder Social logo

matrix-puppet-hangouts's People

Contributors

aaronraimist avatar aditsachde avatar andrewjdr avatar anoadragon453 avatar d3m3vilurr avatar kfatehi avatar michaelnew avatar resonious avatar thomas-profitt avatar zetorian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

matrix-puppet-hangouts's Issues

Support multiple users

Hello,

Firstly thanks for your work.

Please could you add support for multiple users?

Preferably each matrix user should be able to add and configure at least one hangout account remotely, for example by chatting with a bot.

Crash log

Oh, this is fun.

ERROR:asyncio:Exception in callback _on_message_sent() at hangups_client.py:183
handle: ) at hangups_client.py:183>
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "hangups_client.py", line 186, in _on_message_sent
    future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/usr/local/lib/python3.4/dist-packages/hangups/conversation.py", line 277, in send_message
    yield from self._client.send_chat_message(request)
  File "/usr/local/lib/python3.4/dist-packages/hangups/client.py", line 529, in send_chat_message
    send_chat_message_request, response)
  File "/usr/local/lib/python3.4/dist-packages/hangups/client.py", line 338, in _pb_request
    request_pb.SerializeToString()
  File "/usr/local/lib/python3.4/dist-packages/hangups/client.py", line 396, in _base_request
    data=data, connector=self._connector
  File "/usr/local/lib/python3.4/dist-packages/hangups/http_utils.py", line 36, in fetch
    ), CONNECT_TIMEOUT)
  File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
    return fut.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/usr/local/lib/python3.4/dist-packages/aiohttp/client.py", line 466, in request
    read_until_eof=read_until_eof)
  File "/usr/local/lib/python3.4/dist-packages/aiohttp/client.py", line 105, in request
    raise RuntimeError('Session is closed')
RuntimeError: Session is closed

As far as I can tell, it occurred when an incoming voice call happened. Additionally, this then caused the bridge to get stuck, but not crash—so my watchdog doesn't restart it and messages didn't get through indefinitely until I restarted it myself.

Random crashes

Not sure what triggers them; I just notice that the process has crashed. Apparently, the code just throws execptions and crashes.

started hangups child
Matrix-side listening on port 8091
[-] POST https://matrix.ser1.net/_matrix/client/r0/join/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t (AS) Body: "{}"
[-] POST https://matrix.ser1.net/_matrix/client/r0/join/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t (AS) HTTP 200 "{\"room_id\": \"!jjkTJrZibbDRdOfdDJ:matrix.ser1.net\"}"
[-] GET https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels/ (AS) Body: 
[-] GET https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels/ (AS) HTTP 200 "{\"users_default\": 0, \"events_default\": 0, \"
state_default\": 50, \"events\"
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels (AS) Body: "{\"users_default\":0,\"events_default\":0,\"state_de
fault\":50,\"events\":{},\"
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels (AS) HTTP 200 "{\"event_id\": \"$153818295691Gtyph:matrix.ser1.n
et\"}"
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels (AS) Body: "{\"users_default\":0,\"events_default\":0,\"state_de
fault\":50,\"events\":{},\"
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/state/m.room.power_levels (AS) HTTP 200 "{\"event_id\": \"$153818295692RyDGz:matrix.ser1.n
et\"}"
sendEvent of type m.room.message in !jjkTJrZibbDRdOfdDJ:matrix.ser1.net with txnId m15381829
56955.0
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/send/m.room.message/m1538182956955.0 (AS) Body: "{\"body\":\"Attempting main loop...\\n_\"
,\"formatted_body\":\"<pre><code>Atte
[-] PUT https://matrix.ser1.net/_matrix/client/r0/rooms/!jjkTJrZibbDRdOfdDJ%3Amatrix.ser1.ne
t/send/m.room.message/m1538182956955.0 (AS) HTTP 200 "{\"event_id\": \"$153818295693cRAPY:ma
trix.ser1.net\"}"
Event sent to !jjkTJrZibbDRdOfdDJ:matrix.ser1.net with event id $153818295693cRAPY:matrix.se
r1.net
::1 - - [29/Sep/2018:01:02:39 +0000] "PUT /transactions/33?access_token=<REDACTED> HTTP/1.1"
 200 2 "-" "Synapse/0.33.5.1"

::1 - - [29/Sep/2018:01:02:39 +0000] "PUT /transactions/34?access_token=<REDACTED> HTTP/1.1"
 200 2 "-" "Synapse/0.33.5.1"

::1 - - [29/Sep/2018:01:02:47 +0000] "PUT /transactions/35?access_token=<REDACTED> HTTP/1.1"
 200 2 "-" "Synapse/0.33.5.1"

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.afterWrite [as oncomplete] (net.js:788:14)
Emitted 'error' event at:
    at onwriteError (_stream_writable.js:431:12)
    at onwrite (_stream_writable.js:456:5)
    at _destroy (internal/streams/destroy.js:40:7)
    at Socket._destroy (net.js:613:3)
    at Socket.destroy (internal/streams/destroy.js:32:8)
    at WriteWrap.afterWrite [as oncomplete] (net.js:790:10)

Python: 3.5.3
Node: v10.11.0
Hangups: 0.4.5

I don't know how the hell to tell which version of synapse I'm running. Something I downloaded within the past week.

Unknown verification code input

I get the following output when using Google's notification-based 2FA:

root@sio:~/matrix-puppet-hangouts# ./hangups_client.py --login-and-save-token
Sign in with your Google account:
Email: [email protected]
Password: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/hangups/auth.py", line 158, in get_auth
    raise GoogleAuthError("Refresh token not found")
hangups.auth.GoogleAuthError: Refresh token not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./hangups_client.py", line 240, in <module>
    run_example(listen_events)
  File "./hangups_client.py", line 55, in run_example
    cookies = hangups.auth.get_auth_stdin(args.token_path)
  File "/usr/local/lib/python3.5/dist-packages/hangups/auth.py", line 186, in get_auth_stdin
    return get_auth(CredentialsPrompt(), refresh_token_cache)
  File "/usr/local/lib/python3.5/dist-packages/hangups/auth.py", line 164, in get_auth
    session, credentials_prompt
  File "/usr/local/lib/python3.5/dist-packages/hangups/auth.py", line 280, in _get_authorization_code
    raise GoogleAuthError('Unknown verification code input')
hangups.auth.GoogleAuthError: Unknown verification code input

SyntaxError: Unexpected token {

When I try registering the service I get the following:

matrix-puppet-hangouts$ node index.js -r -u "http://localhost:8090"
/opt/matrix-puppet-hangouts/node_modules/matrix-puppet-bridge/src/base.js:709
} catch {
^

SyntaxError: Unexpected token {
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/opt/matrix-puppet-hangouts/node_modules/matrix-puppet-bridge/index.js:3:27)
at Module._compile (internal/modules/cjs/loader.js:654:30)

Here is my node version:
node --version
v9.11.2

I found a similar issue here and tried following the instrucitons there but was unablke to solve my issue.
#26

Req: Interpret mentions from Hangouts users

While hangouts doesn't support mentions (and it's not possible to support mentioning hangouts users from matrix), it would be nice if matrix users could be mentioned by hangouts users.

I think @localpart for users on the homeserver or @full:matrix.id for any users would be good to have. I think the latter actually works (though when a friend and I tested, I didn't get an audible alert).

This would be really nice for some extra chat user/groups, as it would allow turning notifications off for that room but still give hangouts users a way to alert if something important happens.

Bridge update

Heyo. The bridge version has changed under the project again. Would someone mind updating it?

Cheers!

Req: `-c` and `--config` to provide path to config.json

I like to make a package for this for archlinux and I have 2 goals:

  • the installed path should be immutable with a config file in /etc
  • a systemd template making it easier to run multiple bridges on the same server (each instance will have its own config, registration, and hangups token). Eg, an instance would launch via [email protected] and point to configs/tokens specific for the FOO user.

To achieve these goals without a lot of weirdness in my package, I need the config path to come from the command line (it can default to ./config.json if the option isn't provided). matrix-appservice-irc has a config provided by the commandline, but I'm not a strong javascript developer and it's not clear to me how this is enabled.


Ideally, I'd also have a -t, --token argument to provide the path to the refresh token rather than using ~/.cache/hangups/refresh_token.txt. But I can set HOME in the systemd service to move that.

Asyncio line gives SyntaxError: invalid syntax

On restart of matrix-puppet-hangouts, I get this in the Protocol room:

File "hangups_client.py", line 72
    task = asyncio.async(_async_main(example_coroutine, client, args))
                       ^
SyntaxError: invalid syntax
 ​```

Messages from bridge not going out to hangouts

I installed the hangouts bridge and connected it to my HS. Everybody can see the hangouts messages that are sent using the native client. I can see the messages sent to my hangouts account using the bridge on my riot client. But the messages that I'm sending to a hangouts members using the riot client can only be seen on my riot client(I cannot see them in the hangouts client and the other person also cannot see those messages). It looks like the messages are not traveling from riot to hangouts.
I tired reinstalling the matrix bridge from scratch, restarting the synapse server, restart the riot client, deleting the conversation in hangouts. I tested this for existing conversations and for new ones. In every case I'm having the same problem.

Unexpected token

Hello,

I try to register the service but does not really work. Here is the problem:

>> node index.js -r -u "http://localhost:8090"                                           
Unable to load crypto module: crypto will be disabled: Error: global.Olm is not defined
Unable to load crypto module: crypto will be disabled: Error: global.Olm is not defined
/usr/local/src/matrix-puppet-hangouts/client.js:29
      } catch {
              ^

SyntaxError: Unexpected token {
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/usr/local/src/matrix-puppet-hangouts/index.js:8:24)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

User is the same as the one I generated the token with and for. python3 hangups_client.py --login-and-save-token didn't worked, but I used OAuth, and I think it is okay, as hangups --manual loads and shows my contacts. ~/.cache/hangups/refresh_token.txt has a 45 letter long token with no trailing new line.

Do you have any idea what the problem can be? System is Debian 9, up-to-date. matrix-puppet-facebook works.
Thank you for your help in advance!

"please implement sendReadReceiptAsPuppetToThirdPartyRoomWithId"

I can't seem to send messages, and this error shows up in the logs, may be related?

puppet_1  | Unhandled rejection Error: please implement sendReadReceiptAsPuppetToThirdPartyRoomWithId
puppet_1  |     at App.sendReadReceiptAsPuppetToThirdPartyRoomWithId (/usr/src/matrix-puppet-hangouts/node_modules/matrix-puppet-bridge/src/base.js:168:27)
puppet_1  |     at MatrixClient.client.on (/usr/src/matrix-puppet-hangouts/node_modules/matrix-puppet-bridge/src/puppet.js:65:35)
puppet_1  |     at emitTwo (events.js:126:13)
puppet_1  |     at MatrixClient.emit (events.js:214:7)
puppet_1  |     at Room.<anonymous> (/usr/src/matrix-puppet-hangouts/node_modules/matrix-js-sdk/lib/reemit.js:58:35)
puppet_1  |     at emitTwo (events.js:126:13)
puppet_1  |     at Room.emit (events.js:214:7)
puppet_1  |     at Room.addReceipt (/usr/src/matrix-puppet-hangouts

crash with rapid message send / respond

matrix version: 0.34.1.1
matrix-puppet-hangouts version: b431229

so I have noticed an odd behavior, when using the hangouts puppet. if I send and receive multiple messages through hangouts in rapid succession (under 2-3 mins) and occasionally if I respond quickly to things inside of matrix, the bridge will crash with this error:

verbose:matrix-puppet:hangouts:client got message from hangups before JSON.parse():
+2ms 
undefined 2 


SyntaxError: unexpected end of JSON input 
at JSON.parse(<anonymous>)
at Socket.hangupsProc.stdout.on (/home/zetorian/matrix-puppet-hangouts/client.js:25:23 

from a quick glance at the code by someone who has no JavaScript experience, it looks like the problem might be fixed by validating the JSON received by Socket.hangupsProc.stdout.on() though how we could correct an incomplete JSON message from hangups is beyond me, perhaps request it be sent again?

OOM crash

Hey, it's me again! Ran into a weird log/crash just now —

Feb 18 19:11:58 tars npm[15995]: ::ffff:127.0.0.1 - - [19/Feb/2017:00:11:58 +0000] "PUT /transactions/89?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/0.19.1"
Feb 18 19:11:58 tars npm[15995]: Sun, 19 Feb 2017 00:11:58 GMT matrix-puppet:Base:handleMatrixEvent:info incoming message. data: { age: 22,
Feb 18 19:11:58 tars npm[15995]: content: { body: 'what even, stanford', msgtype: 'm.text' },
Feb 18 19:11:58 tars npm[15995]: event_id: '<REDACTED>:nsb0.net',
Feb 18 19:11:58 tars npm[15995]: origin_server_ts: 1487463118872,
Feb 18 19:11:58 tars npm[15995]: room_id: '<REDACTED>',
Feb 18 19:11:58 tars npm[15995]: sender: '@sohum:nsb0.net',
Feb 18 19:11:58 tars npm[15995]: type: 'm.room.message',
Feb 18 19:11:58 tars npm[15995]: unsigned: { age: 22 },
Feb 18 19:11:58 tars npm[15995]: user_id: '@sohum:nsb0.net' }
Feb 18 19:11:58 tars npm[15995]: Sun, 19 Feb 2017 00:11:58 GMT matrix-puppet:Base:getThirdPartyRoomIdFromMatrixRoomId:info reducing array of alases to a 3prid
Feb 18 19:11:58 tars npm[15995]: Sun, 19 Feb 2017 00:11:58 GMT verbose:matrix-puppet:hangouts:client sending message to hangouts subprocess:  {"cmd":"sendmessage","conversation_id":"<REDACTED>","msgbody":"what even, stanford ​"}
Feb 18 19:11:59 tars npm[15995]: <--- Last few GCs --->
Feb 18 19:11:59 tars npm[15995]: [16006:0x2e17df0] 21317178 ms: Scavenge 1282.8 (1426.0) -> 1282.0 (1426.0) MB, 39.1 / 0.0 ms  (+ 53.1 ms in 384 steps since last GC) allocation failure
Feb 18 19:11:59 tars npm[15995]: [16006:0x2e17df0] 21319327 ms: Scavenge 1283.2 (1427.0) -> 1282.5 (1427.0) MB, 39.0 / 0.0 ms  (+ 1.7 ms in 399 steps since last GC) allocation failure
Feb 18 19:11:59 tars npm[15995]: [16006:0x2e17df0] 21319397 ms: Scavenge 1283.7 (1427.0) -> 1283.0 (1427.0) MB, 39.7 / 0.0 ms  (+ 2.0 ms in 414 steps since last GC) allocation failure
Feb 18 19:11:59 tars npm[15995]: <--- JS stacktrace --->
Feb 18 19:11:59 tars npm[15995]: Cannot get stack trace in GC.
Feb 18 19:11:59 tars npm[15995]: FATAL ERROR: Scavenger: promoting marked
Feb 18 19:11:59 tars npm[15995]: Allocation failed - process out of memory
Feb 18 19:11:59 tars npm[15995]: 1: node::Abort() [node]
Feb 18 19:11:59 tars npm[15995]: 2: 0x12dd38c [node]
Feb 18 19:11:59 tars npm[15995]: 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
Feb 18 19:11:59 tars npm[15995]: 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
Feb 18 19:11:59 tars npm[15995]: 5: 0x9e97ab [node]
Feb 18 19:11:59 tars npm[15995]: 6: void v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)0, (v8::internal::PromotionMode)0, (v8::internal::LoggingAndProfiling)1>::EvacuateObject<(v8::internal::ScavengingVisitor<(v8::internal::MarksHandling)0, (v8::internal::PromotionMode)0, (v8::internal::LoggingAndProfiling)1>::ObjectContents)1, (v8::internal::AllocationAlignment)0>(v8::internal::Map*, v8::internal::HeapObject**, v8::internal::HeapObject*, int) [node]
Feb 18 19:11:59 tars npm[15995]: 7: v8::internal::Heap::IteratePromotedObjectPointers(v8::internal::HeapObject*, unsigned char*, unsigned char*, bool, void (*)(v8::internal::HeapObject**, v8::internal::HeapObject*)) [node]
Feb 18 19:11:59 tars npm[15995]: 8: void v8::internal::BodyDescriptorBase::IterateBodyImpl<v8::internal::ObjectVisitor>(v8::internal::HeapObject*, int, int, v8::internal::ObjectVisitor*) [node]
Feb 18 19:11:59 tars npm[15995]: 9: void v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, void, v8::internal::HeapObject*, int, v8::internal::ObjectVisitor*>(v8::internal::InstanceType, v8::internal::HeapObject*, int, v8::internal::ObjectVisitor*) [node]
Feb 18 19:11:59 tars npm[15995]: 10: v8::internal::Heap::DoScavenge(v8::internal::ObjectVisitor*, unsigned char*, v8::internal::PromotionMode) [node]
Feb 18 19:11:59 tars npm[15995]: 11: v8::internal::Heap::Scavenge() [node]
Feb 18 19:11:59 tars npm[15995]: 12: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
Feb 18 19:11:59 tars npm[15995]: 13: v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, char const*, char const*, v8::GCCallbackFlags) [node]
Feb 18 19:11:59 tars npm[15995]: 14: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [node]
Feb 18 19:11:59 tars npm[15995]: 15: 0xf6b0b5 [node]
Feb 18 19:11:59 tars npm[15995]: 16: v8::internal::Map::EnsureDescriptorSlack(v8::internal::Handle<v8::internal::Map>, int) [node]
Feb 18 19:11:59 tars npm[15995]: 17: v8::internal::Map::ShareDescriptor(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Descriptor*) [node]
Feb 18 19:11:59 tars npm[15995]: 18: v8::internal::Map::CopyAddDescriptor(v8::internal::Handle<v8::internal::Map>, v8::internal::Descriptor*, v8::internal::TransitionFlag) [node]
Feb 18 19:11:59 tars npm[15995]: 19: v8::internal::Map::CopyWithField(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::Representation, v8::internal::TransitionFlag) [node]
Feb 18 19:11:59 tars npm[15995]: 20: v8::internal::Map::TransitionToDataProperty(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [node]
Feb 18 19:11:59 tars npm[15995]: 21: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [node]
Feb 18 19:11:59 tars npm[15995]: 22: v8::internal::StoreIC::LookupForWrite(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
Feb 18 19:11:59 tars npm[15995]: 23: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
Feb 18 19:11:59 tars npm[15995]: 24: v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [node]
Feb 18 19:11:59 tars npm[15995]: 25: v8::internal::Runtime_StoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
Feb 18 19:11:59 tars npm[15995]: 26: 0x3d17fd2063a7
Feb 18 19:11:59 tars npm[15995]: Aborted
Feb 18 19:11:59 tars npm[15995]: ERROR:asyncio:Task exception was never retrieved
Feb 18 19:11:59 tars npm[15995]: future: <Task finished coro=<wrapper() done, defined at /usr/local/lib/python3.4/dist-packages/aiohttp/streams.py:396> exception=ServerDisconnectedError()>
Feb 18 19:11:59 tars npm[15995]: Traceback (most recent call last):
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
Feb 18 19:11:59 tars npm[15995]: result = coro.throw(exc)
Feb 18 19:11:59 tars npm[15995]: File "/usr/local/lib/python3.4/dist-packages/aiohttp/streams.py", line 398, in wrapper
Feb 18 19:11:59 tars npm[15995]: result = yield from func(self, *args, **kw)
Feb 18 19:11:59 tars npm[15995]: File "/usr/local/lib/python3.4/dist-packages/aiohttp/streams.py", line 454, in read
Feb 18 19:11:59 tars npm[15995]: return (yield from super().read(n))
Feb 18 19:11:59 tars npm[15995]: File "/usr/local/lib/python3.4/dist-packages/aiohttp/streams.py", line 187, in read
Feb 18 19:11:59 tars npm[15995]: yield from self._waiter
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
Feb 18 19:11:59 tars npm[15995]: yield self  # This tells Task to wait for completion.
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
Feb 18 19:11:59 tars npm[15995]: value = future.result()
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
Feb 18 19:11:59 tars npm[15995]: raise self._exception
Feb 18 19:11:59 tars npm[15995]: aiohttp.errors.ServerDisconnectedError
Feb 18 19:11:59 tars npm[15995]: Traceback (most recent call last):
Feb 18 19:11:59 tars npm[15995]: File "hangups_client.py", line 210, in listen_events
Feb 18 19:11:59 tars npm[15995]: msgJson = json.loads(msgtxt)
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/json/__init__.py", line 318, in loads
Feb 18 19:11:59 tars npm[15995]: return _default_decoder.decode(s)
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
Feb 18 19:11:59 tars npm[15995]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
Feb 18 19:11:59 tars npm[15995]: raise ValueError(errmsg("Expecting value", s, err.value)) from None
Feb 18 19:11:59 tars npm[15995]: ValueError: Expecting value: line 1 column 1 (char 0)
Feb 18 19:11:59 tars npm[15995]: During handling of the above exception, another exception occurred:
Feb 18 19:11:59 tars npm[15995]: Traceback (most recent call last):
Feb 18 19:11:59 tars npm[15995]: File "hangups_client.py", line 226, in <module>
Feb 18 19:11:59 tars npm[15995]: run_example(listen_events)
Feb 18 19:11:59 tars npm[15995]: File "hangups_client.py", line 69, in run_example
Feb 18 19:11:59 tars npm[15995]: loop.run_until_complete(task)
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/base_events.py", line 276, in run_until_complete
Feb 18 19:11:59 tars npm[15995]: return future.result()
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
Feb 18 19:11:59 tars npm[15995]: raise self._exception
Feb 18 19:11:59 tars npm[15995]: File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
Feb 18 19:11:59 tars npm[15995]: result = coro.throw(exc)
Feb 18 19:11:59 tars npm[15995]: File "hangups_client.py", line 115, in _async_main
Feb 18 19:11:59 tars npm[15995]: yield from example_coroutine(client, args)
Feb 18 19:11:59 tars npm[15995]: File "hangups_client.py", line 223, in listen_events
Feb 18 19:11:59 tars npm[15995]: print(json.dumps({"status":"error", "exception":repr(error)}))
Feb 18 19:11:59 tars npm[15995]: BrokenPipeError: [Errno 32] Broken pipe
Feb 18 19:11:59 tars npm[15995]: npm ERR! Linux 2.6.32-042stab120.16
Feb 18 19:11:59 tars npm[15995]: npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
Feb 18 19:11:59 tars npm[15995]: npm ERR! node v7.5.0
Feb 18 19:11:59 tars npm[15995]: npm ERR! npm  v4.1.2
Feb 18 19:11:59 tars npm[15995]: npm ERR! code ELIFECYCLE
Feb 18 19:11:59 tars npm[15995]: npm ERR! [email protected] start: `DEBUG=*matrix-puppet:* node index.js`
Feb 18 19:11:59 tars npm[15995]: npm ERR! Exit status 134
Feb 18 19:11:59 tars npm[15995]: npm ERR!
Feb 18 19:11:59 tars npm[15995]: npm ERR! Failed at the [email protected] start script 'DEBUG=*matrix-puppet:* node index.js'.
Feb 18 19:11:59 tars npm[15995]: npm ERR! Make sure you have the latest version of node.js and npm installed.
Feb 18 19:11:59 tars npm[15995]: npm ERR! If you do, this is most likely a problem with the matrix-puppet-hangouts package,
Feb 18 19:11:59 tars npm[15995]: npm ERR! not with npm itself.
Feb 18 19:11:59 tars npm[15995]: npm ERR! Tell the author that this fails on your system:
Feb 18 19:11:59 tars npm[15995]: npm ERR!     DEBUG=*matrix-puppet:* node index.js
Feb 18 19:11:59 tars npm[15995]: npm ERR! You can get information on how to open an issue for this project with:
Feb 18 19:11:59 tars npm[15995]: npm ERR!     npm bugs matrix-puppet-hangouts
Feb 18 19:11:59 tars npm[15995]: npm ERR! Or if that isn't available, you can get their info via:
Feb 18 19:11:59 tars npm[15995]: npm ERR!     npm owner ls matrix-puppet-hangouts
Feb 18 19:11:59 tars npm[15995]: npm ERR! There is likely additional logging output above.
Feb 18 19:11:59 tars npm[15995]: npm ERR! Please include the following file with any support request:
Feb 18 19:11:59 tars npm[15995]: npm ERR!     /home/sohum/matrix-puppet-hangouts/npm-debug.log

The server definitely wasn't out of memory; something like 10+gb was free at the time.

The error resulted in a crash, and when node restarted, it never mirrored the incoming message after the one listed at the top of the log.

unexpected keyword argument 'max_retries' on matrix-puppet-hangouts status message after starting

After starting puppet - I got in status messages:

Starting hangouts bridge! ​
Attempting main loop...
 ​Traceback (most recent call last):
  File "hangups_client.py", line 252, in 
 ​   run_example(listen_events)
  File "hangups_client.py", line 71, in run_example
    client = hangups.Client(cookies, max_retries=float('inf'), retry_backoff_base=1.2)
TypeError: __init__() got an unexpected keyword argument 'max_retries'
​```
And seems it not working after this - I not receive messages from Hangouts to Matrix.

crash after changing room name

steps to reproduce:
change name of a room in riot/other client with that feature.
send a couple messages back and forth through that room.
puppet bridge crashes shortly after

Authorization code cookie not found (javascript needed error in lynx)

I got the following error trying to get the cookie:

Traceback (most recent call last):
  File "hangups_client.py", line 252, in <module>
    run_example(listen_events)
  File "hangups_client.py", line 56, in run_example
    cookies = hangups.auth.get_auth_stdin(args.token_path)
  File "/usr/local/lib/python3.6/dist-packages/hangups/auth.py", line 188, in get_auth_stdin
    return get_auth(CredentialsPrompt(), refresh_token_cache)
  File "/usr/local/lib/python3.6/dist-packages/hangups/auth.py", line 166, in get_auth
    session, credentials_prompt
  File "/usr/local/lib/python3.6/dist-packages/hangups/auth.py", line 296, in _get_authorization_code
    raise GoogleAuthError('Authorization code cookie not found')
hangups.auth.GoogleAuthError: Authorization code cookie not found

Trying to connect with lynx, Google says that it needs Javascript for security reasons to continue.

How to fix or workaround this?

Long-polling request failed: Request connection error: Response payload is not completed

After some days of work - matrix-puppet-hangouts bridge show the errors in logs:

10:08
WARNING:hangups.channel:Long-polling request failed: Request connection error: Response payload is not completed
10:08
WARNING:hangups.channel:retry attempt count is now 1
10:08
WARNING:hangups.channel:Long-polling request failed: SID became invalid
10:08
WARNING:hangups.channel:retry attempt count is now 2

After this - when I try to send message - it show error:

16:16
Message send failure! Exception: Session is closed

Restarting bridge solve the problem. Can I fix this problem without full restarting of puppet?

Error when starting bridge

Hey! This is a neat project and I wanted to try it out :) After some initial finagling with hangups being unable to find the auth_code (see tdryer/hangups#269 ), I got the hangups command line client working, so I think everything on that end is working fine.

But I'm getting this error on the bridge itself:

SyncApi.sync: starting with sync token null
Got push rules
synced
started hangups child
Matrix-side listening on port 8091
/home/sohum/matrix-puppet-hangouts/node_modules/matrix-js-sdk/node_modules/olm/olm.js:19
"undefined"!==typeof module&&(module.exports=a);process.on("uncaughtException",function(a){if(!(a instanceof T))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(ma)a.print||(a.print=print),"undefined"!=typeof pri
ntErr&&(a.printErr=printErr),a.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");z("object"=
==typeof a);return a},"undefined"!=
                                                                                                                ^

SyntaxError: Unexpected token H in JSON at position 0
    at JSON.parse (<anonymous>)
    at Pipe.channel.onread (internal/child_process.js:462:28)

npm ERR! Linux 2.6.32-042stab120.16
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `DEBUG=matrix-puppet:* node index.js`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] start script 'DEBUG=matrix-puppet:* node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the matrix-puppet-hangouts package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     DEBUG=matrix-puppet:* node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs matrix-puppet-hangouts
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls matrix-puppet-hangouts
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/sohum/matrix-puppet-hangouts/npm-debug.log

npm-debug.log contains this:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/sohum/matrix-puppet-hangouts/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle [email protected]~start: CWD: /home/sohum/matrix-puppet-hangouts
11 silly lifecycle [email protected]~start: Args: [ '-c', 'DEBUG=matrix-puppet:* node index.js' ]
12 silly lifecycle [email protected]~start: Returned: code: 7  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `DEBUG=matrix-puppet:* node index.js`
14 verbose stack Exit status 7
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:192:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:192:7)
14 verbose stack     at maybeClose (internal/child_process.js:890:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/sohum/matrix-puppet-hangouts
17 error Linux 2.6.32-042stab120.16
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v7.5.0
20 error npm  v4.1.2
21 error code ELIFECYCLE
22 error [email protected] start: `DEBUG=matrix-puppet:* node index.js`
22 error Exit status 7
23 error Failed at the [email protected] start script 'DEBUG=matrix-puppet:* node index.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the matrix-puppet-hangouts package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     DEBUG=matrix-puppet:* node index.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs matrix-puppet-hangouts
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls matrix-puppet-hangouts
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.