An Invalid Signal API Source Phone No (65xxxxxxxx) was provided
See original GitHub issue📣 Notification Service(s) Impacted Signal
🐞 Describe the bug When using an international number with fewer than 11 digits, the above warning is shown. Even though it is a warning, the Signal API URL is considered invalid and an error is thrown.
Fyi, I also tried the E164 format (with ‘+’ prefix) and got the same error. E.g. ‘+6598765432’ is valid according to this test site. Fyi, E164 is supported by signal-cli and twilio.
💡 Screenshots and Logs
mailrise@container:/$ apprise -vvvv -t 'title' signal://localhost:8080/659xxxxxxx/659xxxxxxx
2022-05-29 02:08:29,506 - TRACE - Signal API URL signal://localhost:8080/659xxxxxxx/659xxxxxxx unpacked as:
user="None"
password="None"
port="8080"
host="localhost"
fullpath="/659xxxxxxx/659xxxxxxx"
path="/659xxxxxxx/"
query="659xxxxxxx"
schema="signal"
url="signal://localhost:8080/659xxxxxxx/659xxxxxxx"
qsd="{}"
qsd+="{}"
qsd-="{}"
qsd:="{}"
secure="False"
verify="True"
targets="['659xxxxxxx']"
apikey="localhost"
source="659xxxxxxx"
batch="False"
status="False"
2022-05-29 02:08:29,507 - WARNING - An invalid Signal API Source Phone No (659xxxxxxx) was provided.
2022-05-29 02:08:29,508 - ERROR - Could not load Signal API URL: signal://localhost:8080/659xxxxxxx/659xxxxxxx
2022-05-29 02:08:29,508 - ERROR - You must specify at least one server URL or populated configuration file.
Usage: [OPTIONS] SERVER_URL [SERVER_URL2 [SERVER_URL3]]
Send a notification to all of the specified servers identified by their
URLs the content provided within the title, body and notification-type.
<snip>
💻 Your System Details: docker: yoryan/mailrise:v1.2.1 (apprise>=0.9.5)
🔮 Additional context
One potential fix is to set min_len
to 10 or lower in utils.py. Alternatively, consider using python-phonenumbers.
According to this line in the forked libsignal-service-java used by signal-cli, phone numbers can range from 7 to 15 digits.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top GitHub Comments
Thanks for the prompt response. As a quick workaround, I mounted a patched utils.py (
min_len
= 10) in my docker compose file (for Mailrise).Closing ticket off as code has been merged