Git Product home page Git Product logo

signal-cli-rest-api's People

Contributors

kahrpatrick avatar narinlab avatar top-on 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

signal-cli-rest-api's Issues

Error code 500 "Internal Server Error"

I got below error code 500 "Internal Server Error" Is there any guidance?

�[32mINFO�[0m: 127.0.0.1:53539 - "�[1mPOST /messages/00966546462471 HTTP/1.1�[0m" �[91m500 Internal Server Error�[0m �[31mERROR�[0m: Exception in ASGI application Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\uvicorn-0.11.8-py3.7.egg\uvicorn\protocols\http\h11_impl.py", line 388, in run_asgi result = await app(self.scope, self.receive, self.send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\uvicorn-0.11.8-py3.7.egg\uvicorn\middleware\proxy_headers.py", line 45, in __call__ return await self.app(scope, receive, send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\fastapi-0.58.1-py3.7.egg\fastapi\applications.py", line 171, in __call__ await super().__call__(scope, receive, send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\applications.py", line 102, in __call__ await self.middleware_stack(scope, receive, send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\middleware\errors.py", line 181, in __call__ raise exc from None File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\middleware\errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\exceptions.py", line 82, in __call__ raise exc from None File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\routing.py", line 550, in __call__ await route.handle(scope, receive, send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\routing.py", line 227, in handle await self.app(scope, receive, send) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\starlette-0.13.4-py3.7.egg\starlette\routing.py", line 41, in app response = await func(request) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\fastapi-0.58.1-py3.7.egg\fastapi\routing.py", line 197, in app dependant=dependant, values=values, is_coroutine=is_coroutine File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\fastapi-0.58.1-py3.7.egg\fastapi\routing.py", line 147, in run_endpoint_function return await dependant.call(**values) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\signal_cli_rest_api-0.1.97-py3.7.egg\signal_cli_rest_api\app\api\api_v1\endpoints\messages.py", line 50, in send_message response = await run_signal_cli_command(cmd) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\signal_cli_rest_api-0.1.97-py3.7.egg\signal_cli_rest_api\app\utils.py", line 73, in run_signal_cli_command process = await asyncio.subprocess.create_subprocess_shell(full_cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\asyncio\subprocess.py", line 202, in create_subprocess_shell stderr=stderr, **kwds) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 1510, in subprocess_shell protocol, cmd, True, stdin, stdout, stderr, bufsize, **kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 462, in _make_subprocess_transport raise NotImplementedError NotImplementedError

Cannot install through pip method

I say: pip install signal-cli-rest-api, and got an error:

Collecting signal-cli-rest-api
  Could not find a version that satisfies the requirement signal-cli-rest-api (from versions: )
No matching distribution found for signal-cli-rest-api

OS is Debian Buster, 64-bit.

missing groupID for group messages

The send_message method of the messages endpoint does not append the groupID for group messages, resulting in an error when an API call with group: true is made. In fact, this field is also missing in the MessageOutgoing schema.

This is the relevant section from the signal-cli man-page:

-g GROUP, --group GROUP

Specify the recipient group ID in base64 encoding.

Captcha request on /register/{number}/

When running registration like this (with a random number)

curl -X 'POST' \
  'http://localhost:8000/register/%2B49080500' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "voice_verification": true
}'

I am getting the following error:

{
  "detail": "Starting signal-cli process failed: Captcha required for verification, use --captcha CAPTCHA\nTo get the token, go to https://signalcaptchas.org/registration/generate.html\nCheck the developer tools (F12) console for a failed redirect to signalcaptcha://\nEverything after signalcaptcha:// is the captcha token.\n"
}

Before I start poking around, maybe I am missing an obvious step?
Is the captcha functionality already built into this wrapper?

Btw, If this is an easy one, I would be happy to add documentation.

Got 500 internal error

Hello, everytime I try to get /message, I have an internal 500 error:

500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 390, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 171, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 102, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in call
raise exc from None
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in call
raise exc from None
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 550, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 196, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 149, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.8/dist-packages/starlette/concurrency.py", line 34, in run_in_threadpool
return await loop.run_in_executor(None, func, *args)
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/dist-packages/signal_cli_rest_api/app/api/api_v1/endpoints/messages.py", line 24, in get_messages
return [json.loads(m) for m in response.split("\n") if m != ""]
AttributeError: 'coroutine' object has no attribute 'split'
/usr/local/lib/python3.8/dist-packages/uvicorn/main.py:390: RuntimeWarning: coroutine 'run_signal_cli_command' was never awaited
loop.run_until_complete(self.serve(sockets=sockets))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Chatbot - reply message

Would it be possible to reply to messages received as a chatbot?
Could you provide an example?

link device: newline character in QR code

A newline character causes the QR code for device linking to be faulty. I am not providing a PR as I am unsure whether this can be safely escaped in run_signal_cli_command without affecting other functions, or if it should be done in link_device.

500 Internal Server Error during POST to /register

I'm using the workaround fix that is mentioned here

and have updated the schema/register.py and endpoint/register.py files as per the changes a couple days ago (Fixed Captcha).

I'm getting the following when trying to register a number:
INFO: 192.168.0.117:56688 - "POST /register/xxx HTTP/1.1" 500 Internal Server Error
(I replaced my phone # +1231231234 with xxx)
and
{"detail":"Starting signal-cli process failed: OpenJDK Server VM warning: You have loaded library /tmp/resource1973025829374288195.so which might have disabled stack guard. The VM will try to fix the stack guard now.\nIt's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.\nWARN App - WARNING: Support for new group V2 is disabled, because the required native library dependency is missing: libzkgroup\nMissing required native library dependency: libsignal-client\n"}

Get Error 500

Hi, When I send a message with multiple works show me an error 500

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.