politics-rewired / Spoke

Politics Rewired's fork of Spoke
GNU General Public License v3.0
34 stars 16 forks source link

Error code 22P02 when uploading contacts if using Nexmo as messaging service #985

Open ghost opened 3 years ago

ghost commented 3 years ago

Your issue may already be reported! Please search on the issue tracker before creating one.

Describe the bug When trying to use Nexmo as a messaging service, and having the NEXMO_API_KEY and NEXMO_API_SECRET keys configured, the entire program crashes and proceeds to spit out an error code of 22P02 in the debug console when attempting to upload a contact. When the messaging service is set to fakeservice, contact uploading works as intended.

To Reproduce Steps to reproduce the behavior:

  1. Deploy development version of Spoke, as instructed on the main page.
  2. Launch Spoke and open up the Spoke instance you created (or sign up and create, if you haven't already.)
  3. Create a campaign. Fill in the basic details.
  4. Upload contacts via CSV. When hitting save, it proceeds to spit out a JSON error on screen, and the entire program crashes.

Expected behavior As with fakeservice, uploading contacts with Nexmo being set as the messaging service should work as normal.

Screenshots image I've also attached the above screenshot in a Pastebin text format incase that works better.

Desktop (please complete the following information):

Additional context I reproduced this multiple times on fresh copies, and the same error spat out each time.

bchrobot commented 3 years ago

Hey @HaydenLaCelleWA our fork of Spoke does not officially support Nexmo.

The readme alludes to this under the SMS section

For development, you can set DEFAULT_SERVICE=fakeservice to skip using an SMS provider (Assemble Switchboard or Twilio)

but we have not purged the codebase of references to Nexmo so I can see how this would be confusing.

We do not plan on adding official support for Nexmo but would welcome a PR for it. The MoveOn fork may support Nexmo now, however, it was untested and unmaintained when we forked off in early 2019.